当前位置: 动力学知识库 > 问答 > 编程问答 >

c# - Selenium [Javascript Application] Error

问题描述:

I have the following code:

 driver = new FirefoxDriver();

// driver = new InternetExplorerDriver();

The InternetExplorerDriver works fine (with the .exe), but with the Firefox driver, I get an apparent JavaScript error, any ideas what I am missing that causes this popup? The test will technically work for a few seconds as long as I click ok on each popup, but the test soon fails and exits.

The popup (can't post picture)

Title: [JavaScript Application]

Message: Error: syntax error

Button: OK

I have tried playing around with the different options for the FireFoxProfile and FirefoxBinary but that didn't seem to be the right direction either. I wasn't sure if the newest version of firefox was causing the problem (17) or if I needed the exe file specifically in the solution like the IEdriver.

网友答案:

You do not need a separate driver for firefox as is the case for IE and chrome. though I have found quite a few posts with the same error as yours on net..so seems to be an issue with the 17 version. You can either downgrade ur ff version or have a look at the options in the below threads (Disclaimer : I havent tried the below :) )

http://support.mozilla.org/en-US/questions/944619

http://support.mozilla.org/en-US/questions/942417

网友答案:

What is your version of Selenium? I am assuming you are using WebDriver? The current version is 2.28.0 Selenium Downloads

分享给朋友:
您可能感兴趣的文章:
随机阅读: