When I try to click an element hosted inside of a dialog is returning NoSuch element exeption
I've tried using active element and also switch to default content but no success. This portion of code has no iframes in the middle so a line that switchto an iframe is not needed
Here is the code:
public void editarDatosContacto(String contacto, String canal){
openEditarContacto(botonAgregarCel());
waitDefaultTime();
getDriver().switchTo().parentFrame();
getDriver().switchTo().parentFrame();
WebDriverWait block = new WebDriverWait(getDriver(),10);
block.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//*[@id=\"midialogBpf01\"]/div/object")));
WebElement modal = getDriver().findElement(By.xpath("//*[@id=\"midialogBpf01\"]/div/object"));
WebElement item;
item = modal.findElement(By.xpath("//div[@class='row']/div/div/div[1]/div/div//a[@data-toggle='modal']"));
item.click();
Select selectDato = new Select(selectTipo());
selectDato.selectByVisibleText(contacto);
}
The line that is not finding the element is this:
item = modal.findElement(By.xpath("//div[@class='row']/div/div/div[1]/div/div//a[@data-toggle='modal']"));
And this is the application html code to find the element
The app is only accessed through a vpn so I can't share it.