- I can manually inspect and get the xpath of the element.
- when I get the xpath of that element, it says 1 of 1. I can create a unique Xpath for the element.
- But the selenium cannot find it.
I'm using Waits. So, there is no problem of skipping an element. But, There is also not any iframe in html. still The selenium cannot able to find the element which I've create the Xpath for. I provided a screen shot of that issue.
This is the code for that:
webEssentials.waitTillElementIsAvailableInDOM(By.xpath("//select[@name='senderId']"));
webEssentials.waitTillElementIsClickable(selectSenderId);
WebElement element = webEssentials.driver.findElement(By.xpath("//select[@name='senderId']"));
Select select = new Select(element);
select.selectByIndex(0);
webEssentials.waitTillElementIsVisible(templateZoho).
waitTillElementIsClickable(templateZoho);
WebElement element1 = webEssentials.driver.findElement(By.xpath("//select[@name='template']"));
Select select1 = new Select(element1);
select1.selectByIndex(0);
[1]: https://drive.google.com/drive/folders/1rvqESd2SE4cUqGyY7FK-8brI_q_F-6am?usp=sharing This Link having the error log of what I'm getting after the selenium cannot find the element