public void StartTests() { TimeOutDuration timeSpan = new TimeOutDuration(new TimeSpan(0, 0, 0, 5, 0)); standardCalculatorScreen = new StandardCalculatorScreen(); PageFactory.InitElements(TestSession, standardCalculatorScreen, new AppiumPageObjectMemberDecorator(timeSpan)); }
public AndroidJavaScriptTestPageObject(IWebDriver driver) { this.driver = driver; TimeOutDuration timeSpan = new TimeOutDuration(new TimeSpan(0, 0, 0, 5, 0)); PageFactory.InitElements(driver, this, new AppiumPageObjectMemberDecorator(timeSpan)); }
public SearchingInterceptor(IEnumerable<By> bys, IElementLocator locator, TimeOutDuration waitingTimeSpan, bool shouldCache) { this.locator = locator; this.waitingTimeSpan = waitingTimeSpan; this.shouldCache = shouldCache; this.bys = bys; waitingForElementList = new DefaultWait<IElementLocator>(locator); waitingForElementList.IgnoreExceptionTypes(new Type[] { typeof(StaleElementReferenceException)}); }
public SearchingInterceptor(IEnumerable <By> bys, IElementLocator locator, TimeOutDuration waitingTimeSpan, bool shouldCache) { this.locator = locator; this.waitingTimeSpan = waitingTimeSpan; this.shouldCache = shouldCache; this.bys = bys; waitingForElementList = new DefaultWait <IElementLocator>(locator); waitingForElementList.IgnoreExceptionTypes(new Type[] { typeof(StaleElementReferenceException) }); }
public void Before() { if (driver == null) { driver = new FirefoxDriver(); } duration = new TimeOutDuration(new TimeSpan(0, 0, 5)); PageFactory.InitElements(driver, this, new AppiumPageObjectMemberDecorator(duration)); }
public void PageTest() { TimeOutDuration timeSpan = new TimeOutDuration(new TimeSpan(0, 0, 0, 15, 0)); pageObject = new HomePage(); PageFactory.InitElements(appdriver, pageObject, new AppiumPageObjectMemberDecorator(timeSpan)); pageObject.SearchForFlights(); SearchForReturnFlight("BHX", "Birmingham", "ALC", "Alicante", "October", 14, 16, false); }
public void BeforeAll() { var capabilities = Caps.GetIosCaps(Apps.Get("iosTestApp")); var serverUri = Env.ServerIsRemote() ? AppiumServers.RemoteServerUri : AppiumServers.LocalServiceUri; _driver = new IOSDriver <AppiumWebElement>(serverUri, capabilities, Env.InitTimeoutSec); var timeSpan = new TimeOutDuration(new TimeSpan(0, 0, 0, 5, 0)); _pageObject = new IosPageObjectChecksAttributeMixOnNativeApp(); PageFactory.InitElements(_driver, _pageObject, new AppiumPageObjectMemberDecorator(timeSpan)); }
public void BeforeAll() { TimeOutDuration timeSpan = new TimeOutDuration(new TimeSpan(0, 0, 0, 5, 0)); driver = new FirefoxDriver(); driver.Url = "https://www.google.com"; AppiumPageObjectMemberDecorator decorator = new AppiumPageObjectMemberDecorator(timeSpan); PageFactory.InitElements(driver, this, decorator); links = new FoundLinks(); PageFactory.InitElements(ires, links, decorator); }
public void BeforeAll() { var capabilities = Env.ServerIsRemote() ? Caps.GetAndroidCaps(Apps.Get("androidApiDemos")) : Caps.GetAndroidCaps(Apps.Get("androidApiDemos")); var serverUri = Env.ServerIsRemote() ? AppiumServers.RemoteServerUri : AppiumServers.LocalServiceUri; _driver = new AndroidDriver <AppiumWebElement>(serverUri, capabilities, Env.InitTimeoutSec); var timeSpan = new TimeOutDuration(new TimeSpan(0, 0, 0, 5, 0)); PageFactory.InitElements(_driver, this, new AppiumPageObjectMemberDecorator(timeSpan)); }
public void BeforeAll() { DesiredCapabilities cap = new DesiredCapabilities(); cap.SetCapability(MobileCapabilityType.DeviceName, "Paul neo"); cap.SetCapability("appPackage", "com.ryanair.cheapflights"); cap.SetCapability("appActivity", "com.ryanair.cheapflights.ui.home.HomeActivity"); driver = new AndroidDriver <IWebElement>(new Uri("http://127.0.0.1:4723/wd/hub"), cap); TimeOutDuration timeSpan = new TimeOutDuration(new TimeSpan(0, 0, 0, 5, 0)); pageObject = new HomePage(); PageFactory.InitElements(driver, pageObject, new AppiumPageObjectMemberDecorator(timeSpan)); }
public void BeforeAll() { var capabilities = Env.ServerIsRemote() ? Caps.GetAndroidCaps(Apps.Get("selendroidTestApp")) : Caps.GetAndroidCaps(Apps.Get("selendroidTestApp")); var serverUri = Env.ServerIsRemote() ? AppiumServers.RemoteServerUri : AppiumServers.LocalServiceUri; _driver = new AndroidDriver <AppiumWebElement>(serverUri, capabilities, Env.InitTimeoutSec); var timeSpan = new TimeOutDuration(new TimeSpan(0, 0, 0, 5, 0)); _pageObject = new AndroidWebView(); PageFactory.InitElements(_driver, _pageObject, new AppiumPageObjectMemberDecorator(timeSpan)); _driver.StartActivity("io.selendroid.testapp", ".WebViewActivity"); }
public void BeforeAll() { DesiredCapabilities capabilities = Caps.getIos92Caps(Apps.get("iosTestApp")); if (Env.isSauce()) { capabilities.SetCapability("username", Env.getEnvVar("SAUCE_USERNAME")); capabilities.SetCapability("accessKey", Env.getEnvVar("SAUCE_ACCESS_KEY")); capabilities.SetCapability("name", "ios - actions"); capabilities.SetCapability("tags", new string[] { "sample" }); } Uri serverUri = Env.isSauce() ? AppiumServers.sauceURI : AppiumServers.LocalServiceURIForIOS; driver = new IOSDriver <AppiumWebElement>(serverUri, capabilities, Env.INIT_TIMEOUT_SEC); TimeOutDuration timeSpan = new TimeOutDuration(new TimeSpan(0, 0, 0, 5, 0)); pageObject = new IOSPageObjectChecksAttributesForNativeIOSApp(); PageFactory.InitElements(driver, pageObject, new AppiumPageObjectMemberDecorator(timeSpan)); }
public void BeforeAll() { DesiredCapabilities capabilities = Env.isSauce() ? Caps.getAndroid501Caps(Apps.get("androidApiDemos")) : Caps.getAndroid19Caps(Apps.get("androidApiDemos")); if (Env.isSauce()) { capabilities.SetCapability("username", Env.getEnvVar("SAUCE_USERNAME")); capabilities.SetCapability("accessKey", Env.getEnvVar("SAUCE_ACCESS_KEY")); capabilities.SetCapability("tags", new string[] { "sample" }); } Uri serverUri = Env.isSauce() ? AppiumServers.sauceURI : AppiumServers.LocalServiceURIAndroid; driver = new AndroidDriver <AppiumWebElement>(serverUri, capabilities, Env.INIT_TIMEOUT_SEC); TimeOutDuration timeSpan = new TimeOutDuration(new TimeSpan(0, 0, 0, 5, 0)); pageObject = new AndroidPageObjectThatChecksTouchActions(); PageFactory.InitElements(driver, pageObject, new AppiumPageObjectMemberDecorator(timeSpan)); }
public void BeforeAll() { DesiredCapabilities capabilities = Caps.getSelendroid16Caps(Apps.get("selendroidTestApp")); if (Env.isSauce()) { capabilities.SetCapability("username", Env.getEnvVar("SAUCE_USERNAME")); capabilities.SetCapability("accessKey", Env.getEnvVar("SAUCE_ACCESS_KEY")); capabilities.SetCapability("name", "android - complex"); capabilities.SetCapability("tags", new string[] { "sample" }); } Uri serverUri = Env.isSauce() ? AppiumServers.sauceURI : AppiumServers.localURI; driver = new AndroidDriver <AppiumWebElement>(serverUri, capabilities, Env.INIT_TIMEOUT_SEC); TimeOutDuration timeSpan = new TimeOutDuration(new TimeSpan(0, 0, 0, 5, 0)); pageObject = new AndroidPageObjectChecksSelendroidModeOnNativeApp(); PageFactory.InitElements(driver, pageObject, new AppiumPageObjectMemberDecorator(timeSpan)); }
public void BeforeAll() { var capabilities = Caps.GetIosCaps(Apps.Get("iosTestApp")); if (Env.ServerIsRemote()) { capabilities.AddAdditionalCapability("username", Env.GetEnvVar("SAUCE_USERNAME")); capabilities.AddAdditionalCapability("accessKey", Env.GetEnvVar("SAUCE_ACCESS_KEY")); capabilities.AddAdditionalCapability("name", "ios - actions"); capabilities.AddAdditionalCapability("tags", new[] { "sample" }); } var serverUri = Env.ServerIsRemote() ? AppiumServers.RemoteServerUri : AppiumServers.LocalServiceUri; _driver = new IOSDriver <AppiumWebElement>(serverUri, capabilities, Env.InitTimeoutSec); var timeSpan = new TimeOutDuration(new TimeSpan(0, 0, 0, 5, 0)); _pageObject = new IosPageObjectChecksAttributesForNativeIosApp(); PageFactory.InitElements(_driver, _pageObject, new AppiumPageObjectMemberDecorator(timeSpan)); }
public void BeforeAll() { DesiredCapabilities capabilities = Env.isSauce() ? Caps.getAndroid18Caps(Apps.get("selendroidTestApp")) : Caps.getAndroid19Caps(Apps.get("selendroidTestApp")); if (Env.isSauce()) { capabilities.SetCapability("username", Env.getEnvVar("SAUCE_USERNAME")); capabilities.SetCapability("accessKey", Env.getEnvVar("SAUCE_ACCESS_KEY")); capabilities.SetCapability("name", "android - webview"); capabilities.SetCapability("tags", new string[] { "sample" }); } Uri serverUri = Env.isSauce() ? AppiumServers.sauceURI : AppiumServers.localURI; driver = new AndroidDriver <AppiumWebElement>(serverUri, capabilities, Env.INIT_TIMEOUT_SEC); TimeOutDuration timeSpan = new TimeOutDuration(new TimeSpan(0, 0, 0, 5, 0)); pageObject = new AndroidWebView(); PageFactory.InitElements(driver, pageObject, new AppiumPageObjectMemberDecorator(timeSpan)); driver.StartActivity("io.selendroid.testapp", ".WebViewActivity"); }
public ElementInterceptor(IEnumerable <By> bys, IElementLocator locator, TimeOutDuration waitingTimeSpan, bool shouldCache) : base(bys, locator, waitingTimeSpan, shouldCache) { driver = WebDriverUnpackUtility.UnpackWebdriver(locator.SearchContext); }
public WindowsAlarmApp(AppiumDriver <AppiumWebElement> driver, TimeOutDuration timeout) { _driver = driver; PageFactory.InitElements(driver, this, new AppiumPageObjectMemberDecorator(timeout)); }
public ElementInterceptor(IEnumerable<By> bys, IElementLocator locator, TimeOutDuration waitingTimeSpan, bool shouldCache) : base(bys, locator, waitingTimeSpan, shouldCache) { driver = WebDriverUnpackUtility.UnpackWebdriver(locator.SearchContext); }
public ElementListInterceptor(IEnumerable<By> bys, IElementLocator locator, TimeOutDuration waitingTimeSpan, bool shouldCache) : base(bys, locator, waitingTimeSpan, shouldCache) { }
public void SearchForReturnFlight(string DepartureShortcode, string DepartureFull, string DestinationShortcode, string DestinationFull, string month, int departureday, int returnday, bool screenshots) { TimeOutDuration timeSpan = new TimeOutDuration(new TimeSpan(0, 0, 0, 15, 0)); FindFlightsPage ffp = new FindFlightsPage(); PageFactory.InitElements(appdriver, ffp, new AppiumPageObjectMemberDecorator(timeSpan)); ffp.SetDeparture(); SetAirportsPage sap = new SetAirportsPage(); PageFactory.InitElements(appdriver, sap, new AppiumPageObjectMemberDecorator(timeSpan)); sap.SelectAirport(DepartureShortcode, DepartureFull, appdriver); ffp = new FindFlightsPage(); PageFactory.InitElements(appdriver, ffp, new AppiumPageObjectMemberDecorator(timeSpan)); ffp.SetDestination(); sap = new SetAirportsPage(); PageFactory.InitElements(appdriver, sap, new AppiumPageObjectMemberDecorator(timeSpan)); sap.SelectAirport(DestinationShortcode, DestinationFull, appdriver); ffp = new FindFlightsPage(); PageFactory.InitElements(appdriver, ffp, new AppiumPageObjectMemberDecorator(timeSpan)); ffp.setDates(); DatesPage dp = new DatesPage(); PageFactory.InitElements(appdriver, dp, new AppiumPageObjectMemberDecorator(timeSpan)); dp.setDepartureDate(appdriver, departureday) .setDepartureDate(appdriver, returnday) .Continue(); ffp = new FindFlightsPage(); PageFactory.InitElements(appdriver, ffp, new AppiumPageObjectMemberDecorator(timeSpan)); ffp.LetsGo(); //new FindFlightsPage() // .SelectDepartureLocation(); //new SelectAirportPage();''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' // .SelectAirport(DepartureShortcode, DepartureFull); //if (screenshots) // app.Screenshot($"I set the departure to {DepartureFull}"); //new FindFlightsPage() // .SelectDestinationLocation(); //new SelectAirportPage() // .SelectAirport(DestinationShortcode, DestinationFull); //if (screenshots) // app.Screenshot($"I set the destination to {DestinationFull}"); //new FindFlightsPage() // .SelectDates(); //app.WaitForNoElement(x => x.Property("Text").Contains("Just a sec,")); //new SelectDatePage() // .SelectDate(14, GetNextMonth()) // .SelectDate(16, GetNextMonth()); //if (screenshots) // app.Screenshot("I set the dates between the 14th and 16th"); //new SelectDatePage().PressContinue(); //new FindFlightsPage() // .PressLetsGo(); //if (screenshots) // app.Screenshot("I submit my search"); //new FlightSearchResultsPage() // .AssertOriginAirport(DepartureFull); }
public ElementListInterceptor(IEnumerable <By> bys, IElementLocator locator, TimeOutDuration waitingTimeSpan, bool shouldCache) : base(bys, locator, waitingTimeSpan, shouldCache) { }