Selenium script fails with "Element not displayed" exception

Issue #10760744 • Assigned to Mustapha J.

Details

Created
Feb 1, 2017
Privacy
This issue is public.
Reports
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

Selenium scripts always fails with “Element not displayed” exception.
I am able to do the following:
-> launch the Edge browser
-> navigate to the URL
-> give the login credentials and click Submit.
-> The login is successful.
But after this operation, no elements are identified by Webdriver.

The sample code used is:

DesiredCapabilities capability = new DesiredCapabilities();
capability = DesiredCapabilities.edge();
if(browser.equals(“edge”))
driver.get("javascript:document.getElementById(‘invalidcert_continue’).click()");

driver.switchTo().frame(“LoginFrame”);
driver.findElement(By.id(“user”)).clear();
driver.findElement(By.id(“user”)).sendKeys(new String[]{username});

driver.findElement(By.id(“user”)).clear();
driver.findElement(By.id(“user”)).sendKeys(new String[]{username});
driver.findElement(By.id(“pass”)).sendKeys(new String[]{password});
driver.findElement(By.id(“loginButton”)).click();

WebDriverWait wait = new WebDriverWait(driver,60);
driver.switchTo().defaultContent();
wait.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(“menu”));
wait.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(“frameset”));
wait.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(“DisplayField”)); /* till this step the code is executed. After this step, Edge browser is unable to find “dispdescObj” */

driver.findElement(By.id(“dispdescObj”)).clear();
driver.findElement(By.id(“dispdescObj”)).sendKeys(new String[]{"test1"});
driver.findElement(By.id(“submit”)).click();
driver.quit();

==========================================================

The same code is working for other browsers like Firefox in the same Windows 10 machine

Sample Error message:

Please find the attached file “Error_thrown_output” refers to output thrown after the execution
“Error_thrown_node” refers to output thrown in the Selenium Node

Attachments

Comments and activity

  • Microsoft Edge Team

    Changed Assigned To to “Brad E.”

    Changed Assigned To from “Brad E.” to “James M.”

    Changed Assigned To to “Mara P.”

    Changed Assigned To from “Mara P.” to “Mustapha J.”

You need to sign in to your Microsoft account to add a comment.

Sign in