How to use apostrophe (') in xpath while finding element using webdriver?

后端 未结 5 511
难免孤独
难免孤独 2020-12-18 19:32

I need to use apostrophe (\') in my xpath expression which i need to use in finding elements using webdriver

i need to use below Xpath expression

//         


        
5条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-18 19:49

    if the above solution doesn't work then use the below solution using escape sequence.

    xpath: //li[.=\"Manager of Workflow Initiator's Manager\"]
    

    Here we are treating the whole text as a string using the escape character

提交回复
热议问题