I want to click an element inside a iframe
code trial :
driver.switchTo().frame("payment_page");
WebElement cardType = new WebDriverWait(driver, 10).until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//*[@id=\"AMEX-paymenttype\"]")));
cardType.click();
Error Msg: org.openqa.selenium.support.ui.ExpectedConditions findElement WARNING: WebDriverException thrown by findElement(By.xpath: //*[@id="AMEX-paymenttype"])