MPV
MPV

Reputation: 1664

How to identify if request was sent using Selenium

Is there a way to identify if a HTTP request was send using Selenium?

For example if Selenium adds any request header, cookie or equivalent?

I tried looking at the User Agent, but it didn't reveal anything about Selenium:

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17

Upvotes: 1

Views: 685

Answers (2)

Ross Patterson
Ross Patterson

Reputation: 9570

Nope. Selenium doesn't mark its requests with anything.

Upvotes: 0

MPV
MPV

Reputation: 1664

I noticed that HTTP_X_FORWARDED_FOR gets set if Selenium is being used:

HTTP_X_FORWARDED_FOR => 0:0:0:0:0:0:0:1%0

Upvotes: 1

Related Questions