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.