diff --git a/.gitignore b/.gitignore deleted file mode 100644 index eed7565..0000000 --- a/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -AssertionSample.java -DataEncode.java -FileUploadSample.java -FireFoxOp.java -GetUrl.java -IosTabSwitch.java -package-info.java -SafariCookie.java -Testing.java -Ticket512729.java -Ticket534939.java -Ticket634946.java -Ticket636492.java \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..999019e --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# quick-BStack-case-code \ No newline at end of file diff --git a/SafariPopup.java b/SafariPopup.java deleted file mode 100644 index 6359712..0000000 --- a/SafariPopup.java +++ /dev/null @@ -1,44 +0,0 @@ -package Tickets; - -import java.net.URL; -import java.util.HashMap; - -import org.openqa.selenium.OutputType; -import org.openqa.selenium.TakesScreenshot; -import org.openqa.selenium.WebDriver; -import org.openqa.selenium.remote.Augmenter; -import org.openqa.selenium.remote.DesiredCapabilities; -import org.openqa.selenium.remote.RemoteWebDriver; - -public class SafariPopup { - - public static final String AUTOMATE_USERNAME = "username"; - public static final String AUTOMATE_ACCESS_KEY = "accesskey"; - public static final String URL = "https://" + AUTOMATE_USERNAME + ":" + AUTOMATE_ACCESS_KEY - + "@hub-cloud.browserstack.com/wd/hub"; - - public static void main(String[] args) throws Exception { - - DesiredCapabilities capabilities = new DesiredCapabilities(); - HashMap browserstackOptions = new HashMap(); - browserstackOptions.put("osVersion", "14"); - browserstackOptions.put("deviceName", "iPhone 11"); - browserstackOptions.put("realMobile", "true"); - browserstackOptions.put("appiumVersion", "1.22.0"); - browserstackOptions.put("local", "false"); - browserstackOptions.put("buildName", "simBuild"); - browserstackOptions.put("sessionName", "safari-cookies"); - capabilities.setCapability("bstack:options", browserstackOptions); - capabilities.setCapability("safariAllowPopups", true); - WebDriver driver = new RemoteWebDriver(new URL(URL), capabilities); - driver.get("https://thenextstreet-staging.netfluence.io/student-enrollment-page"); - Thread.sleep(3000); - driver = (RemoteWebDriver) new Augmenter().augment(driver); - ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE); - - //Thread.sleep(2000); - - driver.quit(); - } - -}