We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8824a1e commit 1e63579Copy full SHA for 1e63579
demomore/training_JS_find/all_locator_by_JQuery.py
@@ -27,14 +27,14 @@
27
url = 'http://www.cnblogs.com/'
28
myblogs = url + 'jinsky'
29
driver.get(myblogs)
30
+
31
# JS locator
32
JS_n = 'document.getElementById("blog_nav_contact").click()'
33
+driver.execute_script(JS_n)
34
35
# JQuery
-# jquery_n = '$("#blog_nav_contact").click()'
-
36
+# jquery_n = "$('#blog_nav_contact').click()"
37
# driver.execute_script(jquery_n)
-driver.execute_script(JS_n)
38
39
sleep(8)
40
print(driver.title)
@@ -57,7 +57,7 @@
57
driver.execute_script(jquery_r)
58
sleep(1)
59
60
-JS_l = 'document.querySelectorAll("#signin")[0].click()'
+# JS_l = 'document.querySelectorAll("#signin")[0].click()'
61
jquery_l = "$('#signin').click()"
62
driver.execute_script(jquery_l)
63
sleep(3)
0 commit comments