-2

Just looking for a help in resolving exception error while connecting to browser stack using selenium code.

1.WebDriver driver = new RemoteWebDriver(new URL(URL), caps); in this line we are always getting unreachable browser exception, url is https://" + USERNAME + ":" + AUTOMATE_KEY + "@hub-cloud.browserstack.com/wd/hub, where username and automate key is passed as string value, running the script in office network.

2.I tried reaching network team, we are able to see success in request logs(through ports 443 and 80)- we didn't find any issue there.

3.Network team figured out the request is very fast and need to analyse packet rates.

4.can anyone help me in this if they have faced in past and resolved that could be a great help.

Thanks in Advance.

  • what do your ping and traceroute result for hub-cloud.browserstack.com say? Have you tried accessing hub-cloud.browserstack.com in your browser? – BountyHunter Mar 06 '18 at 06:11
  • got the solution.//For HTTPS System.getProperties().put("https.proxyHost", ""); System.getProperties().put("https.proxyPort", ""); System.getProperties().put("https.proxyUser", ""); System.getProperties().put("https.proxyPassword", ""); – sanjith shetty Mar 07 '18 at 03:14
  • just add the proxy before running your script from office network. – sanjith shetty Mar 07 '18 at 03:17
  • Can you put your findings as an actual answer instead of a comment. – SiKing Mar 07 '18 at 18:27

1 Answers1

0

Before running sample script from browser stack for mobile browser.

Step1: Check with you office network team, if the webdriver/hub request was successfully gone out of your office network without any blockage (If there is a blockage then raise the ticket for unblocking).

Step2:

if there is no blockage then use the below code to your sample code and run the same with proxy details.

For HTTPS System.getProperties().put("https.proxyHost", "");

System.getProperties().put("https.proxyPort", "");

System.getProperties().put("https.proxyUser", "");

System.getProperties().put("https.proxyPassword", "");