Css Locator doesn't work in Selenium RC

58 views
Skip to first unread message

Alan

unread,
Mar 13, 2007, 12:17:00 PM3/13/07
to selenium-users...@googlegroups.com
This may already be a known issue, but the documented CSS locator doesn't seem to work. When I try to use it I get

ERROR: Unrecognised locator type: 'css'

Here is the stack trace.
com.thoughtworks.selenium.SeleniumException: ERROR: Unrecognised locator type: 'css' at
com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:73) at
com.thoughtworks.selenium.HttpCommandProcessor.getString(HttpCommandProcessor.java:150) at
com.thoughtworks.selenium.DefaultSelenium.getText(DefaultSelenium.java:306)


So, I attempted to plugin my own CSS selector (Prototype, then cssQuery). These libraries failed in this environment, creating this result

WARNING: getString(getEval) saw a bad result OK,

I would really like to use the CSS selector, since it is succinct and already being used in my CSS and javascript. Can anybody give me more info on this problem?

-Alan

henry

unread,
Mar 14, 2007, 9:04:37 AM3/14/07
to selenium-users...@googlegroups.com
are you using the latest version of selenium RC, v0.9.0? previous versions doesn't support css. for more info on how to use different locators in selenium, check this out:

http://release.openqa.org/selenium-remote-control/0.9.0/doc/java/

henry

Alan

unread,
Mar 14, 2007, 10:10:17 AM3/14/07
to selenium-users...@googlegroups.com
Thanks for replying.

I am in fact using v0.9.0 . However I did get it using the openqa maven package. Would that affect anything?

The javadoc is how I discovered I could use a css locator. What is really odd is that if I use the Selenium IDE, or I download the latest core package, the css locator works fine. It seems as if the css locator just wasn't hooked up in the selenium server.

-Alan

henry

unread,
Mar 14, 2007, 10:32:32 AM3/14/07
to selenium-users...@googlegroups.com
interesting.

i'm using v0.8.0 that's why i know css doesn't work on my machine. maybe someone on this forum can help you out. in the mean time, i'd suggest using selenium IDE to get the element that you need to work on. good luck!

Reply all
Reply to author
Forward
0 new messages