When I write an if Statement, and I clearly know that the conditions I have set within that statement are not met and thus the code in this if statement should not be executed. Katalon Studio is disregarding the conditions and still executing the code within. Can Someone help, please? Am I doing something wrong?
Here is my case:
WebDriver driver = DriverFactory.getWebDriver()
List profilesList = driver.findElements(By.xpath(’//a[@class=“tour__profile-name”]’))
if(profilesList.size() > 2) {
WebUI.click(findTestObject(‘Object Repository/CTCA/People/a_Third Profile Name’)
WebUI.verifyElementText(findTestObject(‘Object Repository/CTCA/People/Profile/div_Account Name under the traveler name’), ‘Billionaires’)
WebUI.click(findTestObject(‘Object Repository/CTCA/People/Profile/div_Back’))
}
*** profilesList.size() = 2