Selenium Webdriver is detectable

前端 未结 3 1185
渐次进展
渐次进展 2020-12-06 07:23

I read everywhere that it is not possible for websites to detect that a user is using a selenium webdriver... but why?

For example the webdriver plugin in firefox ad

3条回答
  •  爱一瞬间的悲伤
    2020-12-06 07:32

    Yes selenium is detectable.check Can a website detect when you are using selenium with chromedriver? If some one is using Firefox driver for automation then it is easy to detect if you put this code at your client side

            try{
            if(window.document.documentElement.getAttribute("webdriver"))
                alert("Caught in 1st case :- Selenium Webdriver is banned!!!");
            }
            catch(Exception){}
            try{
            if(navigator.webdriver)
                alert("Caught in 2nd case :- Selenium Webdriver is banned!!!");
            }
            catch(Exception){}`
    

    But same code doesnt help if you are using chrome or IE driver.

提交回复
热议问题