Selenium IDE and xpath - find text / row in table and select radio box

懵懂的女人 提交于 2019-12-04 15:44:04

The problem with your xpath is that td and input are not sibling (they don't have common parent) and even if you change your xpath to more correct version:

//input[@type='radio']/following::td[1]/a[contains(text(),'testing')]

it will find a that have preceding checkbox instead of checkbox itself. So correct xpath will be:

//a[contains(text(),'testing')]/preceding::input[@type='radio'][1]

or

//tr[descendant::a[contains(.,'testing')]]//input[@type='radio']

For xpath axis tutorial read this: http://msdn.microsoft.com/en-us/library/ms256456.aspx

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!