Comment #2 on issue 3470 by JanecekP...@seznam.cz: CSS Selector raises
WebDriverException instead of NoSuchElementException when element not found
http://code.google.com/p/selenium/issues/detail?id=3470

A stacktrace showing the issue on Windows XP SP3, Selenium 2.21.0, Internet
Explorer 8, searching for an element by XPath (so no CSS selector as OP
stated):

Error: org.openqa.selenium.WebDriverException (Unable to find element with
xpath == //*[contains(text(),'Align') or contains(@value,'Align')]
(WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 688 milliseconds
Build info: version: '2.2.1', revision: '16551', time: '2012-04-11 21:42:35'
System info: os.name: 'Windows XP', os.arch: 'x86', os.version: '5.1',
java.version: '1.6.0_22'
Driver info: driver.version: RemoteWebDriver)

sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
java.lang.reflect.Constructor.newInstance(Unknown Source)
org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:175)
org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:128)
org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:459)
org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:227)
org.openqa.selenium.remote.RemoteWebDriver.findElementByXPath(RemoteWebDriver.java:312)
org.openqa.selenium.By$ByXPath.findElement(By.java:344)
org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:219)

--
You received this message because you are subscribed to the Google Groups "Selenium Developer Activity" group.
To post to this group, send email to selenium-developer-activity@googlegroups.com.
To unsubscribe from this group, send email to selenium-developer-activity+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-developer-activity?hl=en.

