Is string escaping required in Xebium FitNesse pages? Can't get verifyCssCount to work

380 Views Asked by At

I am using Xebium and FitNesse for building a Proof-of-Concept demo for a customer. I am trying things out in Selenium IDE for Firefox and then use the Xebium formatter for turning the commands into FitNesse Wiki syntax, incorporating it in my set of Wiki pages.

I can't get this to work in FitNesse/Xebium:

| check | is | verifyCssCount | on | css=#new-todo[placeholder='What needs to be done?'] | 1 |

I get the following response (it complains on the formatting of the 'css=...' string):

Execution of command failed: An invalid or illegal string was specified Command duration or
timeout: 10 milliseconds Build info: version: '2.35.0', revision:
'8df0c6bedf70ff9f22c647788f9fe9c8d22210e2', time: '2013-08-17 12:46:41' System info: os.name:
'Mac OS X', os.arch: 'x86_64', os.version: '10.9', java.version: '1.6.0_65' Session ID:
9a90de82-a9ca-fa41-9708-c206804ee041 Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{platform=MAC, acceptSslCerts=true, javascriptEnabled=true,
browserName=firefox, rotatable=false, locationContextEnabled=true, version=21.0,
cssSelectorsEnabled=true, databaseEnabled=true, handlesAlerts=true,
browserConnectionEnabled=true, nativeEvents=false, webStorageEnabled=true,
applicationCacheEnabled=true, takesScreenshot=true}]]

Does anybody know what I'm doing wrong? If the string should be escaped (tried backslashes in front of the [, ] and ? characters, but that didn't help).

I can't find very much documentation on Xebium, so I have to ask the excellent community :-) Hope somone can help, would be eternally grateful!

Best Regards,
David K
Sweden

1

There are 1 best solutions below

1
On

I found the answer :-)

The selenium commands with either "Xpath" or "Css" in their names, assume that parameters are Xpaths or Css locators (respectively). Thus, the "xpath=" and "css=" parts of the parameter string are redundant and must be omitted:

| check | is | verifyCssCount | on | #new-todo[placeholder='What needs to be done?'] | 1 |

Now, it works!

Hope this helps someone else.

Best Regards,
David