Web

Common Functions

Method Name Parameter Return Type Usage Example
funcGetWebdriver WebDriver To get webdriver public static WebDriver driver = BrowserDriver.funcGetWebdriver()
launchWebURL strURL: String void To load browser with url BrowserDriver.launchWebURL("https://ui.freecrm.com");
closeBrowser void To close web browser BrowserDriver.closeBrowser()
quitBrowser void To quit web browser BrowserDriver.quitBrowser()
getDriver WebDriver To get driver driver= BrowserDriver.getDriver();
pageWait void To wait for page load BrowserDriver.pageWait();
webElementToBy webEle : WebElement By By byEle = WebHandlers.webElementToBy(objTable);
enterText locator : WebElement, value : String void For type action WebHandlers.enterText(locator, value)
click locator : WebElement void For click action WebHandlers.click(locator)
clickByJsExecutor locator : By void
verifyText locator : WebElement, strVText : String boolean To verify Text WebHandlers.verifyText(locator,strVText)
compareText strActualText : String,strCompText : String boolean To compare two text WebHandlers.compareText(strActualText,strCompText)
existText locator : WebElement boolean To check whether text value exist for the locator WebHandlers.existText(locator)
clearText locator : WebElement void To clear text WebHandlers.clearText(locator)
objDisabled locator : WebElement boolean To check the locator/object is disabled WebHandlers.objDisabled(locator)
fetchPropertyVal locator : WebElement, property: String String To fetch the property value by property name for the locator WebHandlers.fetchPropertyVal(locator,property)
verifyProperty locator : WebElement, property: String expected : String To verify the property value with expected value WebHandlers.verifyProperty(locator, property,expected)
doubleClick locator : WebElement void For double click action WebHandlers.doubleClick(locator)
rightClick locator : WebElement void For right click action WebHandlers.rightClick(locator)
objExists locator : WebElement To check the locator/object exist WebHandlers.objExists(locator)
chkboxIsChecked locator : WebElement boolean To verify the checkbox is checked WebHandlers.chkboxIsChecked(locator)
radiobtnNotChecked locator : WebElement boolean To verify the radio button is checked or not WebHandlers.radiobtnNotChecked(locator)
radioBtnIsSelected locator : WebElement boolean WebHandlers.radioBtnIsSelected(locator)
radioBtnIsNotSelected locator : WebElement boolean WebHandlers.radioBtnIsNotSelected(locator)
sltCtrlReadAllVal locator : WebElement HashMap<Integer,String> To get list of values of select control WebHandlers.sltCtrlReadAllVal(locator)
dropDownGetCurrentSelection locator : WebElement String To get the current value selected in a dropdown control WebHandlers.dropDownGetCurrentSelection(locator)
dropDownSelectByIndex locator : WebElement, index : int void To select the value by index in dropdown WebHandlers.dropDownGetCurrentSelection(locator, index)
dropDownSetByVal locator : WebElement, value:String boolean To select the value in dropbox by passing value. Returns true if the value exist in dropdown list WebHandlers.dropDownSetByVal(locator, value)
dropDownSetByIndex locator : WebElement, index : int boolean To select the value in dropbox by passing value. Returns true if the value exist for the given index in dropdown list WebHandlers.dropDownSetByIndex(locator, index)
switchToFrame locator : WebElement void To switch to a new frame WebHandlers.switchToFrame(locator)
swithBackFromFrame void To Switch back to default frame WebHandlers.swithBackFromFrame()
multiDeselectByText locator : WebElement, options:String boolean To deselect the given text in select control WebHandlers.multiDeselectByText(locator,options)
multiDeselectAll locator : WebElement boolean To deselect the values in select control WebHandlers.multiDeselectAll()
multiSelectByText locator : WebElement, options:String boolean To select value by text multiselect control WebHandlers.multiSelectByText(locator,options)
multiSelectByIndex locator : WebElement, indexes : int boolean To select value by text in multiselect control WebHandlers.multiSelectByIndex(locator,indexes)
optionsSplit options:String ArrayList<String> ArrayList indexList = null; indexList = optionsSplit(indexes);
getTblHeaderVal locator : WebElement LinkedHashMap<String, Integer> To fetch table headers values WebHandlers.getTblHeaderVal(locator)
getTblBodyVal locator : WebElement LinkedHashMap<String, Integer> To fetch table body values WebHandlers.getTblBodyVal(locator)
getTblTdVal locator : WebElement, rowIndex: int, colIndex : int String To gettable cell value by row and column index WebHandlers.getTblTdVal(locator,rowIndex,colIndex)
getTblThVal locator : WebElement, rowIndex: int, colIndex : int String To get table column header value by row and column index WebHandlers.getTblThVal(locator,rowIndex,colIndex)
getFirstIndexofVal locator : WebElement, value:String String String index = getFirstIndexofVal(locator, value);
getColMapByHdrVal locator : WebElement, colHeader:String LinkedHashMap<String, String> To get column values by header value WebHandlers.getColMapByHdrVal(locator,colHeader)
getRowMapByIndxVal locator : WebElement, rowIndex:int LinkedHashMap<String, String> To get row values by index value WebHandlers.getRowMapByIndxVal(locator,rowIndex)
getRowMapByHdrVal locator : WebElement, rowHeader:String LinkedHashMap<String, String> To get row values by header value WebHandlers.getRowMapByHdrVal(locator,rowHeader)
getColMapByIndxVal locator : WebElement, colIndex:int LinkedHashMap<String, String> To get column values by index value WebHandlers.getColMapByIndxVal(locator,colIndex)
TblCelChkboxClick tbllocator : WebElement, value:String,chkColIndex:int void To perform click action in checkbox inside a table cell WebHandlers.TblCelChkboxClick(tbllocator,value,chkColIndex)
TblCelEleClick tbllocator :WebElement ,value:String , chkColIndex: int, eleXpath:String void To perform click action inside a table cell WebHandlers.TblCelEleClick(tbllocator,value,chkColIndex,eleXpath)
TblCelLinkClick locator : WebElement, value:String void To perform click a hyperlink inside a table cell WebHandlers.TblCelLinkClick(locator,value)
uploadFile fileNameWithExtention : String void To upload a file WebHandlers.uploadFile(fileNameWithExtention)
divSpanListBox locator : WebElement, value:String void To select value from list box which is built on div and span WebHandlers.divSpanListBox(locator,value)

Selenoid Common Functions

Method Name Parameter Return Type Usage Example
funcSelenoidWebdriver WebDriver To get Selenoid Webdriver public static WebDriver driver = BrowserDriver.funcSelenoidWebdriver()
getSelenoidDriverParallel browser:String,version:String WebDriver To get Selenoid Webdriver driver = BrowserDriver.getSelenoidDriverParallel("chrome","76.0");
getSelenoidDriverSeq browser:String,browserVersion:String WebDriver To get Selenoid webdriver BrowserDriver.driver = BrowserDriver.getSelenoidDriverSeq(versionList[0], version);

Selenium Common Functions

Method Name Parameter Return Type Usage Example
getSeleniunGridDriver browser:String void To get selenium grid driver BrowserDriver.getSeleniunGridDriver("chrome");

SauceLab Common Functions

Method Name Parameter Return Type Usage Example
funcSauceLabWebdriver WebDriver To get sauceLab webdriver public static WebDriver driver = SauceDriver.funcSauceLabWebdriver();