Checkout our demo site to practice selenium https://magento.softwaretestingboard.com/
Working on converting all my previous projects into page objects driven. Have a code in the test class like the following.
WebElement header = driver.findElement(By.className("row-fluid")); WebElement our_header = header.findElement(By.tagName("h3"));
how do I write this in the new test class when utilizing page objects?
You can use something like this.
public static WebElement getHeader(WebDriver driver){ WebElement header = driver.findElement(By.className("row-fluid")); return header.findElement(By.tagName("h3")); }
public static WebElement getHeader(WebDriver driver){
}
This site is for software testing professionals, where you can ask all your questions and get answers from 1300+ masters of the profession. Click here to submit yours now!
1.4k questions
1.6k answers
866 comments
1.9k users