I have Hybrid Framework using Selenium Webdriver that successfully executes test cases against Firefox, Chrome and IE. Now, I wanted to run this entire suite using Browserstack. However, when I try to access the application I make entries in the host file - the ipaddress and the host name. This makes sure that I'm hitting the exact server. Using Java code on https://www.browserstack.com/automate/java I'm able to execute a sample script. However, how can I pass the ipaddress mapping of my application to my Selenium instance when executing it on Browserstack?
The BrowserStack Local Testing feature ( https://www.browserstack.com/local-testing ) should help you test your private servers configured in your hosts file. Please follow these steps:
1) Download and execute the Local Testing binaries ( https://www.browserstack.com/local-testing#command-line ) using the following command:
./BrowserStackLocal ACCESS_KEY -forcelocal
The '-forcelocal' parameter will route all traffic via your machine which allows you to test servers configured in your hosts file on BrowserStack.
2) Add the capability 'browserstack.local'='true' in your test scripts and execute them.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.