2

I have setup some tests for my node application using selenium-webdriver and browserstack. Normally When I create my driver, the first thing I do is retrieve a URL that I will doing my test on.

const driver = new webdriver.Builder()
  .usingServer('http://hub-cloud.browserstack.com/wd/hub')
  .withCapabilities(capabilities)
  .build();
driver.get('https://www.someurl.com');

However, when I deploy to Heroku and CI starts running, what URL do I point to? The review app has not been created at this time. I know I can use a chrome buildpack to run the test on heroku, but there are times we want to use different browsers which is why we are using browser stack.

Any suggestions?

Brad Taylor
  • 41
  • 1
  • 5
  • You simply need to point the tests to your internal server IP or localhost(based on your hostname). For example, you may use driver.get('http://localhost:port'); OR driver.get('http://:'); – BountyHunter Apr 05 '18 at 09:26
  • But there is not a local version of the application running at this time. When Heroku CI runs it builds the app and has it running, then runs the tests. If I have to have a local version running, what is the point of Heroku CI? – Brad Taylor Apr 05 '18 at 15:47

0 Answers0