XPath expression using “and” doesn't work in Microsoft Edge?

℡╲_俬逩灬. 提交于 2019-12-05 14:21:37

Update: This issue was resolved in the November 2015 update to Windows/Edge

This appears to be a bug with the current implementation in Microsoft Edge. I did notice, however, that if you flip the conditions around, the proper element is retrieved:

//f[f and @id='some_id']

For the time being, I hope this is an acceptable alternative. I am opening up a bug for our team to review on our end. Than you for helping us improve Microsoft Edge :)

XPaths that fails in Edge followed by similar alternative:

Fail

'/value[Name/text()="Checked"]/Value[text()="true"]'

Alternative

'/value[Name ="Checked" and Value = "true"]/Value'

Fail

'/value[text()="match1"]' 

Alternative

'/value[.="match1"]'

Fail

'/value[Name[text()="match1"]]'

Alternative

'/value[Name="match1"]'

Fail

'/value[Name/text()= "match1"]'

Alternative

'/value[Name= "match1"]'

Fail

'/value[Name[text() = 'match1']]')

Alternative

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