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

Invalid error thrown by browser.goTo #148

Closed
nair-sumesh opened this issue Feb 22, 2022 · 3 comments
Closed

Invalid error thrown by browser.goTo #148

nair-sumesh opened this issue Feb 22, 2022 · 3 comments

Comments

@nair-sumesh
Copy link
Contributor

Describe the bug
browser.goTo does not navigate to Shell-home

To Reproduce
async iNavigateToHomePage() {
await browser.goTo({ sHash: '#Shell-home' });
}

Expected behavior
Supposed to Navigate to the shell home (Fiori launchpad page)

Logs/Console Output

[0-0] Error in "test.I reopen app"
Error: Invalid URL: #Shell-home
    at validateUrl (C:\Users\nnnnnn\git\wdi5-testing\node_modules\webdriverio\build\utils\index.js:378:45)
    at Browser.url (C:\Users\nnnnnn\git\wdi5-testing\node_modules\webdriverio\build\commands\browser\url.js:47:52)
    at Browser.wrapCommandFn (C:\Users\nnnnnn\git\wdi5-testing\node_modules\@wdio\utils\build\shim.js:137:38)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at Browser.<anonymous> (C:\Users\nnnnnn\git\wdi5-testing\node_modules\wdio-ui5-service\src\lib\wdioUi5-index.js:483:17)
    at Browser.wrapCommandFn (C:\Users\nnnnnn\git\wdi5-testing\node_modules\@wdio\utils\build\shim.js:137:29)

Runtime Env (please complete the following information):

  • wdi5/wdio-ui5-service-version: 0.8.2
  • UI5 version: [1.99.0-SNAPSHOT]
  • wdio-version (output of wdio --version): 7.16.15
  • node-version (output of node --version): 16.13.2
  • OS: Win 10
  • Browser + Version : chrome (v98.0.4758.82) on Windows
@vobu
Copy link
Contributor

vobu commented Feb 23, 2022

the command itself is syntactically correct (browser.goTo({ sHash: '#Shell-home' }))
might be a problem with your configuration.
can you share your wdio.config.(j|t)s-file please? "baseUrl" and the "wdi5" should be sufficient.

@nair-sumesh
Copy link
Contributor Author

  wdi5: {
    screenshotPath: path.join('wdio-ui5-service', 'test', 'report', 'screenshots'),
    logLevel: 'verbose', // error | verbose | silent
    platform: 'browser', // electron, browser, android, ios
    url: '',
    skipInjectUI5OnStart: true,
    deviceType: 'web',
    waitForUI5Timeout: 15000
  },

...
baseUrl :''

Later in the before() method, I call await browser.url(sURL);
where sURL is dynamically generated.

@vobu
Copy link
Contributor

vobu commented Feb 28, 2022

oi, the empty baseUrl is most likely the culprit. Try providing that, please

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

2 participants