[問題] 用python轉css selector到xpath
請問我想用selenium webdriver 去定位各個element. 我可以成功的找到element用xpath或是css select. 但是我有任何方法可以把css selector轉換成對應的xpath嗎
將我可以寫一個公用的functional
像
css select 是 find_element_by_css_selector('table.tableclassname')
xpath => find_element_by_xpath('//table[@class="tableclassname"]')
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 209.90.32.81
※ 文章網址: https://www.ptt.cc/bbs/Python/M.1492808410.A.A57.html
→
04/22 09:24, , 1F
04/22 09:24, 1F
→
04/22 09:25, , 2F
04/22 09:25, 2F
→
04/27 23:07, , 3F
04/27 23:07, 3F