Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
ide_script [2024/01/02 19:47] – [PAGES Script] adminide_script [2024/01/02 19:49] (current) – [User Script] admin
Line 160: Line 160:
 //Steps// are annotated groovy functions as follows: //Steps// are annotated groovy functions as follows:
  
-   @STEP('Open {browserType} browser') 
-   def setBrowserType (String browserType) { 
-      $SELENIUM.setBrowserType(browserType); 
-   } 
-    
    @STEP('Goto URL {url}')    @STEP('Goto URL {url}')
    def gotoURL (String url) {    def gotoURL (String url) {
-      $SELENIUM.getWebDriver().get(url);+      $VAR.webdriver.get(url);
    }    }
        
    @STEP('Login with user id {userid} and password {password}')    @STEP('Login with user id {userid} and password {password}')
    def loginAs (String userid, String password) {    def loginAs (String userid, String password) {
-      $SELENIUM.getWebDriver().findElement(By.id('loginid')).sendKeys(userid); +      $VAR.webdriver.findElement(By.id('loginid')).sendKeys(userid); 
-      $SELENIUM.getWebDriver().findElement(By.id('password')).sendKeys(password);+      $VAR.webdriver.findElement(By.id('password')).sendKeys(password);
    }    }
        
Line 187: Line 182:
 Consider your model as a map to //GPS//, //MCase// is just a set of way points you want to visit. When you execute //MCase//, a sequence  path (trip/route) is auto-generated from your model. Consider your model as a map to //GPS//, //MCase// is just a set of way points you want to visit. When you execute //MCase//, a sequence  path (trip/route) is auto-generated from your model.
  
-   $SYS.getMCaseMgr().addMCase('MCase 1').navigateToState('V75Cents').executeTransition('add50', { state -> $SYS.log('MCase 1')}); +   $MCASE.addMCase('MCase 1').navigateToState('V75Cents').executeTransition('add50', { state -> $SYS.log('MCase 1')}); 
-   $SYS.getMCaseMgr().addMCase('MCase 3').navigateToState('V50Cents').executeTransition('add25', { state -> $SYS.log('MCase 3')}).skipToState('End');+   $MCASE.addMCase('MCase 3').navigateToState('V50Cents').executeTransition('add25', { state -> $SYS.log('MCase 3')}).skipToState('End');
  
 In additional to follow through path and execute the automation script (//TRIGGER//) along the path, you have the option to add additional automation/process script to be executed as illustrated in above example. In additional to follow through path and execute the automation script (//TRIGGER//) along the path, you have the option to add additional automation/process script to be executed as illustrated in above example.
Line 212: Line 207:
    @TRIGGER('U1062')    @TRIGGER('U1062')
    def 'Start' () {    def 'Start' () {
-      $SYS.log('adding 10 and 20: ' + $MyScript.add(10, 20)); +      $EXEC.log('adding 10 and 20: ' + $MyScript.add(10, 20)); 
-      $SYS.log('multiplying 10 and 20: ' + $MyScript.multiply(10, 20));+      $EXEC.log('multiplying 10 and 20: ' + $MyScript.multiply(10, 20));
    }    }