Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

199
Views
JavascriptError: SyntaxError: expected expression, got ':' when use driver.executeScript(':screenshot') Selenium

I try to send a command to the console and get a screenshot of one of the DOM tags but when I try to send it I get this error

\`\~\\Desktop\\selenium\\node_modules\\selenium-webdriver\\lib\\error.js:522
let err = new ctor(data.message)
^

JavascriptError: SyntaxError: expected expression, got ':'
at Object.throwDecodedError (\~\\Desktop\\selenium\\node_modules\\selenium-webdriver\\lib\\error.js:522:15)
at parseHttpResponse (\~\\Desktop\\selenium\\node_modules\\selenium-webdriver\\lib\\http.js:548:13)
at Executor.execute (\~\\Desktop\\selenium\\node_modules\\selenium-webdriver\\lib\\http.js:474:28)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Driver.execute (\~\\Desktop\\selenium\\node_modules\\selenium-webdriver\\lib\\webdriver.js:735:17) {
remoteStacktrace: ''
}\`

I need to get a screenshot node with selenium js firefox, it's the only way I could find and the most promising

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!