How can I avoid double quotes in Xpath in Selenium?

Example:

By.xpath("//*[@id="ext-gen1035"]/div/div[3]/i") 
+5
source share
1 answer

You can also use single quotes:

 By.xpath("//*[@id='ext-gen1035']/div/div[3]/i") 

Or do double quotes with backslash:

 By.xpath("//*[@id=\"ext-gen1035\"]/div/div[3]/i") 
+7
source

Source: https://habr.com/ru/post/1246637/


All Articles