python操作selenium獲取新添加的li值
jq = '''
$(function () {
$("#engineNo").on("click", function () {
var str = "<ul><li onclick=(function(){console.log($(this).text())})()>4</li></ul>";
$("#engineNo").after(str)
});
});
'''
driver.execute_script(jq)
在瀏覽器列印為空

請問怎么獲取到li中的值?
uj5u.com熱心網友回復:
這也行?python直接可以用在前端?自學?還從不結貼?轉載請註明出處,本文鏈接:https://www.uj5u.com/qianduan/32087.html
標籤:JavaScript
上一篇:縮放后的拖拽問題
