Mohd Faiz:
In mobile app a bottom sheet open with Ad only two is there one appears at a time on opening the app interactive element is present in those is only button on each one i have to click on those buttons for closing the bottom sheet but in if else conditon if first one appears first it works with if conditon and if second one appears it throws exception for first button
The condition could be simplified to
var locator = By.xpath("//android.widget.TextView[@text = \"Explore Class-wise buckets!\" or @text = \"Get Started!\"]"));
driver.findElement(locator).click();
1 Like
Thank you so much for the help