Tuesday, August 30, 2016

RecoveryScenarios

 package com.hr.generic;  
 import com.hr.automation.sahi.Button;  
 import com.hr.automation.sahi.Password;  
 import com.hr.automation.sahi.TextBox;  
 public class RecoveryScenarios extends DriverScript {  
 public boolean environmentDown()  
      {  
           return true;  
      }  
 public boolean someTechincalError()throws Throwable  
 {  
      browser.navigateTo(configProps.getProperty("URL"), true);  
      System.out.println("In someTechnicalError recovery");  
      return true;  
 }  
 public boolean unableToLoginWithCredentials() throws Throwable  
 {  
           Thread.sleep(10000);  
       browser.button("OK").click();  
       browser.navigateTo(configProps.getProperty("URL"), true);  
       if(TextBox.setText("username", configProps.getProperty("UserName"))==false)  
           {  
                return false;  
           }  
           if(Password.setPassword("password", configProps.getProperty("Password"))==false)  
           {  
                DriverScript.bResult = false;  
                return false;  
           }  
           if(Button.click("Submit")==false)  
           {  
                DriverScript.bResult = false;  
                return false;  
           }  
      return true;  
 }  
 public boolean singleUserLogin()throws Throwable  
      {  
           if(Button.click("OK")==false)  
           {  
                return false;       
           }  
           return true;  
      }  
 }  

4 comments:

  1. I would like to thank you for the efforts you have made in writing this article about Software Testing Services in Boston. I am hoping the same best work from you in the future as well Software Testing Companies in Chicago. Thank you for sharing such a great blog post Software Testing Companies in Dallas with us this blog is really informative and useful, keep it up..

    Read more - Software Testing Services in Florida

    ReplyDelete