Puppeteer attach to running chrome that launched by selenium webdriver - google-chrome

Is it possible for puppeteer attach to a running Chrome that launched by selenium webdriver?
My automated tests are based on protractor/selenium/typescript, one of the test is going to download file in headless chrome, but download is not working due to an known bug(https://bugs.chromium.org/p/chromium/issues/detail?id=696481). I found a solution for headless download is that - using puppeteer send 'Page.setDownloadBehavior' command, then the file can be downloaded in headless.
For example, I have 10 tests, test1 ~ test9 are running on Chrome that launched by selenium webdriver, test 10 is download file test, I use puppeteer to download file in headless, but puppeteer launched another chrome instance. So is it possible for puppeteer attach to a running Chrome that launched by selenium webdriver?

Related

How to add the chrome binary to run e.g. Karma tests on headless chrome on a CI server

I like to run my karma unit tests on a headless chrome. Using karma-chrome-launcher and setting the browser to "ChromeHeadless" works on my machine. But on the CI server it fails with the message "No binary for ChromeHeadless browser on your platform."
Installing chrome on the CI machine is not possible. Is there another way to load the chrome binaries?
for example the google puppeteer module seems to load that when run. from the docs: "Puppeteer downloads and uses a specific version of Chromium". How can i achieve the same?
You can use Puppeteer (headless Chromium), follow these instructions.
If what you fear is that download from the internet might be slow, you can tell puppeteer where to download chrome from and use a local address.
Use PUPPETEER_DOWNLOAD_HOST to specify where to download Chrome from and PUPPETEER_SKIP_CHROMIUM_DOWNLOAD to skip downloading Chrome altogether.
You can read more about this in the documentation.

How to choose a browser version in web component tester?

Does wct config allow for choosing a specific version of Chrome, like Chrome 34?
It seems to install chrome at the beginning every time I run wtc.
Following Polymer Documentation, it's possible to run tests choosing a browser installed on your computer. If you have Chrome 34 version and you execute test -l chrome, tests will run with this version. If you don't have Chrome 34, it's no possible.
All supported browsers to run tests are aurora, canary, chrome, firefox and ie.
Web Component Tester automatically finds all of the browsers installed
on your system and runs your tests against each one. If you wanted to
run your tests against a single browser, say Google Chrome, you could
polymer test -l chrome.

Selenium webdriver auto install chrome app

I want to run chrome from selenium with particular app installed in it. I am aware that we can load extensions in the chrome driver as explained here. I have tried to use the same code for unpacked app however it gives an error:
failed to load extension manifest file is missing or unreadable

selenium standalone server with Google Chrome

I want to run some test using selenium standalone server on Google Chrome but it runs Firefox instead when I execute this code:
java -Dwebdriver.chrome.driver="webdrive\chromedriver.exe" -jar ./selenium-server-2.42.2-withFarsi.jar -htmlSuite "*chrome" http://www.google.com C:\Users\...\TestSuit.html temp.html
after this it runs Firefox and starts running test as usual.
What can I do?
instead of *chrome use *googlechrome.

Run Selenium commands via google chrome extension?

Is it possible to build a custom google chrome extension to run selenium commands when it detects a specific Url/page?
Where to begin? How would you run selenium commands via a google chrome extension?
First install selenium IDE and record all your test cases into it [This is to save your time in writing test cases].
Then get selenium RC binaries for your preferred language (for me its C#). Create your project and take reference of selenium RC binaries. Import all test cases from above selenium IDE in your preferred language and add those into your project.
When you will import the test cases from IDE default browser will be *chrome(i.e. Firefox). To change it to Chrome change browser type when we are creating selenium object
selenium = new DefaultSelenium("localhost", 4444, "*googlechrome", "http://www.google.com/");
To run your project you have to first start selenium server. Here is the guideline for the same.
Note: You can also use selenium web driver in place of selenium RC. And I think if you use web driver then you no need to run selenium server to execute your test cases/project.