0
  1. We run scripts from CLI. This is what is required for us. To use services from Browserstack, we have to download their binary and then start tunnel using this binary. This is just like executing this binary and it creates a tunnel between my local machine and their system. I execute binary like “BrowserStackLocal.exe --key Accesskey”.
  2. Once tunnel is created, I can execute my scripts. And in my scripts I just try to access this site http://username:Access key@hub.browserstack.com:80/wd/hub. Actual command used in this scripts is “webdriver.Remote(command_executor='http://username:Access key@hub.browserstack.com:80/wd/hub',desired_capabilities=desired_cap)”.
  3. That’s all. This is all I have to do. Rest whatever happens is done by Browser stack binary internally.
  4. So when I start my script, it initially fetches this http://username:Access key@hub.browserstack.com:80/wd/hub. But then test fails with error displayed in command prompt like :

Date: Fri, 31 Mar 2017 03:35:04 GMT Source IP: some IP URL: POST http://some IP address/wd/hub/session  This is the IP which changes most of the time Category: Uncategorized URLs Reason: User Requested Appliance: some IP Notification: ERR _CONTINUE_UNACKNOWLEDGED I tried accessing the link manually, and it shows me Block Notification, with button for "Accept and Continue". But if i click "Accept and continue", it shows be site blocked error. Please unblock this site, so that we can unblock on automation.

So everytime i run script, it uses different IP for "URL: POST http://some IP address/wd/hub/session "

Now i cannot ask org IT to unblock each and every IP that is generated because it is huge list that changes everyday.

When i try to ping hub.browserstack.com, this is also not working.Request time out. I already have this ub.browserstack.com unblocked still i cannot access this.

So what is the issue ? how cna i overcome this problem of IP?

I used Browserstack for nightwatch also and there it works fine, it does not even look for any IP to POST and then access the remote site.

Why this only happens with Python binding?

bhavesh

Bhaveshsharma
  • 131
  • 2
  • 4

1 Answers1

0

Python binding resolves the DNS and then makes the subsequent requests over the IP . Altough we don't see other language bindings does it. I think you can try a workaround for this. You can pass resolve_ip=False when setting up the remote connection with the hub

from selenium.webdriver.remote.remote_connection import RemoteConnection
driver = webdriver.Remote(
    command_executor=RemoteConnection(hub_url, resolve_ip=False),
    desired_capabilities=desired_cap)

Let me know if it works.

Bipul Jain
  • 4,523
  • 3
  • 23
  • 26