Re: IE7: javascript-xpath

12 views
Skip to first unread message

sirish

unread,
May 8, 2009, 1:12:16 AM5/8/09
to selenium-users...@googlegroups.com
Instead of "id('someId')" oonce try.. like this

"//[@id='someid']"

Nicolas

unread,
May 8, 2009, 11:19:20 AM5/8/09
to selenium-users...@googlegroups.com
Doesn't work either; now, I'm not 100% sure, but I think that the library simply isn't being imported/used properly. When I do a getEval of document.evaluate, it returns null.

It seems the javascript-xpath file is never added into the page.

Nicolas

unread,
May 8, 2009, 11:47:46 AM5/8/09
to selenium-users...@googlegroups.com
I'm using the latest Selenium RC version (1.0 beta 2).

I launched the server with options: -singleWindow -interactive

The test case barely matters in my case, but anyhow, the following fails when run in the shell:

cmd=getNewBrowserSession&1=iexploreproxy&2=http://localhost/
cmd=useXpathLibrary&1=javascript-xpath
cmd=isElementPresent&1=xpath=id('main')

That last line returns "Invalid xpath", as will any other XPath line I use, whereas:

cmd=isElementPresent&1=css=div#main

Will return true.

I've tried XPath like: /html/body, //body, etc., none of them work; I always get a Invalid xpath error.

Using DebugBar for IE, it seems that the javascript-xpath.js file is not loaded with the other xpath files; only dom.js, util.js, xmltoken.js and xpath.js are loaded.

Nicolas

unread,
May 8, 2009, 12:07:16 PM5/8/09
to selenium-users...@googlegroups.com
Alright thanks, that fixed it; I assumed that since the command was available it worked.

Reply all
Reply to author
Forward
0 new messages