Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
tutorial:scripting_state_model [2020/11/25 21:33]
admin [Web App Automation]
tutorial:scripting_state_model [2020/11/25 21:36]
admin [Web App Automation]
Line 117: Line 117:
 For example: For example:
  
-   $SELENIUM.getWebDriver().findElement(org.openqa.selenium.By.id('Water').click();+   $SELENIUM.getWebDriver().findElement(org.openqa.selenium.By.id('DrinkWater').click();
  
 === Page Object===    === Page Object===   
Line 132: Line 132:
    $SYS.page('MainPage').element('DrinkWater').perform('click');    $SYS.page('MainPage').element('DrinkWater').perform('click');
        
 +The advantage of using page objects is that all element locators are organized and managed in one central place for easy maintenance.
 +
 === Find Element Locator === === Find Element Locator ===
 Web element locator can be xpath, css or by id, etc. as supported by //Selenium//. Web element locator can be xpath, css or by id, etc. as supported by //Selenium//.