org.openqa.selenium.support.pagefactory.AjaxElementLocatorFactory Java Examples
The following examples show how to use
org.openqa.selenium.support.pagefactory.AjaxElementLocatorFactory.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SeleniumIT.java From gaia with Mozilla Public License 2.0 | 5 votes |
@Test @Order(1) // this test runs first as it logs the user in ! void loginPage() { driver.get(testUrl()); driver.manage().window().setSize(new Dimension(1280,800)); var page = new LoginPage(driver); PageFactory.initElements(new AjaxElementLocatorFactory(driver, 10), page); percy.snapshot("Login Page"); page.login("admin", "admin123"); }
Example #2
Source File: SeleniumIT.java From gaia with Mozilla Public License 2.0 | 5 votes |
@Test void dashboardPage_showsModuleCount() { driver.get(testUrl()+"/dashboard"); var page = new DashboardPage(driver); PageFactory.initElements(new AjaxElementLocatorFactory(driver, 10), page); page.waitForPageLoaded(); assertEquals(3, page.modulesCount()); assertEquals(1, page.stacksCount()); assertEquals(0, page.stacksToUpdateCount()); percy.snapshot("Dashboard"); }
Example #3
Source File: SeleniumIT.java From gaia with Mozilla Public License 2.0 | 5 votes |
@Test void modulesPage_showsModules() { driver.get(testUrl()+"/modules"); var page = new ModulesPage(driver); PageFactory.initElements(new AjaxElementLocatorFactory(driver, 10), page); page.waitForPageLoaded(); assertEquals(3, page.modulesCount()); percy.snapshot("Modules"); }
Example #4
Source File: SeleniumIT.java From gaia with Mozilla Public License 2.0 | 5 votes |
@Test void modulePage_showsModuleDetails() { driver.get(testUrl()+"/modules/e01f9925-a559-45a2-8a55-f93dc434c676"); var page = new ModulePage(driver); PageFactory.initElements(new AjaxElementLocatorFactory(driver, 10), page); assertThat(page.moduleName()).isEqualTo("terraform-docker-mongo"); assertThat(page.moduleDescription()).contains("A sample terraform"); assertThat(page.terraformImageTag()).isEqualTo("0.11.14"); percy.snapshot("Module Details"); }
Example #5
Source File: SeleniumIT.java From gaia with Mozilla Public License 2.0 | 5 votes |
@Test void stackPage_showsStackDetails() { driver.get(testUrl()+"/stacks/de28a01f-257a-448d-8e1b-00e4e3a41db2/edit"); var page = new StackPage(driver); PageFactory.initElements(new AjaxElementLocatorFactory(driver, 10), page); assertThat(page.stackName()).isEqualTo("local-mongo"); percy.snapshot("Stack Details"); }
Example #6
Source File: SeleniumIT.java From gaia with Mozilla Public License 2.0 | 5 votes |
@Test void jobPage_showsJobDetails() { driver.get(testUrl()+"/stacks/de28a01f-257a-448d-8e1b-00e4e3a41db2/jobs/5e856dc7-6bed-465f-abf1-02980206ab2a"); var page = new JobPage(driver); PageFactory.initElements(new AjaxElementLocatorFactory(driver, 10), page); assertThat(page.jobDetailTitle()).isEqualTo("Job 5e856dc7-6bed-465f-abf1-02980206ab2a"); percy.snapshot("Job Details"); }
Example #7
Source File: PageBase.java From SeleniumCucumber with GNU General Public License v3.0 | 5 votes |
public PageBase(WebDriver driver) { if(driver == null) throw new IllegalArgumentException("Driver object is null"); PageFactory.initElements(new AjaxElementLocatorFactory(driver, 10), this); this.driver = driver; }
Example #8
Source File: AbstractPageObject.java From selenium-java-bootstrap with MIT License | 4 votes |
protected AbstractPageObject() { Configuration configuration = ConfigurationManager.getConfiguration(); int timeout = Integer.parseInt(configuration.timeout()); PageFactory.initElements(new AjaxElementLocatorFactory(DriverManager.getDriver(), timeout), this); }