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 Both sides next revision
tutorial:scripting_state_model [2020/11/25 16:53]
admin [Activating plugins]
tutorial:scripting_state_model [2020/11/25 21:33]
admin [Web App Automation]
Line 123: Line 123:
    //PAGES Script    //PAGES Script
    import org.openqa.selenium.By;    import org.openqa.selenium.By;
-   def addMainPage () { +   mainPage = $SYS.addPage('MainPage'
-      mainPage = $SYS.addPage('MainPage'+   elem = mainPage.addElement('DrinkWater', By.id('Water')) 
-      elem = mainPage.addElement('DrinkWater', By.id('Water')) +   elem.addAction('click', { elem, params -> 
-      elem.addAction('click', { elem, params -> +      $SELENIUM.getWebDriver().findElement(elem.locator).click(); 
-         $SELENIUM.getWebDriver().findElement(elem.locator).click(); +   })
-      }) +
-   } +
-   addMainPage()+
        
 Then in //TRIGGERS// tab, you can do this: Then in //TRIGGERS// tab, you can do this: