"Cannot find function addEventListener" in jQuery-2.1.1 -- WebDriver compatibility issue

226 views
Skip to first unread message

margare...@gmail.com

unread,
Nov 23, 2015, 5:40:58 PM11/23/15
to jmeter-plugins
After munging around to get the right libraries to do SSL requests successfully, I'm now up against:

ERROR - com.googlecode.jmeter.plugins.webdriver.sampler.WebDriverSampler: com.gargoylesoftware.htmlunit.ScriptException: TypeError: Cannot find function addEventListener in object [object HTMLDocument]. (https://myhostname.org/assets/javascripts/jquery-2.1.1.min.js#2)


When this symptom surfaced on Selenium Scalatests in our server, we addressed it with the technique in https://github.com/playframework/playframework/issues/2607 
(namely: 
implicit val webDriver: WebDriver = new HtmlUnitDriver(BrowserVersion.CHROME)
webDriver.asInstanceOf[HtmlUnitDriver].setJavascriptEnabled(true);
)

Unfortunately in the WebDriver Sampler, we're handed an already-built WebDriver instance...it's too late to say you're sorry. (Or that you want Chrome behavior.)

Anybody have any thoughts?  
Reply all
Reply to author
Forward
0 new messages