Search Discussions

  • Selenium at May 11, 2012 at 2:03 pm
    Updates:
      Status: NeedsClarification
      Labels: Component-WebDriver Lang-Java

    Comment #3 on issue 3470 by barancev: CSS Selector raises
    WebDriverException instead of NoSuchElementException when element not found
    http://code.google.com/p/selenium/issues/detail?id=3470

    Please provide a reduced test case (WebDriver code with accompanying HTML
    demo page) to reproduce the issue.

    This is not a common issue, it can be related to your page or the locator
    you use.
    Here is an example that shows that selenium throws a valid exception:

    RemoteWebDriver driver = new InternetExplorerDriver();
    driver.get("http://localhost/");
    driver.findElement(By.cssSelector("test"));

    --->

    Exception in thread "main" org.openqa.selenium.NoSuchElementException:
    Unable to find element with css selector == test (WARNING: The server did
    not provide any
       stacktrace information)
    Command duration or timeout: 304 milliseconds
    For documentation on this error, please visit:
    http://seleniumhq.org/exceptions/no_such_element.html
    Build info: version: '2.19.0', revision: '15849', time: '2012-02-08
    16:10:57'
    System info: os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1',
    java.version: '1.6.0_30'
    Driver info: driver.version: RemoteWebDriver
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
    Source)
      at java.lang.reflect.Constructor.newInstance(Unknown Source)
      at
    org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:170)
      at
    org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:123)
      at
    org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:439)
      at
    org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:226)
      at
    org.openqa.selenium.remote.RemoteWebDriver.findElementByCssSelector(RemoteWebDriver.java:291)
      at org.openqa.selenium.By$ByCssSelector.findElement(By.java:407)
      at
    org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:218)
      at org.openqa.selenium.example.Sample.main(Sample.java:50)


    --
    You received this message because you are subscribed to the Google Groups "Selenium Developer Activity" group.
    To post to this group, send email to selenium-developer-activity@googlegroups.com.
    To unsubscribe from this group, send email to selenium-developer-activity+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/selenium-developer-activity?hl=en.
  • Selenium at May 11, 2012 at 2:27 pm
    Comment #4 on issue 3470 by JanecekP...@seznam.cz: CSS Selector raises
    WebDriverException instead of NoSuchElementException when element not found
    http://code.google.com/p/selenium/issues/detail?id=3470

    That's the pickle - it happens only sometimes (but at the same place,
    that's true) and I can't get my hands around it. I'll try to reduce the
    test case in the upcoming days. Thanks for looking at it, anyway!
    (Also, could you please rename the topic header, as I proved that it
    happens with XPath selectors, too?)

    To the OP: What did precede the failing call? In our case, it usually is
    async redirect that hasn't completed yet...

    --
    You received this message because you are subscribed to the Google Groups "Selenium Developer Activity" group.
    To post to this group, send email to selenium-developer-activity@googlegroups.com.
    To unsubscribe from this group, send email to selenium-developer-activity+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/selenium-developer-activity?hl=en.
  • Selenium at May 11, 2012 at 2:33 pm
    Comment #5 on issue 3470 by richard....@ca.com: CSS Selector raises
    WebDriverException instead of NoSuchElementException when element not found
    http://code.google.com/p/selenium/issues/detail?id=3470

    I also managed to reproduce with an xpath selector against the same element
    as I originally saw the problem with the css selector some time ago.
    I'm testing a proprietary system and can't just paste the code I'm afraid
    and it isn't easy to just isolate the offending element.

    --
    You received this message because you are subscribed to the Google Groups "Selenium Developer Activity" group.
    To post to this group, send email to selenium-developer-activity@googlegroups.com.
    To unsubscribe from this group, send email to selenium-developer-activity+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/selenium-developer-activity?hl=en.
  • Selenium at Jun 11, 2012 at 11:26 am
    Comment #6 on issue 3470 by jste...@redhat.com: CSS Selector raises
    WebDriverException instead of NoSuchElementException when element not found
    http://code.google.com/p/selenium/issues/detail?id=3470

    I've faced the same problem with IE 9. All tests were executed, browser
    redirected, but all of them failed because of the same Exception as is
    mentioned here (org.openqa.selenium.WebDriverException (Unable to find
    element with xpath == //*[contains(text(),'some text')). The problem was,
    that JavaScript was disabled in browser. If you are using IE 9 (don't know
    if developers tools are in previous versions too), try to press F12 and
    check if in the pop-up developer tools window is unchecked option Disabled
    Script.
    --
    You received this message because you are subscribed to the Google Groups "Selenium Developer Activity" group.
    To post to this group, send email to selenium-developer-activity@googlegroups.com.
    To unsubscribe from this group, send email to selenium-developer-activity+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/selenium-developer-activity?hl=en.
  • Selenium at Jul 23, 2012 at 12:49 pm
    Comment #7 on issue 3470 by abhishek...@gmail.com: CSS Selector raises
    WebDriverException instead of NoSuchElementException when element not found
    http://code.google.com/p/selenium/issues/detail?id=3470

    I'm facing the same problem with IE 8. Please find the details below:
    Build info: version: '2.24.1', revision: '17205', time: '2012-06-19
    17:28:14'
    System info: os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1',
    java.version: '1.6.0_25'
    Driver info: driver.version: RemoteWebDriver

    The same code is performing well in a different system with same
    configuration.

    --
    You received this message because you are subscribed to the Google Groups "Selenium Developer Activity" group.
    To post to this group, send email to selenium-developer-activity@googlegroups.com.
    To unsubscribe from this group, send email to selenium-developer-activity+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/selenium-developer-activity?hl=en.
  • Selenium at Jul 23, 2012 at 12:48 pm
    Comment #8 on issue 3470 by abhishek...@gmail.com: CSS Selector raises
    WebDriverException instead of NoSuchElementException when element not found
    http://code.google.com/p/selenium/issues/detail?id=3470

    I'm facing the same problem with IE 8. Please find the details below:
    Build info: version: '2.24.1', revision: '17205', time: '2012-06-19
    17:28:14'
    System info: os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1',
    java.version: '1.6.0_25'
    Driver info: driver.version: RemoteWebDriver

    The same code is performing well in a different system with same
    configuration.

    --
    You received this message because you are subscribed to the Google Groups "Selenium Developer Activity" group.
    To post to this group, send email to selenium-developer-activity@googlegroups.com.
    To unsubscribe from this group, send email to selenium-developer-activity+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/selenium-developer-activity?hl=en.
  • Selenium at Jul 23, 2012 at 1:24 pm
    Comment #9 on issue 3470 by barancev: CSS Selector raises
    WebDriverException instead of NoSuchElementException when element not found
    http://code.google.com/p/selenium/issues/detail?id=3470

    What we really need is a reproduction case, not configuration details.

    I've provided a sample that shows this feature works *in general* (see
    comment 3).

    Obviousely there is an edge case where it does not work, and we need to
    catch it.

    --
    You received this message because you are subscribed to the Google Groups "Selenium Developer Activity" group.
    To post to this group, send email to selenium-developer-activity@googlegroups.com.
    To unsubscribe from this group, send email to selenium-developer-activity+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/selenium-developer-activity?hl=en.
  • Selenium at Sep 3, 2012 at 2:39 pm
    Comment #10 on issue 3470 by morgan.c...@gmail.com: CSS Selector raises
    WebDriverException instead of NoSuchElementException when element not found
    http://code.google.com/p/selenium/issues/detail?id=3470

    The attached testcase reproduces the issue.

    This also reproduces bug
    http://code.google.com/p/selenium/issues/detail?id=3800 which is the same
    issue with the difference of using findElement instead of findElements


    The issue seems to be that the current page changes while findElement(s) is
    running.

    Attachments:
      Test.java 668 bytes
      test1.html 266 bytes
      iedriver.log 9.5 KB

    --
    You received this message because you are subscribed to the Google Groups "Selenium Developer Activity" group.
    To post to this group, send email to selenium-developer-activity@googlegroups.com.
    To unsubscribe from this group, send email to selenium-developer-activity+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/selenium-developer-activity?hl=en.
  • Selenium at Sep 3, 2012 at 2:42 pm
    Comment #11 on issue 3470 by morgan.c...@gmail.com: CSS Selector raises
    WebDriverException instead of NoSuchElementException when element not found
    http://code.google.com/p/selenium/issues/detail?id=3470

    I'm also getting JavaScript errors in the JS console when this happens:


    Message: Can't execute code from a freed script
    Line: 1
    Char: 72
    Code: 0
    URI: http://xx.xx.xx.xx/xxxx

    --
    You received this message because you are subscribed to the Google Groups "Selenium Developer Activity" group.
    To post to this group, send email to selenium-developer-activity@googlegroups.com.
    To unsubscribe from this group, send email to selenium-developer-activity+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/selenium-developer-activity?hl=en.
  • Selenium at Feb 20, 2013 at 12:08 pm
    Comment #12 on issue 3470 by JanecekP...@seznam.cz: CSS Selector raises
    WebDriverException instead of NoSuchElementException when element not found
    http://code.google.com/p/selenium/issues/detail?id=3470

    Since bug 3800 is (hopefully) fixed, is this fixed, too? I can't reproduce
    the bug via the testcase in comment #10 (though I haven't really been able
    to reproduce it with an old version, either).

    --
    You received this message because this project is configured to send all
    issue notifications to this address.
    You may adjust your notification preferences at:
    https://code.google.com/hosting/settings

    --
    You received this message because you are subscribed to the Google Groups "Selenium Developer Activity" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to selenium-developer-activity+unsubscribe@googlegroups.com.
    To post to this group, send email to selenium-developer-activity@googlegroups.com.
    Visit this group at http://groups.google.com/group/selenium-developer-activity?hl=en.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Selenium at Mar 24, 2013 at 12:14 pm
    Comment #13 on issue 3470 by a.u.savchuk: CSS Selector raises
    WebDriverException instead of NoSuchElementException when element not found
    http://code.google.com/p/selenium/issues/detail?id=3470

    Hi!

    At this moment at my machine (Win7 x64) i see:
    * 38 errors with incorrect exception types for local drivers (4 from 5,
    Safari is not supported yet)
    * 44 errors with incorrect exception types for remote drivers (5 from 5)

    Error means that type of raised exception is out of list
    (NoSuchElementException, NoSuchWindowException, InvalidSelectorException).
    This list is made from WD protocol (with one fix - XpathInvalidError
    replaced by InvalidSelectorException).

    NOTE: this is for python binding. I think for another bindings list of
    errors will be different.
    It would be great if someone create tests for each binding using my scripts
    as examples. :)

    Selenium version is 2.31. Chromedriver and IEDriverServer are last from
    Downloads. Browsers list:
    * IE 9.0.xxx x32
    * FF 19.0.2
    * Chrome 25.0.xxx
    * Opera 12.14
    * Safari 5.1.7

    The found errors are attached as 2 files: remote_errors and local_errors. 2
    test scripts are attached too.

    Format of each error (2 variants for single element and multiple elements
    differs only by S):

    <driver id>: Non correct exception <exception type>()(<exception message>)
    is occured during search element by: (<selector type>, <selector value>)
    <driver id>: Non correct exception <exception type>()(<exception message>)
    is occured during search elements by: (<selector type>, <selector value>)


    Attachments:
      remote_test.py 2.0 KB
      local_test.py 1.8 KB
      remote_errors.txt 28.3 KB
      local_errors.txt 7.8 KB

    --
    You received this message because this project is configured to send all
    issue notifications to this address.
    You may adjust your notification preferences at:
    https://code.google.com/hosting/settings

    --
    You received this message because you are subscribed to the Google Groups "Selenium Developer Activity" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to selenium-developer-activity+unsubscribe@googlegroups.com.
    To post to this group, send email to selenium-developer-activity@googlegroups.com.
    Visit this group at http://groups.google.com/group/selenium-developer-activity?hl=en.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Selenium at Oct 29, 2013 at 11:06 pm
    Updates:
      Status: New

    Comment #14 on issue 3470 by barancev: CSS Selector raises
    WebDriverException instead of NoSuchElementException when element not found
    http://code.google.com/p/selenium/issues/detail?id=3470

    (No comment was entered for this change.)

    --
    You received this message because this project is configured to send all
    issue notifications to this address.
    You may adjust your notification preferences at:
    https://code.google.com/hosting/settings

    --
    You received this message because you are subscribed to the Google Groups "Selenium Developer Activity" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to selenium-developer-activity+unsubscribe@googlegroups.com.
    To post to this group, send email to selenium-developer-activity@googlegroups.com.
    Visit this group at http://groups.google.com/group/selenium-developer-activity.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Selenium at Jan 2, 2014 at 10:10 am
    Updates:
      Status: Fixed
      Labels: -GettingInvolved

    Comment #15 on issue 3470 by barancev: CSS Selector raises
    WebDriverException instead of NoSuchElementException when element not found
    http://code.google.com/p/selenium/issues/detail?id=3470

    IE and Firefox are green in the trunk.

    Opera (deprecated) and Chrome have failing tests, see @Ignore annotations
    in ElementFindingTest

    --
    You received this message because this project is configured to send all
    issue notifications to this address.
    You may adjust your notification preferences at:
    https://code.google.com/hosting/settings

    --
    You received this message because you are subscribed to the Google Groups "Selenium Developer Activity" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to selenium-developer-activity+unsubscribe@googlegroups.com.
    To post to this group, send email to selenium-developer-activity@googlegroups.com.
    Visit this group at http://groups.google.com/group/selenium-developer-activity.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupselenium-developer-activity @
categoriesselenium
postedMay 2, '12 at 7:40p
activeJan 2, '14 at 10:10a
posts14
users1
websiteseleniumhq.org

1 user in discussion

Selenium: 14 posts

People

Translate

site design / logo © 2021 Grokbase