0

I am trying to connect from Visual Studio 2015 to local BrowserStack to run my applications on a remote server and I have updated this in App.Config file as below. I managed to run them in parallel on BrowserStack cloud using public URL's, but I couldn't make my tests running locally.

<add key="build" value="specflow-browserstack" />
<add key="name" value="local_test" />
<add key="browserstack.debug" value="true" />
<add key="browserstack.local" value="true" />
<add key="browserstack.localIdentifier" value="Test123" />

And also when I launch browserstack local on browser using Chrome addon then I am seeing below error and my test is not running

System.Exception: Eror while executing BrowserStackLocal start 
{"state":"disconnected","pid":6312,"message":"Disconnected"}
at BrowserStack.BrowserStackTunnel.<>c__DisplayClass17_0.
2
  • Have you tried running their sample repo for specflow: github.com/browserstack/specflow-browserstack? Also, not sure how this relates to Chrome Add on Commented Feb 21, 2018 at 14:58
  • I tried but that one is also throwing same exception at line browserStackLocal.start(bsLocalArgs); Commented Feb 22, 2018 at 12:24

1 Answer 1

1

I Was able to solve this by below piece of code

private Process browserStackLocal;
if (capability.GetCapability("browserstack.local") != null && capability.GetCapability("browserstack.local").ToString() == "true") { 
browserStackLocal = Process.Start(@"E:\BrowserStackLocal-win32\BrowserStackLocal.exe", "--key 8EqNTv4J2C******"); Thread.Sleep(30000); }

public void Cleanup() { driver.Quit(); if (browserStackLocal != null) { browserStackLocal.Kill(); } }
Sign up to request clarification or add additional context in comments.

1 Comment

I just tried to run the BrowserStackLocal.exe locally . it's just a work around

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.