I currently also ran into this issue that Jakes stated above. I
believe Jakes left out some information, but here is my scenario,
which I believe applies to Jakes too...
I have created a driver jar file that includes selenium jar and lib
jar(s) it uses. Upon manipulating an WebElement (eg. click,
isDisplayed, etc) that is NOT present or calling
driver.findElement(...) the NoSuchElementException calls the BuildInfo
that is included in the selenium jar, but crashes on line 45(http://
groups.google.com/group/webdriver/browse_thread/thread/
2b1a7fcd7072dcf1/1bb4378908b1e35a?show_docid=1bb4378908b1e35a).
I am not sure what is causing this, but I think it is due to the fact
that the jars are within a jar? In the link above you can see that it
is bombing out on the code: File file = new File(url.toURI());
The BuildInfo is part of selenium jar and not our code, but is used to
obtain information about the os and browser for the
NoSuchElementException.
Running the simple google demo for selenium locally, but looking for
an element that is not there throws the NoSuchElementException as
expected. Doing the same within a jar doesn't works as expected... If
I have two catch blocks, first the NoSuchElementException and second
Exception, then the second one will catch it. Upon printing out the
stack trace it show the root cause has to do with:
--->at java.io.File.<init>(Unknown Source)
--->at
org.openqa.selenium.internal.BuildInfo.loadBuildProperties(BuildInfo.java:
45)
at
org.openqa.selenium.internal.BuildInfo.<clinit>(BuildInfo.java:37)
... 10 more
Please advise...
Also, I made a simple test
On Oct 5, 2:37 am, Daniel Wagner-Hall <
dawag...@gmail.com> wrote:
> That looks very odd indeed - can you supply us with the page you're
> testing against (either the full HTML, Javascript and CSS, or a link
> to it if it's public), and the Java test case you're executing? Even
> if it only happens some of the time, having a chance at seeing the bug
> will make it easier for us to find/fix than random guesswork
>
> On 3 October 2011 03:50, Jayakumar Raghavan <
jragha...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Yes it 2.7 using IE browser
> > Thanks
>
> > Sent from my iPhone
> > On Oct 2, 2011, at 7:24 PM, Krishnan Mahadevan
> > <
krishnan.mahadevan1...@gmail.com> wrote:
>
> > Is this with Selenium 2.7.0 ?
> > Thanks & Regards
> > Krishnan Mahadevan
>
> > "All the desirable things in life are either illegal, expensive, fattening
> > or in love with someone else!"
>