splinter icon indicating copy to clipboard operation
splinter copied to clipboard

Capture Javascript errors (javascript console)

Open luzfcb opened this issue 11 years ago • 6 comments

it is possible capture any text from javascript console? I need to have some way to get Javascript errors.

luzfcb avatar May 28 '15 14:05 luzfcb

+1

neo-inuit avatar Jun 17 '15 16:06 neo-inuit

:+1: would love to have this

d3ming avatar Oct 13 '15 23:10 d3ming

+1

0x0ece avatar Nov 09 '15 21:11 0x0ece

+1

theohennessy avatar Nov 24 '15 13:11 theohennessy

There's a couple of different ways to accomplish this. Check out this stack overflow thread:

http://stackoverflow.com/questions/4189312/capturing-javascript-error-in-selenium

vectorfrog avatar Dec 14 '16 16:12 vectorfrog

Closing this, since it's a selenium issue, not splinter. I don't think we can provide a simpler way than what's already available.

https://www.selenium.dev/selenium/docs/api/py/webdriver_remote/selenium.webdriver.remote.webdriver.html#selenium.webdriver.remote.webdriver.WebDriver.get_log

The above method is currently the correct way to get logs using selenium, but this may change with their BiDi API.

javascript-error avatar Jun 28 '22 00:06 javascript-error