diff --git a/Extension/chrome_successful.zip b/Extension/chrome_successful.zip new file mode 100644 index 0000000..b162c83 Binary files /dev/null and b/Extension/chrome_successful.zip differ diff --git a/src/main/java/magicLeap.java b/src/main/java/magicLeap.java index 5e0da2c..c249d90 100644 --- a/src/main/java/magicLeap.java +++ b/src/main/java/magicLeap.java @@ -13,16 +13,17 @@ import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; +import java.io.File; import java.net.MalformedURLException; import java.net.URL; import java.util.Properties; public class magicLeap { - public String username = System.getProperty("LT_USERNAME"); - public String accesskey = System.getProperty("LT_ACCESS_KEY"); + public String username = "saurabhlambdatest"; + public String accesskey = "3822ZWc92Nlj14URYtqggRpVYHVk7pu7rs7Dqx1AjJe5NUHPRA"; public RemoteWebDriver driver; - public String gridURL = System.getProperty("grid"); + public String gridURL = "preprod-hub.lambdatest.com"; ; // "@eu-central-1-hub.lambdatest.com/wd/hub"; String status; String ResolutionValue; @@ -52,14 +53,14 @@ public class magicLeap { Long AllVersions = null; - @org.testng.annotations.Parameters(value = {"browser", "version", "platform"}) - public magicLeap(String browser, String version, String platform) { + @org.testng.annotations.Parameters(value = {"browser", "version", "platform","fixedIp"}) + public magicLeap(String browser, String version, String platform, String fixedIp) { try { - BrowserValue = System.getenv("LT_BROWSER_NAME"); - versionValue = System.getenv("LT_BROWSER_VERSION"); - PlatformValue = System.getenv("LT_OPERATING_SYSTEM"); - FixedIpValue = System.getProperty("fixedIP"); + BrowserValue = browser; + versionValue = version; + PlatformValue = platform; + FixedIpValue = fixedIp; Tunnel = System.getProperty("tunnel"); if (BrowserValue != null) { TestName = BrowserValue; @@ -82,50 +83,48 @@ public magicLeap(String browser, String version, String platform) { public void setUp() throws Exception { System.out.println(this.TestName); + for (int i =0 ; i<50;i++) { + try { - try { - - - DesiredCapabilities capabilities = new DesiredCapabilities(); - capabilities.setCapability("browserName", this.BrowserValue); - capabilities.setCapability("browserVersion", this.versionValue); - capabilities.setCapability("platform", this.PlatformValue); - capabilities.setCapability("visual", System.getProperty("visual")); - capabilities.setCapability("fixedIP", this.FixedIpValue); - - // capabilities.setCapability("accessKey", accesskey); + ChromeOptions capabilities = new ChromeOptions(); + capabilities.setCapability("browserName", this.BrowserValue); + capabilities.setCapability("browserVersion", this.versionValue); + capabilities.setCapability("platform", this.PlatformValue); + capabilities.setCapability("build", System.getProperty("buildName")); + //capabilities.setCapability("visual", System.getProperty("visual")); + capabilities.setCapability("fixedIP", FixedIpValue); + capabilities.addExtensions(new File("Extension/chrome_successful.zip")); + // capabilities.setCapability("accessKey", accesskey); - StopWatch driverStart = new StopWatch(); - driverStart.start(); + StopWatch driverStart = new StopWatch(); + driverStart.start(); - hub = "https://" + username + ":" + accesskey + "@" + gridURL + "/wd/hub"; - // hub = "http://localhost:4444/wd/hub"; + hub = "https://" + username + ":" + accesskey + "@" + gridURL + "/wd/hub"; + // hub = "http://localhost:4444/wd/hub"; - System.out.println(hub); + System.out.println(hub); - driver = new RemoteWebDriver(new URL(hub), capabilities); + driver = new RemoteWebDriver(new URL(hub), capabilities); + System.out.println(capabilities); + driverStart.stop(); - System.out.println(capabilities); - driverStart.stop(); + float timeElapsed = driverStart.getTime() / 1000f; + System.out.println("Driver initiate time" + " " + timeElapsed); + DesktopScript(); + tearDown(); + driver.quit(); + } catch (MalformedURLException e) { + System.out.println("Invalid grid URL"); + System.out.println("Please set the hub URL in the env variable"); - float timeElapsed = driverStart.getTime() / 1000f; - System.out.println("Driver initiate time" + " " + timeElapsed); - - - } catch ( - MalformedURLException e) { - System.out.println("Invalid grid URL"); - System.out.println("Please set the hub URL in the env variable"); - - } catch ( - Exception f) { - status = "failed"; - System.out.println(f); + } catch (Exception f) { + status = "failed"; + System.out.println(f); + } } - } @@ -143,53 +142,53 @@ public void DesktopScript() { driver.manage().window().maximize(); - DesignPlane Air = new DesignPlane(); - Air.plane(driver); - GoogleExperiments exp = new GoogleExperiments(); - exp.Music(driver); +// DesignPlane Air = new DesignPlane(); +// Air.plane(driver); +// GoogleExperiments exp = new GoogleExperiments(); +// exp.Music(driver); // driver.get("https://www.google.com"); - GoogleSpace space = new GoogleSpace(); - space.GSpace(driver); - TakeScreenShot scr = new TakeScreenShot(); - scr.Screenshot(driver, status); - TelescopeView view = new TelescopeView(); - view.Tele(driver); - scr.Screenshot(driver, status); - VideoUpload vid = new VideoUpload(); - vid.vidupload(driver); - - scr.Screenshot(driver, status); - - shoopingCart shop = new shoopingCart(); - shop.amazon(driver); - - scr.Screenshot(driver, status); - DesignCar car = new DesignCar(); - car.CarDesign(driver); - - scr.Screenshot(driver, status); - - RockDoor Test = new RockDoor(); - Test.RockDoorTest(driver); - - scr.Screenshot(driver, status); - SkyMap mapTest = new SkyMap(); - mapTest.SkyMapTest(driver); - - scr.Screenshot(driver, status); - - SessionTest tet = new SessionTest(); - tet.SessionLaunch(driver, status); - - scr.Screenshot(driver, status); - LambdaTestLogin login = new LambdaTestLogin(); - login.Lambda(driver, status); - - scr.Screenshot(driver, status); +// GoogleSpace space = new GoogleSpace(); +// space.GSpace(driver); +// TakeScreenShot scr = new TakeScreenShot(); +// scr.Screenshot(driver, status); +// TelescopeView view = new TelescopeView(); +// view.Tele(driver); +// scr.Screenshot(driver, status); +// VideoUpload vid = new VideoUpload(); +// vid.vidupload(driver); +// +// scr.Screenshot(driver, status); +// +// shoopingCart shop = new shoopingCart(); +// shop.amazon(driver); +// +// scr.Screenshot(driver, status); +// DesignCar car = new DesignCar(); +// car.CarDesign(driver); +// +// scr.Screenshot(driver, status); +// +// RockDoor Test = new RockDoor(); +// Test.RockDoorTest(driver); +// +// scr.Screenshot(driver, status); +// SkyMap mapTest = new SkyMap(); +// mapTest.SkyMapTest(driver); +// +// scr.Screenshot(driver, status); +// +// SessionTest tet = new SessionTest(); +// tet.SessionLaunch(driver, status); +// +// scr.Screenshot(driver, status); +// LambdaTestLogin login = new LambdaTestLogin(); +// login.Lambda(driver, status); +// +// scr.Screenshot(driver, status); //ToDo app @@ -198,28 +197,29 @@ public void DesktopScript() { StreamTest stream = new StreamTest(); stream.TestStream(driver, status); - scr.Screenshot(driver, status); - uploadTest upTest = new uploadTest(); - upTest.upload(driver, status); - scr.Screenshot(driver, status); - scr.Screenshot(driver, status); - ResolutionTest ResolutionTestObject = new ResolutionTest(); - ResolutionTestObject.Resolution(driver, ResolutionValue, status, ResolutionTotal, this.ResolutionValueCap); - scr.Screenshot(driver, status); - BadSslTest nonSecure = new BadSslTest(); - nonSecure.badSsl(driver, status); - scr.Screenshot(driver, status); - NetSpeed net = new NetSpeed(); - net.NetSpeed(driver, status, Nettotalspeedtest); - scr.Screenshot(driver, status); - GeolocationTest Geo = new GeolocationTest(); - Geo.Geolocation(driver, status, GeolocationTotal); - FakeMediaTest FK = new FakeMediaTest(); - FK.TestFakeMediaPermissions(driver); - TestCase ractice = new TestCase(); - ractice.LongCase(driver); -// HeavyTestWeb hvy = new HeavyTestWeb(); -// hvy.heavy(driver); +// scr.Screenshot(driver, status); +// uploadTest upTest = new uploadTest(); +// upTest.upload(driver, status); +// scr.Screenshot(driver, status); +// scr.Screenshot(driver, status); +// ResolutionTest ResolutionTestObject = new ResolutionTest(); +// ResolutionTestObject.Resolution(driver, ResolutionValue, status, ResolutionTotal, this.ResolutionValueCap); +// scr.Screenshot(driver, status); +// BadSslTest nonSecure = new BadSslTest(); +// nonSecure.badSsl(driver, status); +// scr.Screenshot(driver, status); +// NetSpeed net = new NetSpeed(); +// net.NetSpeed(driver, status, Nettotalspeedtest); +// scr.Screenshot(driver, status); +// GeolocationTest Geo = new GeolocationTest(); +// Geo.Geolocation(driver, status, GeolocationTotal); +// FakeMediaTest FK = new FakeMediaTest(); +// FK.TestFakeMediaPermissions(driver); +// TestCase ractice = new TestCase(); +// ractice.LongCase(driver); + // HeavyTestWeb hvy = new HeavyTestWeb(); + // hvy.heavy(driver); + driver.get("https://www.google.com/"); SuiteStop = System.currentTimeMillis(); SuiteTotalTime = SuiteStop - SuiteStart; @@ -242,7 +242,7 @@ public void tearDown() throws Exception { quitetimestart = System.currentTimeMillis(); if (driver != null) { - driver.quit(); + // driver.quit(); } diff --git a/src/test/java/4GB.xml b/src/test/java/4GB.xml new file mode 100644 index 0000000..610468e --- /dev/null +++ b/src/test/java/4GB.xml @@ -0,0 +1,262 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/test/java/8GB.xml b/src/test/java/8GB.xml new file mode 100644 index 0000000..6215f67 --- /dev/null +++ b/src/test/java/8GB.xml @@ -0,0 +1,262 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/test/java/Win10.xml b/src/test/java/Win10.xml index 1eae677..be271bf 100644 --- a/src/test/java/Win10.xml +++ b/src/test/java/Win10.xml @@ -4,73 +4,259 @@ + - - + + - - diff --git a/target/classes/BadSslTest.class b/target/classes/BadSslTest.class index b20835b..61291b9 100644 Binary files a/target/classes/BadSslTest.class and b/target/classes/BadSslTest.class differ diff --git a/target/classes/DesignCar.class b/target/classes/DesignCar.class index 8cb24c2..ae0f94b 100644 Binary files a/target/classes/DesignCar.class and b/target/classes/DesignCar.class differ diff --git a/target/classes/DesignPlane.class b/target/classes/DesignPlane.class index 0c15562..f31c2c2 100644 Binary files a/target/classes/DesignPlane.class and b/target/classes/DesignPlane.class differ diff --git a/target/classes/DownloadTest.class b/target/classes/DownloadTest.class index 4c9a3f5..89020a1 100644 Binary files a/target/classes/DownloadTest.class and b/target/classes/DownloadTest.class differ diff --git a/target/classes/FakeMediaTest.class b/target/classes/FakeMediaTest.class index 5470b70..50076af 100644 Binary files a/target/classes/FakeMediaTest.class and b/target/classes/FakeMediaTest.class differ diff --git a/target/classes/GeolocationTest.class b/target/classes/GeolocationTest.class index ca41a26..679181d 100644 Binary files a/target/classes/GeolocationTest.class and b/target/classes/GeolocationTest.class differ diff --git a/target/classes/GoogleExperiments.class b/target/classes/GoogleExperiments.class index 73f9698..9b14a5e 100644 Binary files a/target/classes/GoogleExperiments.class and b/target/classes/GoogleExperiments.class differ diff --git a/target/classes/GoogleSpace.class b/target/classes/GoogleSpace.class index fd40a8e..d1290f0 100644 Binary files a/target/classes/GoogleSpace.class and b/target/classes/GoogleSpace.class differ diff --git a/target/classes/LambdaTestLogin.class b/target/classes/LambdaTestLogin.class index 56938dc..06f6480 100644 Binary files a/target/classes/LambdaTestLogin.class and b/target/classes/LambdaTestLogin.class differ diff --git a/target/classes/NetSpeed.class b/target/classes/NetSpeed.class index 7b1539b..fcb6998 100644 Binary files a/target/classes/NetSpeed.class and b/target/classes/NetSpeed.class differ diff --git a/target/classes/ResolutionTest.class b/target/classes/ResolutionTest.class index ebf8fed..3c1f26f 100644 Binary files a/target/classes/ResolutionTest.class and b/target/classes/ResolutionTest.class differ diff --git a/target/classes/RockDoor.class b/target/classes/RockDoor.class index bc89861..76c44cd 100644 Binary files a/target/classes/RockDoor.class and b/target/classes/RockDoor.class differ diff --git a/target/classes/RunTunnelListener.class b/target/classes/RunTunnelListener.class index 78a6795..328905a 100644 Binary files a/target/classes/RunTunnelListener.class and b/target/classes/RunTunnelListener.class differ diff --git a/target/classes/ServiceWorkerTest.class b/target/classes/ServiceWorkerTest.class index 8ff8c70..8e0a901 100644 Binary files a/target/classes/ServiceWorkerTest.class and b/target/classes/ServiceWorkerTest.class differ diff --git a/target/classes/SessionTest.class b/target/classes/SessionTest.class index 0e231a8..b9e159b 100644 Binary files a/target/classes/SessionTest.class and b/target/classes/SessionTest.class differ diff --git a/target/classes/SkyMap.class b/target/classes/SkyMap.class index aabebc0..87327fa 100644 Binary files a/target/classes/SkyMap.class and b/target/classes/SkyMap.class differ diff --git a/target/classes/StreamTest.class b/target/classes/StreamTest.class index 8264f08..1ef521f 100644 Binary files a/target/classes/StreamTest.class and b/target/classes/StreamTest.class differ diff --git a/target/classes/TakeScreenShot.class b/target/classes/TakeScreenShot.class index f797b36..f1558ee 100644 Binary files a/target/classes/TakeScreenShot.class and b/target/classes/TakeScreenShot.class differ diff --git a/target/classes/TelescopeView.class b/target/classes/TelescopeView.class index 9b45c45..bac1cf7 100644 Binary files a/target/classes/TelescopeView.class and b/target/classes/TelescopeView.class differ diff --git a/target/classes/TestCase.class b/target/classes/TestCase.class index 25025f0..2bc2af7 100644 Binary files a/target/classes/TestCase.class and b/target/classes/TestCase.class differ diff --git a/target/classes/TestRunner.class b/target/classes/TestRunner.class index 0ba34e0..71c28ef 100644 Binary files a/target/classes/TestRunner.class and b/target/classes/TestRunner.class differ diff --git a/target/classes/TodoApp.class b/target/classes/TodoApp.class index 7627603..44b36b6 100644 Binary files a/target/classes/TodoApp.class and b/target/classes/TodoApp.class differ diff --git a/target/classes/TunnelTest.class b/target/classes/TunnelTest.class index c4899b5..7ee797f 100644 Binary files a/target/classes/TunnelTest.class and b/target/classes/TunnelTest.class differ diff --git a/target/classes/VideoUpload.class b/target/classes/VideoUpload.class index 637e7bb..1e41683 100644 Binary files a/target/classes/VideoUpload.class and b/target/classes/VideoUpload.class differ diff --git a/target/classes/magicLeap.class b/target/classes/magicLeap.class index b3f5309..6bb34ec 100644 Binary files a/target/classes/magicLeap.class and b/target/classes/magicLeap.class differ diff --git a/target/classes/shoopingCart.class b/target/classes/shoopingCart.class index dbd31f3..6da6dc1 100644 Binary files a/target/classes/shoopingCart.class and b/target/classes/shoopingCart.class differ diff --git a/target/classes/uploadTest.class b/target/classes/uploadTest.class index 4bc88a1..87af53f 100644 Binary files a/target/classes/uploadTest.class and b/target/classes/uploadTest.class differ