New answers tagged page-objects
0
I agree with the other commenters that the Page Object Model is a great way to structure test code for interacting with the page, however, for the tests themselves, I recommend writing tests for functionality instead of page-by-page.
Tests aren't about validating pages, after all. All of your users and most of your staff don't care which page something is ...
0
Please try to this one
package com.tests;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.testng.Assert;
import org.testng.annotations.Test;
public class IfExampleSelenium
{
@Testpublic void testPageTitle()
{
System.out.println("Launching Firefox browser..");
WebDriver driver = new FirefoxDriver();
...
Top 50 recent answers are included
Related Tags
page-objects × 163selenium-webdriver × 146
automated-testing × 57
java × 42
page-factory × 18
test-automation-framework × 16
c# × 14
selenium2 × 10
test-design × 10
browser-automation × 10
xpath × 7
javascript × 7
cucumber × 6
testng × 5
ruby × 5
pom × 5
python × 4
protractor × 4
selenium3 × 4
exception × 3
testcomplete × 3
test-architecture × 3
excel × 2
data-driven × 2
code-review × 2