List of usage examples for org.openqa.selenium WebDriver getCurrentUrl
String getCurrentUrl();
From source file:org.wso2.emm.integration.ui.pages.policy.EditPolicyPage.java
License:Open Source License
public EditPolicyPage(WebDriver driver) throws IOException { this.driver = driver; this.actions = new Actions(driver); this.uiElementMapper = UIElementMapper.getInstance(); // Check that we're on the right page. if (!(driver.getCurrentUrl().contains("/policy/edit"))) { throw new IllegalStateException("This is not the edit policy"); }//from w ww . j a va 2s .c om }
From source file:org.wso2.emm.integration.ui.pages.policy.PolicyPriorityPage.java
License:Open Source License
public PolicyPriorityPage(WebDriver driver) throws IOException { this.driver = driver; this.actions = new Actions(driver); this.uiElementMapper = UIElementMapper.getInstance(); // Check that we're on the right page. if (!(driver.getCurrentUrl().contains("/policy/priority"))) { throw new IllegalStateException("This is not the policy priority page."); }//from w w w .j av a2s . c om }
From source file:org.wso2.emm.integration.ui.pages.policy.RemovePolicyPage.java
License:Open Source License
public RemovePolicyPage(WebDriver driver) throws IOException { this.driver = driver; this.uiElementMapper = UIElementMapper.getInstance(); // Check that we're on the right page. if (!(driver.getCurrentUrl().contains("/emm/policies"))) { throw new IllegalStateException("This is not the policy list"); }/*from ww w . j a v a 2 s .c o m*/ }
From source file:org.wso2.emm.integration.ui.pages.role.AddRolePage.java
License:Open Source License
public AddRolePage(WebDriver driver) throws IOException { this.driver = driver; this.uiElementMapper = UIElementMapper.getInstance(); // Check that we're on the right page. if (!(driver.getCurrentUrl().contains("role/add"))) { throw new IllegalStateException("This is not the add role page"); }//w w w . j av a 2 s . c om }
From source file:org.wso2.emm.integration.ui.pages.role.EditRolePage.java
License:Open Source License
public EditRolePage(WebDriver driver) throws IOException { this.driver = driver; this.uiElementMapper = UIElementMapper.getInstance(); // Check that we're on the right page. if (!(driver.getCurrentUrl().contains("role/edit-permission"))) { throw new IllegalStateException("This is not the edit role page"); }/* www. j av a2 s.c o m*/ }
From source file:org.wso2.emm.integration.ui.pages.role.RoleListPage.java
License:Open Source License
public RoleListPage(WebDriver driver, String url) throws IOException { this.driver = driver; this.uiElementMapper = UIElementMapper.getInstance(); // Check that we're on the right page. if (!(driver.getCurrentUrl().contains(url))) { throw new IllegalStateException("This is not the roles list page"); }/*from w ww.jav a 2 s. c o m*/ }
From source file:org.wso2.emm.integration.ui.pages.user.UserListPage.java
License:Open Source License
public UserListPage(WebDriver driver) throws IOException { this.driver = driver; this.uiElementMapper = UIElementMapper.getInstance(); if (!(driver.getCurrentUrl().contains("emm/users"))) { // Alternatively, we could navigate to the login page, perhaps logging out first throw new IllegalStateException("This is not the list users page"); }// w w w . j a v a 2 s . co m }
From source file:org.wso2.greg.integration.common.ui.page.publisher.PublisherHomePage.java
License:Open Source License
public PublisherHomePage(WebDriver driver) throws IOException { this.driver = driver; // Check that we're on the right page. if (!driver.getCurrentUrl().contains("")) { throw new IllegalStateException(driver.getCurrentUrl() + ": This is not the Publisher home page"); }//from w w w .j av a 2 s . c om log.info("Page load : Publisher Home Page"); }
From source file:org.wso2.greg.integration.common.ui.page.publisher.PublisherLoginPage.java
License:Open Source License
public PublisherLoginPage(WebDriver driver) { this.driver = driver; this.uiElementMapper = UIElementMapper.getInstance(); // Check that we're on the right page. if (!(driver.getCurrentUrl().contains(""))) { throw new IllegalStateException("This is not the publisher login page"); }// w w w . jav a2 s. co m }
From source file:org.wso2.greg.integration.common.ui.page.resourcebrowse.ResourceBrowsePage.java
License:Open Source License
public ResourceBrowsePage(WebDriver driver) throws IOException { this.driver = driver; uiElementMapper = UIElementMapper.getInstance(); //UIElementMapper uiElementMapper = UIElementMapper.getInstance(); // Check that we're on the right page. if (!(driver.getCurrentUrl().contains("resources"))) { // Alternatively, we could navigate to the login page, perhaps logging out first throw new IllegalStateException("This is not the resource Browse page"); }/*from w w w . j ava 2 s . c om*/ }