Skip to content

Update BrowserStackSample.java #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

8ll
Copy link

@8ll 8ll commented Jan 30, 2023

package ios;
import java.net.URL;
import java.util.List;
import java.net.MalformedURLException;
import org.openqa.selenium.support.ui.WebDriverWait;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.support.ui.ExpectedConditions;
import io.appium.java_client.MobileBy;
import io.appium.java_client.ios.IOSDriver;
import io.appium.java_client.ios.IOSElement;
public class BrowserStackSample {
public static void main(String[] args) throws MalformedURLException, InterruptedException {
DesiredCapabilities caps = new DesiredCapabilities();

	// Set your access credentials
	caps.setCapability("browserstack.user", "abdullazizxs_M0W5GX");
	caps.setCapability("browserstack.key", "zS2Tit6YTbuhoCGgbB21");
	
	// Set URL of the application under test
	caps.setCapability("app", "bs://ff266c82636fc47ee3a615747bc9a7b63857a03d");
	
	// Specify device and os_version for testing
    caps.setCapability("device", "iPhone XS");
    caps.setCapability("os_version", "12");
    
	// Set other BrowserStack capabilities
	caps.setCapability("project", "First Java Project");
	caps.setCapability("build", "browserstack-build-1");
	caps.setCapability("name", "first_test");
	
	
	// Initialise the remote Webdriver using BrowserStack remote URL
	// and desired capabilities defined above
    IOSDriver<IOSElement> driver = new IOSDriver<IOSElement>(
    		new URL("http://hub-cloud.browserstack.com/wd/hub"), caps);
     
    // Write your test case statements here
    
    // Invoke driver.quit() after the test is done to indicate that the test is completed.
    driver.quit();
}

}
ghosta.dev.YAML.txt

@8ll
Copy link
Author

8ll commented Jan 30, 2023

@8ll

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant