question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

browser.url(url) not working remotely (browserstack)

See original GitHub issue

[//]: # NOTE: This repository only maintains packages that are listed in the Readme. Please make sure that your issue is directly caused by one of these packages and if not file an issue in the correct 3rd party package repository.

Environment (please complete the following information):

  • WebdriverIO version: 7.0.5
  • Mode: Standalone mode
  • Node.js version: 12.18.4
  • Yarn version: 1.22.10
  • Browser name and version: Chrome 88
  • Platform name and version: Mac 10.15.7 (Catalina)

Describe the bug When using browser.url(url); I am getting this error message when running remotely via Browserstack

   "TypeError [ERR_INVALID_URL]: Invalid URL:
     at onParseError (internal/url.js:256:9)
     at new URL (internal/url.js:332:5)
     at new URL (internal/url.js:329:22)
    at Browser.url (/xxxxx/node_modules/webdriverio/build/commands/browser/url.js:43:17)"

locally its working as expected.

To Reproduce

// navigate to a new URL (local and browserstack)
browser.url('https://webdriver.io');
// receive url
console.log(browser.getUrl()); // outputs: "https://webdriver.io"

Expected behavior The given url should be received both locally and remotely.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:15 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
christian-bromanncommented, Mar 12, 2021

@larryg01 the problem was that the base url was an empty string. I created a PR with a fix that ensures that empty strings are ignored.

0reactions
larryg01commented, Mar 12, 2021

@christian-bromann thats awesome so this will be merged at some point today so that i can get my upgrade completed. Thank you

Read more comments on GitHub >

github_iconTop Results From Across the Web

Local testing errors and troubleshooting | BrowserStack Docs
Learn how to resolve connectivity issues when using BrowserStack Local. What is Local Testing. Local Testing enables remote browsers and devices from the ......
Read more >
Unable to launch web application URL on browser in ...
This application URL is not accessible from outside client network. We are using Katalon 'WebUI' driver to launch browser in Browserstack ...
Read more >
TestCafe - How to automatically run the generated remote ...
Since the docker container doesn't support test execution with IE browser. I tried out the "remote" option and got a remote connection URL ......
Read more >
Local Testing with BrowserStack - Perficient Blogs
To resolve all requests to local URLs via your machine, click on the Local Testing icon and check the Resolve all URLs through...
Read more >
Using remote browser stack isn't working · Issue #160 - GitHub
As a workaround you should explicitly define the port in server url ( --server-url=https://{mycreds}@hub-cloud.browserstack.com:443 ). I ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found