Random exception org.openqa.selenium.NoSuchElementException: No such element

By design Issue #12147236


Anda C.
May 26, 2017
This issue is public.
Found in
  • Microsoft Edge
Found in build #
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

For the same test case sometimes I receive
org.openqa.selenium.NoSuchElementException: No such element (WARNING: The server did not provide any stacktrace information).
sometimes no.

I think that there is a reason for what appear this message.

I have implicit wait for my page.


Comments and activity

  • Microsoft Edge Team

    Changed Assigned To to “Steven K.”

  • Hi Anda,

    Can you attach your webDriver repro code for this?  I want to run the same code.

    I recommend you try using an explicit wait for the form text box and the login button.


    Example in Java:

    public class Main {
        public static void main(String[] args) {
            WebDriver driver = new EdgeDriver();
            WebElement myElement = null;
            int timeOut = 5;
            WebDriverWait wait = new WebDriverWait(driver, timeOut);
            By myBy = By.id(“sb_form_q”);
            catch (Exception e)
                System.out.println(“Time-out.  WebDriverWait.until”);

    Example in C#:

                    // WebDriverWait from nuGet package OpenQA.SeleniumSupport.UI
                    IWebElement myElement = null;
                    int timeOut = 5;
                    WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(timeOut));
                    By myBy = By.Id(“sb_form_q”);
                    catch (Exception e)
                        Console.WriteLine("Time-out.  WebDriverWait.until()–> {0}", e);

    The MS Edge Team

  • Ok, I will try.

  • One reason for this error could be a redirect of Yahoo Email.
    I noticed that Yahoo redirects to URL that contains the word 'beta’.

  • Nice find.

    Also, using the “Selenium IDE” can make initial test setup easier.


  • Microsoft Edge Team

    Changed Status to “By design”

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

Sign in