Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How reload a browser with multiremote #451

Open
thuyboehm opened this issue Apr 12, 2023 · 22 comments
Open

How reload a browser with multiremote #451

thuyboehm opened this issue Apr 12, 2023 · 22 comments

Comments

@thuyboehm
Copy link

We use multiremote to make our tests with different user roles. It is necessary to reload the browser to see the changes of the other users.

For example:
User2 make some changes in browserInstance2
User1 are able to see the changes from User2 in browserInstance1 <- but the browser needs to be reload.

With browserInstance1.url("#"); it is possible to updated only the url for one browser instance, but this do not trigger the reload of the website. The result is that browserInstance1 is not able to see the changes from browserInstance2.

Is there an other way to realize the workflow?

@vobu
Copy link
Contributor

vobu commented Apr 12, 2023

hi, if it were me, i'd naïvely try browserInstance.refresh() https://v7.webdriver.io/docs/api/webdriver#refresh - mind that you will need to re-inject wdi5 afterwards again à la https://ui5-community.github.io/wdi5/#/configuration?id=skipinjectui5onstart

@sangeeta298
Copy link

sangeeta298 commented Apr 20, 2023

Hi, I work together with the author of this issue. Our setup is slightly more complicated. In addition to multi remote, we are also using btp and custom authentications. If we add skipInjectUI5OnStart: true in wdi5 config then we get below error:

[0-0] [wdi5] skipped wdi5 injection!
[0-0] 2023-04-20T15:11:25.414Z ERROR webdriver: Request failed with status 500 due to javascript error: javascript error: Cannot read properties of undefined (reading 'waitForUI5Options')
[0-0] JavaScript stack:
[0-0] TypeError: Cannot read properties of undefined (reading 'waitForUI5Options')
[0-0] at eval (eval at executeAsyncScript (:553:26), :4:65)
[0-0] at eval (eval at executeAsyncScript (:553:26), :33:8)
[0-0] at eval (eval at executeAsyncScript (:553:26), :33:33)
[0-0] at executeAsyncScript (:553:47)
[0-0] at apply.logging (:568:29)
[0-0] at callFunction (:447:22)
[0-0] at :461:23
[0-0] at :462:3
[0-0] (Session info: headless chrome=112.0.5615.137)
JavaScript stack:
TypeError: Cannot read properties of undefined (reading 'waitForUI5Options')
at eval (eval at executeAsyncScript (:553:26), :4:65)
at eval (eval at executeAsyncScript (:553:26), :33:8)
at eval (eval at executeAsyncScript (:553:26), :33:33)
at executeAsyncScript (:553:47)
at apply.logging (:568:29)
at callFunction (:447:22)
at :461:23
at :462:3
(Session info: headless chrome=112.0.5615.137)
at async clientSide_getControl (/node_modules/wdio-ui5-service/client-side-js/getControl.js:3:12)

If we comment out skipInjectUI5OnStart: true and refresh using await browserInstance.refresh(); we receive error:
Error: waitUntil condition timed out after 60000ms
at listOnTimeout (internal/timers.js:526:9)
at processTimers (internal/timers.js:500:7)
at async Promise.all (index 1)

@sangeeta298
Copy link

Hi,
Also tried:
await browserInstance.refresh();
await ui5Service.injectUI5(browserInstance);

