简体   繁体   中英

How to catch error code 500 with selenium webdriver

I would ask you something,

How to test if there is error 500 file in a web?

is there any sugesstion for me?

thank you

No, it is not possible to check the response code using Selenium Webdriver. Refer this link .

To check the response code you'll have to send a request using java.net.HttpUrlConnection (or any other HTTP library) and then check the response code.

You can have a look at this answer which will give a more detailed explanation.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM