编辑:
我的CSSSelector是这样的:(它在FF中工作正常)
for (int i = 1; i < _count; i++) { .................. .................. div#ctl00_ContentPlaceHolder1 table.gv tbody tr.item:nth-child(" + i + ") > td:nth-of-type(3) .................. }编辑结束
我在FF中使用Selenium 2.29和IE(8)和FF(17.1),所有测试用例都通过了,当我在IE中运行时,大多数测试用例都失败了,这里是错误消息:
Test method threw exception: OpenQA.Selenium.WebDriverTimeoutException: Timed out after 30 seconds ---> OpenQA.Selenium.NoSuchElementException: Unable to find element with css selector ==div#ctl00_ContentPlaceHolder1 table.gv tbody tr.item:nth-child(1)> td:第n个类型(3)
我正在使用CSSSelector。
我必须更改IE浏览器的CSSSelector才能正常工作吗?
EDIT:
my CSSSelector is like this: (which is working fine in FF)
for (int i = 1; i < _count; i++) { .................. .................. div#ctl00_ContentPlaceHolder1 table.gv tbody tr.item:nth-child(" + i + ") > td:nth-of-type(3) .................. }EDIT END
I'm using Selenium 2.29 and IE (8) and FF (17.1) in FF all my test cases passed and when I run in IE majority of my test cases failed and here is the error message:
Test method threw exception: OpenQA.Selenium.WebDriverTimeoutException: Timed out after 30 seconds ---> OpenQA.Selenium.NoSuchElementException: Unable to find element with css selector ==div#ctl00_ContentPlaceHolder1 table.gv tbody tr.item:nth-child(1) > td:nth-of-type(3)
I'm using CSSSelector.
do I have to change the CSSSelector for IE to work?
最满意答案
按照: http : //www.quirksmode.org/css/contents.html#t38
IE8及以下版本不支持:nth选择器。
As per: http://www.quirksmode.org/css/contents.html#t38
IE8 and below don't support the :nth selectors.
更多推荐
发布评论