Verifying element with a name containing a dot (.) using Play's Selenium Tag
I'm trying to verify an element on my page by writing a selenium test using the Play Framework's Selenium Tag. I have something like this:
#{selenium}
open('/')
verifyElementP开发者_开发问答resent(//input[@name='foo.bar'])
#{selenium}
When I go view the selenium tests in the test runner (http://localhost:9000/@tests) and view the individual test and the steps to execute, the verifyElementPresent step is not shown. If I change that step to be:
verifyElementPresent(//input[@name='foo'])
the step shows up as expected. So it seems the dot in the name is causing problems. Does anyone know how to get the step to show up even though the xpath has a dot in the middle of it?
Seems like the selenium tag is messing up the . characters, here's a workaround:
#{selenium}
verifyElementPresent(//input[@name="foo.bar"])
#{/selenium}
精彩评论