Im new at automation testing and I have a question for you.
I want to use if/else statements without know any code level, for example:
1- Sometimes on page have a word like ‘KATALON’
2- If system find ‘KATALON’ word on any level, run next step.
3- If system cannot find ‘KATALON’ than click next page.
In my condition always if part executed, never goes to else and so ;when if condition fails program still search for elements in if condition and then fails obviously it wont find those elements on page -
below is my code-
"
String string_MatchRecords = WebUI.getText(findTestObject(‘Object Repository/Approce Application_GOAMTCH/total_records’))