简体   繁体   English

Xebium FitNesse页面是否需要转义字符串? 无法使verifyCssCount工作

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

I am using Xebium and FitNesse for building a Proof-of-Concept demo for a customer. 我正在使用Xebium和FitNesse为客户构建概念验证演示。 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. 我正在Firefox的Selenium IDE中进行尝试,然后使用Xebium格式化程序将命令转换为FitNesse Wiki语法,并将其合并到我的一组Wiki页面中。

I can't get this to work in FitNesse/Xebium: 我无法在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): 我收到以下响应(它抱怨'css = ...'字符串的格式):

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! 我找不到有关Xebium的大量文档,所以我不得不问一个优秀的社区:-)希望somone可以提供帮助,将永远感激不已!

Best Regards, 最好的祝福,
David K 大卫·K
Sweden 瑞典

I found the answer :-) 我找到了答案:-)

The selenium commands with either "Xpath" or "Css" in their names, assume that parameters are Xpaths or Css locators (respectively). 名称中带有“ Xpath”或“ Css”的selenium命令假定参数分别是Xpath或Css定位符。 Thus, the "xpath=" and "css=" parts of the parameter string are redundant and must be omitted: 因此,参数字符串的“ xpath =”和“ css =”部分是多余的,必须省略:

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

Now, it works! 现在,它起作用了!

Hope this helps someone else. 希望这对其他人有帮助。

Best Regards, 最好的祝福,
David 大卫

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM