Can a website detect when you are using selenium with chromedriver?

后端 未结 19 2685
情歌与酒
情歌与酒 2020-11-21 05:41

I\'ve been testing out Selenium with Chromedriver and I noticed that some pages can detect that you\'re using Selenium even though there\'s no automation at all. Even when I

19条回答
  •  长情又很酷
    2020-11-21 06:16

    The bot detection I've seen seems more sophisticated or at least different than what I've read through in the answers below.

    EXPERIMENT 1:

    1. I open a browser and web page with Selenium from a Python console.
    2. The mouse is already at a specific location where I know a link will appear once the page loads. I never move the mouse.
    3. I press the left mouse button once (this is necessary to take focus from the console where Python is running to the browser).
    4. I press the left mouse button again (remember, cursor is above a given link).
    5. The link opens normally, as it should.

    EXPERIMENT 2:

    1. As before, I open a browser and the web page with Selenium from a Python console.

    2. This time around, instead of clicking with the mouse, I use Selenium (in the Python console) to click the same element with a random offset.

    3. The link doesn't open, but I am taken to a sign up page.

    IMPLICATIONS:

    • opening a web browser via Selenium doesn't preclude me from appearing human
    • moving the mouse like a human is not necessary to be classified as human
    • clicking something via Selenium with an offset still raises the alarm

    Seems mysterious, but I guess they can just determine whether an action originates from Selenium or not, while they don't care whether the browser itself was opened via Selenium or not. Or can they determine if the window has focus? Would be interesting to hear if anyone has any insights.

提交回复
热议问题