2
votes

I am able to launch Chrome browser with extension in the browser. But I am not able to interact with the extension.

When I launch Chrome browser manually, I go to chrome://extensions and configure command for that extension and set short cut like "Alt+H" to launch the extension from short cut and after hitting Alt+H the extension gets invoked.

But when I launch chrome browser with extension using watir webdriver, the configure command setting for that extension is not set. After I set that manually again to "Alt+H" and try to invoke the extension on the browser which is launched using watir-webdriver, I don't see extension getting invoked.

Please let me know how can I interact with the chrome extension using watir-webdriver.

1
I tried using rautomation. The code I used is : w = RAutomation::Window.new :title => /Title name/ When I put following: w.send_keys [:alt, 'e'] it opens the settings from settings icon in the browser, but when I put the shortcut for extension it does not open. Even manual clicking on extension doesn't open the extension and seems like nothing happened. Any idea why is this browser which is opened using watir-webdriver blocking the extension? When I open chrome browser manually, I am able to open the extension by clicking on it's icon.user2237927
This may be more of a chromedriver question than a watir question. Especially if you can open the browser manually, and use rautomation from an irb session to click the control, but not when you do the same thing against a browser opened via watir-webdriverChuck van der Linden

1 Answers

0
votes

I do not think watir can interact with the extensions. It can only interact with the page. But, I could be wrong. I had moderate success with Sikuli when I needed to do something like that.