Selenium WebDriverJS - Testing Chrome Extension In

2019-01-19 07:06发布

问题:

Hello all the selenium experts out there!

Using WebDriverJS and ChromeDriver, I am currently building an automated tests for extension installation process on chrome, but I cannot click the button inside Chrome Extension Installation Popup, which looks like this:

(I am not related to Right Inbox. This is just an image I found on Google)

I tried the following, but it did not work since it is not an alert box:

driver.switchTo().alert().accept();

Is there a way to click that red-circled Add button in the image above?

回答1:

After exploring, I am convinced that this is not possible in Selenium 2.0