Search code examples
seleniumfirefoxselenium-firefoxdrivergeckodriver

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


Is it possible to detect instances of firefox browsers that are being controlled by Selenium and geckodriver?

Note there is a corresponding answer for chromedriver, but I'd like to know whether this is possible for firefox/geckodriver.


Solution

  • Yes you can detect geckodriver controlled selenium with a simple check in JavaScript

    var runningSelenium = !("showModalDialog" in window);