and received error:
[MultiremoteBrowser #0-0] Cannot read property 'wdi5' of undefined
[MultiremoteBrowser #0-0] TypeError: Cannot read property 'wdi5' of undefined
[MultiremoteBrowser #0-0] at /Users/d052977/git/flex-e2e/node_modules/wdio-ui5-service/dist/lib/wdi5-bridge.js:235:48
[MultiremoteBrowser #0-0] at step (/Users/d052977/git/flex-e2e/node_modules/wdio-ui5-service/dist/lib/wdi5-bridge.js:56:23)
[MultiremoteBrowser #0-0] at Object.next (/Users/d052977/git/flex-e2e/node_modules/wdio-ui5-service/dist/lib/wdi5-bridge.js:37:53)
[MultiremoteBrowser #0-0] at /Users/d052977/git/flex-e2e/node_modules/wdio-ui5-service/dist/lib/wdi5-bridge.js:31:71
[MultiremoteBrowser #0-0] at new Promise ()
[MultiremoteBrowser #0-0] at __awaiter (/Users/d052977/git/flex-e2e/node_modules/wdio-ui5-service/dist/lib/wdi5-bridge.js:27:12)
[MultiremoteBrowser #0-0] at injectUI5 (/Users/d052977/git/flex-e2e/node_modules/wdio-ui5-service/dist/lib/wdi5-bridge.js:230:12)
[MultiremoteBrowser #0-0] at Service. (/Users/d052977/git/flex-e2e/node_modules/wdio-ui5-service/dist/service.js:154:74)
[MultiremoteBrowser #0-0] at step (/Users/d052977/git/flex-e2e/node_modules/wdio-ui5-service/dist/service.js:33:23)
[MultiremoteBrowser #0-0] at Object.next (/Users/d052977/git/flex-e2e/node_modules/wdio-ui5-service/dist/service.js:14:53)

While debugging, in wdio-ui5-service -> service.js -> injectUI5, both this._config and browserInstance.config are undefined.
Line 153 config = this._config ? this._config : browserInstance.config;

@github-actions
Copy link

github-actions bot commented Jun 8, 2023

hey 👋 - silence for 30 days 🤐 ... anybody? 😀

@github-actions github-actions bot added the stale label Jun 8, 2023
@vobu
Copy link
Contributor

vobu commented Jun 12, 2023

this is still interesting...once bandwidth is there, we'll include it in our test suite

@vobu vobu removed the stale label Jun 12, 2023
@github-actions
Copy link

hey 👋 - silence for 30 days 🤐 ... anybody? 😀

@github-actions github-actions bot added the stale label Jul 13, 2023
@vobu
Copy link
Contributor

vobu commented Jul 13, 2023

this is still on the list to try out!

@vobu vobu removed the stale label Jul 13, 2023
@dominikfeininger
Copy link
Collaborator

@sangeeta298 can you please provide some feedback about the provided suggestion.

@github-actions
Copy link

hey 👋 - silence for 30 days 🤐 ... anybody? 😀

@github-actions github-actions bot added the stale label Sep 11, 2023
@vobu vobu removed the stale label Sep 11, 2023
@github-actions
Copy link

hey 👋 - silence for 30 days 🤐 ... anybody? 😀

Copy link

hey 👋 - silence for 30 days 🤐 ... anybody? 😀

@github-actions github-actions bot added the stale label Nov 12, 2023
@vobu vobu removed the stale label Nov 13, 2023
Copy link

hey 👋 - silence for 30 days 🤐 ... anybody? 😀

@github-actions github-actions bot added the stale label Dec 14, 2023
@vobu vobu removed the stale label Dec 14, 2023
Copy link

hey 👋 - silence for 30 days 🤐 ... anybody? 😀

@github-actions github-actions bot added the stale label Jan 14, 2024
@vobu vobu removed the stale label Jan 15, 2024
Copy link

hey 👋 - silence for 30 days 🤐 ... anybody? 😀

@github-actions github-actions bot added the stale label Feb 15, 2024
@thuyboehm
Copy link
Author

Hi @vobu, hi @dominikfeininger,

is there any update on this issue?

@github-actions github-actions bot removed the stale label Feb 16, 2024
Copy link

hey 👋 - silence for 30 days 🤐 ... anybody? 😀

@github-actions github-actions bot added the stale label Mar 17, 2024
Copy link

closed 📴 because silencio 🤫 since an additional 14 days after staleness 📠

@vobu
Copy link
Contributor

vobu commented Apr 4, 2024

someone still needs to try this out :)

@vobu vobu reopened this Apr 4, 2024
@vobu vobu removed the stale label Apr 4, 2024
@thuyboehm
Copy link
Author

Hi @vobu ,

Sangeeta wrote at Mai 2023, that she try this out:
await browserInstance.refresh();
await ui5Service.injectUI5(browserInstance);
But this do not working because of some error.

Maybe can you please help what should we try out?

Thanks

Copy link

github-actions bot commented May 5, 2024

hey 👋 - silence for 30 days 🤐 ... anybody? 😀

@github-actions github-actions bot added the stale label May 5, 2024
@vobu vobu removed the stale label May 6, 2024
@vobu
Copy link
Contributor

vobu commented May 6, 2024

Sangeeta wrote at Mai 2023, that she try this out: await browserInstance.refresh(); await ui5Service.injectUI5(browserInstance); But this do not working because of some error.

"some error" won't help much here unfortunately...what's the error (message) exactly?

Copy link

github-actions bot commented Jun 6, 2024

hey 👋 - silence for 30 days 🤐 ... anybody? 😀

@github-actions github-actions bot added the stale label Jun 6, 2024
@vobu vobu removed the stale label Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants