How to execute javascript code with line more than 1 #175
-
I have javascript code, but it is clearly more than one line, how do I execute it? const slider = document.querySelector('.secsdk-captcha-drag-wrapper'); if (slider) { |
Beta Was this translation helpful? Give feedback.
Answered by
Chetan11-dev
Aug 15, 2024
Replies: 1 comment
-
driver.run_js(''' if (slider) { ''') |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
xNeizy
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
driver.run_js('''
const slider = document.querySelector('.secsdk-captcha-drag-wrapper');
if (slider) {
const mousedownEvent = new MouseEvent('mousedown', {
bubbles: true,
cancelable: true,
view: window,
button: 0 // Left button
});
''')