-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Open
Labels
A-needs-triagingA Selenium member will evaluate this soon!A Selenium member will evaluate this soon!C-javaJava BindingsJava BindingsD-firefoxI-defectSomething is not working as intendedSomething is not working as intendedOS-mac
Description
Description
When trying to click/sendkey an element inside an iFrame using Selenium BiDi's input.perform(driver.getWindowHandle(), sequence), exception throws.
- Selenium points to the top level of the browser even after switch to iframe using traditional method 'driver.switchTo().frame'.
- I couldn't find the alternative to work on iframe.
Reproducible Code
try {
FirefoxOptions options = new FirefoxOptions();
options.setBrowserVersion("140.0");
options.setCapability("webSocketUrl", true);
WebDriver driver = new FirefoxDriver(options);
driver.navigate().to("https://seleniumbase.io/demo_page");
WebElement element = driver.findElement(By.cssSelector("#myFrame3"));
BrowsingContext parentContext = new BrowsingContext(driver, driver.getWindowHandle());
driver.switchTo().frame(element);
WebElement checkbox = driver.findElement(By.cssSelector("#checkBox6"));
Actions actions = new Actions(driver);
Input input = new Input(driver);
actions.moveToElement(checkbox).click();
input.perform(parentContext.getId(),actions.getSequences());
input.release(parentContext.getId());
}catch(Exception e) {
e.printStackTrace();
}
Metadata
Metadata
Assignees
Labels
A-needs-triagingA Selenium member will evaluate this soon!A Selenium member will evaluate this soon!C-javaJava BindingsJava BindingsD-firefoxI-defectSomething is not working as intendedSomething is not working as intendedOS-mac