Skip to content
This repository has been archived by the owner before Nov 9, 2022. It is now read-only.

Unable to find elements in some pages, but can find in others [Windows XP, Internet Explorer 8, Selenium-java] #2973

Closed
lukeis opened this issue Mar 3, 2016 · 5 comments

Comments

@lukeis
Copy link
Member

lukeis commented Mar 3, 2016

Originally reported on Google Code with ID 2973

What steps will reproduce the problem?
1. Run the attached java code
2. Change the code line that has the code "driver.get("www.gmail.com");" to "driver.get("www.google.com");"

What is the expected output? What do you see instead?

In the first run, what was supposed to appear is in the attached .txt file(example
www.gmail.com). Instead, I get a NullPointerException, because the method driver.findElements(By.xpath("//INPUT"));
returns null instead of a list.

In the second run, it was supposed to have the same behaviour as the first (a nullpointerexception),
but instead I get the correct output (example www.google.com).


Selenium version: selenium-java-2.13.0
OS: Windows XP
Browser: Internet Explorer
Brower version: 8
Driver: InternetExplorerDriver

I realised that for gmail.com, the findElement method is not working under these conditions,
despite the By method I use.For www.google.com, I can find any element I wish.

Additional Info:
I ran both tests on Internet Explorer 9 on Windows 7 and both passed. This problem
does not happen with FirefoxDriver, in any version.

Reported by bernardo.mendonca@knowledgeworks.pt on 2011-11-30 20:46:56


- _Attachment: [TestInternetExploderDriverWithXPath.java](https://storage.googleapis.com/google-code-attachments/selenium/issue-2973/comment-0/TestInternetExploderDriverWithXPath.java)_ - _Attachment: [correctOutputWithIE9OnWindows7.txt](https://storage.googleapis.com/google-code-attachments/selenium/issue-2973/comment-0/correctOutputWithIE9OnWindows7.txt)_
@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Reported by barancev on 2011-12-06 20:13:54

  • Labels added: Component-WebDriver, Browser-IE

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

I have tried the Code but Its not working. Here is the output

Started InternetExplorerDriver server (64-bit)
2.25.3.0
Listening on port 43929
Oct 31, 2012 1:43:57 AM org.apache.http.impl.client.DefaultRequestDirector tryExecute
INFO: I/O exception (java.net.SocketException) caught when processing request: Software
caused connection abort: recv failed
Oct 31, 2012 1:43:57 AM org.apache.http.impl.client.DefaultRequestDirector tryExecute
INFO: Retrying request
Exception in thread "main" java.lang.NullPointerException
    at org.openqa.selenium.remote.RemoteWebDriver.findElements(RemoteWebDriver.java:290)
    at org.openqa.selenium.remote.RemoteWebDriver.findElementsByXPath(RemoteWebDriver.java:357)
    at org.openqa.selenium.By$ByXPath.findElements(By.java:338)
    at org.openqa.selenium.remote.RemoteWebDriver.findElements(RemoteWebDriver.java:256)
    at com.slr.sample.TestInternetExploderDriverWithXPath.main(TestInternetExploderDriverWithXPath.java:36)

Reported by mabini.roberto on 2012-10-30 17:49:51

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Is this still an issue? IE driver was completely rewritten since 2.13, would you please
retest on the lates version (2.27 at the moment)

Reported by barancev on 2012-12-10 19:55:21

  • Status changed: NeedsClarification

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Closing due to inactivity

Reported by barancev on 2013-02-26 22:01:58

  • Status changed: Fixed

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Reported by luke.semerau on 2015-09-17 18:14:17

  • Labels added: Restrict-AddIssueComment-Commit

@lukeis lukeis closed this as completed Mar 3, 2016
@SeleniumHQ SeleniumHQ locked and limited conversation to collaborators Mar 4, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant