Pilot project using Sakra Hospital | Selenium Forum
C
chaitanya kvk Posted on 16/09/2021

Selenium could not locate elements on appointment request iframe . unique locator cannot be found for the elements.

Tried using driver.switchTo().frame(frame id,name, index); but didn't work.

 


C
chaitanya kvk Replied on 16/09/2021

This issue has been resolved . Added the below line of code to get to iframe:

WebDriverWait w = new WebDriverWait(driver, Duration.ofSeconds(20));

w.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.cssSelector(" div.modal-content.req-iframe div.form-req-db div.show-iframe-appointment>iframe")));

w.until(ExpectedConditions.visibilityOf(driver.findElement(By.xpath("//section[@class='section-datepicker']//i[@class='calendar-icon']")))).click();


Related Posts