I\'d like to suppress the initialization of TinyMCE inside my tests and can do this easily if the JavaScript can detect that I\'m running inside a Selenium-automated page.
<
Yes, you can do it if someone is using the Firefox driver for Selenium automation, for detection of Selenium driver you have to put in the following code at your client side:
$(document).ready(function() {
try{
if(window.document.documentElement.getAttribute("webdriver"))
alert("Caught in the first case: Selenium Webdriver is banned!!!");
}
catch(Exception)
{
}
try{
if(navigator.webdriver)
alert("Caught in the second case: Selenium Webdriver is banned!!!");
}
catch(Exception)
{
}
});
For Chrome and Internet Explorer specific, the Selenium browser it is not working.