0

I am trying to execute basic script on Browserstack just to get started, my script is as below:

public class BrowserStackSampleTest {
    public static final String USERNAME = "browserStackUserName";
    public static final String AUTOMATE_KEY = "browserStackAccessKey";
    public static final String URL = "https://" + USERNAME + ":" + AUTOMATE_KEY + "@hub.browserstack.com/wd/hub";

    @Test
    public void setUp() throws MalformedURLException {
        DesiredCapabilities capabilities = new DesiredCapabilities();
        capabilities.setCapability("os_version", "13.0");
        capabilities.setCapability("device", "Samsung Galaxy S23");
        capabilities.setCapability("app", "bs://url_provided_by_browserStack");
        capabilities.setCapability("project", "PCM_Krammer");
        capabilities.setCapability("name", "LoginTest");
        capabilities.setCapability("browserstack.appium_version", "1.22.0");
        capabilities.setCapability("browserstack.local", "true");
        AndroidDriver driver = new AndroidDriver(new URL(URL), capabilities);
        driver.quit();

    }
}

But I am receiving this exception:

org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure. 

I looked into every possible solution and looked into every video but nothing worked up. I am using Mac M1 machine (Additional Info, just if it could help)

Host info: host: 'tps-MacBook-Pro.local', ip: '10.5.49.103'

Also in my pom.xml file, every dependency is updated one.

1 Answer 1

0

Remove the capabilities.setCapability("browserstack.local", "true"); and try running the tests

Sign up to request clarification or add additional context in comments.

Comments

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.