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.
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.
Related
I have an extension loaded into my Google Chrome and I’d like to be able to tell whether it is enabled or not without having to open Chrome and go to the extensions page. Is there a way to do that?
If that matters, the extension is located in the appdata/local/Google/chrome/default/extensions folder.
Some Chrome APIs like chrome.tabCapture.capture require the extension to be invoked in order to work (i.e. user should click on the extension icon).
Is there a way to invoke the extension using Puppeteer (preferred) or in some other automated way?
You can pass the --whitelisted-extension-id=<extension-id> flag to Puppeteer.
We are automating chrome extension with sahi.
we have loaded our chrome profile with sahi with extension added on profile.
we weren't able to get dom elements of extensions.
so we are navigating to the url: chrome-extension:/extension_id/popup.html
but sahi doesn't navigate to this url.
but i have read with selenium we are able to get it.
Please help me out, with this automation
I'm not sure, I understand the problem here. But if you want to change some options on chrome. I use this Chromium Command Line Switches to find correct option to set when set browser on 'browser_types.xml`.
For example:
<options>--no-default-browser-check --user-data-dir=$userDir\browser\chrome\profiles\sahi$threadNo --proxy-server=127.0.0.1:$port --disable-popup-blocking --always-authorize-plugins --allow-outdated-plugins --enable-npapi --incognito</options>
I have created a chrome extension which opens a new tab window,plays youtube videos and collects the network statistics.
What I currently do is to launch the chrome and then click the extension icon to run the extension. Now I want to automate the process of launching chrome and the extension simultaneously from command line.
Please guide me how I can open and run the extension on chrome from command line.
I have tried --load-and-launch-app and --load-extension.
You can move the logic of your extension in your background.js page. In this way when chrome starts, it will run your code in background.js without clicking extension icon.
For starting chrome use -
start chrome
I am looking for a sample project that would compile a chrome and firefox extension that would run some JavaScript code after a page is loaded.
I already wrote a Chrome extension that does this, but I am looking for something cross-browser, that would allow me to build the same extension for Chrome and Firefox.
If this would also allow me to publish the extensions it would be great.
You may refer this link http://www.extensionfactory.com/labs/conversion/
Here you can get firefox extension by submitting chrome extension.
With the Crossrider's framework you can build a cross-browser extension using only one code base that will work on Chrome, Firefox and also Internet Explorer and Safari.
So, with only using javascript single code base and the Crossrider API you can easily build your first cross-browser extension in no time.
(Disclosure: I work at Crossrider)