Is it possible to connect Selenium-IDE to ChromeDriver - selenium-webdriver

I;m just starting to test my app with Selenium and I have downloaded Selenium-IDE and wrote a few test cases. They run nice in Firefox and all pass. I also need to test my app in Chrome and IE. Is it possible to connect the IDE to the Chrome web driver so I can run them there as well?

You can export the scripts as Wedbriver scripts and run it against other browser.

Now you can,
from How to run tests from Selenium IDE in Chrome :
Ever wondered if you could use Selenium IDE for Chrome? You’ve probably heard that the IDE only runs in Firefox, which means Google’s much-famed browser is out of reach. Actually, there’s a neat little feature that lets you run Selenium IDE in Chrome.
The feature is called WebDriver Playback. Here’s how you can use it:
Launch Selenium IDE.
Go to ‘Options’ and select “Options…” in the drop-down menu.
In the Options menu, select the “WebDriver” tab.
Check the “Enable WebDriver playback” checkbox.
Find the “Browser choices” input field right below the checkbox. Below the input field, you will see browser options. These include “android, chrome, firefox, htmlunit, internet explorer, iPhone, iPad”.
Substitute “firefox” with “chrome”. Note that both variants are lowercase.
Download the Selenium standalone JAR file and ChromeDriver. Add both files to the same folder on your local computer.
Use Terminal to navigate to the folder with the downloaded files.
Start Selenium server and ChromeDriver server via Terminal: java -jar selenium-server-standalone-2.43.1.jar -Dwebdriver.chrome.driver=chromedriver.exe
Open Selenium IDE and run the test script. Note that the script will run in one of the more or less recent versions of Chrome.

Related

Issue with running selenium scripts in headless browser in gitlab CI beacuse of chrome extension involvement

I have an automation test suite which includes the browser extension loading. I want to run these tests in gitlab but as far as I read, the headless chrome does not support the chrome extensions.
I can't use mozilla firefox as the extension is not supported by firefox. Please suggest me a way so that I can run my tests with the extension in gitlab CI.
Thanks in advance!
While looking for the solutions, I read about xvfb virtual display. I don't know what is it or will it work in gitlab. I tried but it did not work.

Need to Launch a special version of FireFox from .bat file and use the webdriver for it

I need to build an automation test using the Selenium Java for the WebApp designed for a Unit using a special Firefox browser that launches with .bat file. I need to ensure that webdriver will use that special version of Firefox, not the ordinary one.
You can specify firefox binary path using org.openqa.selenium.firefox.FirefoxBinary. See https://www.javatips.net/api/org.openqa.selenium.firefox.firefoxbinary.

Project still uses old Chrome webdriver even after I installed a later version

I wanted to run a demo code -FaceboookCodedUITestProject- and I see that it doesnt run on chrome browser, gives this error on console ,even though it starts a chrome
Starting ChromeDriver 2.25.426923
only local connections are allowed
I search and found this issue comes with some version so I installed Selenium.WebDriver.3.141.0 with nuget and I can see when I click on webDriver folder in preferences , however I still get same error on console and it says Satrting ChromeDrive 2.25. How can I remove ChromeDriver 2.25 and use only 3.141 ?
C:\Users\rasim.avci\source\repos\FaceboookCodedUITestProject\packages\Selenium.WebDriver.3.141.0\lib\net45\WebDriver.dll
Chrome driver is different from Nuget package library.
ChromeDriver(2.25) is a standalone selenium webdriver which interacts with chrome browser. The 2.25 version is not compatible with latest version of chrome
And Nuget package is selenium library to write the test. It should not be confused with driver
To fix this, find where chromedriver.exe is! .
Open CMD prompt and type Chromedriver. If it runs successfully, then chromedriver would have been added in Environment PATH and its easy to get the location from there

How can I configure Selenium to have an extension pre-installed in Chrome?

We have a suite of tests that use Selenium to spawn Chrome instances when run locally. The Chrome instance that gets spawned is a completely vanilla profile with no extensions installed. For debugging purposes it would be useful to have the React & Redux dev tools extensions installed.
Is there a way to configure Selenium to install/enable extensions in the Chrome profile it spawns?
In an ideal world it wouldn't do a full install of the extension every time, but use a locally cached CRX file.
Thanks in advance for any help
#Kiril is right in saying that this question is asked often. You should do a thorough search before posting.
If you are using Javascript+ Selenium do something like this :
chromeOptions = {
'args': ['--test-type',
'--start-maximized',
'use-fake-ui-for-media-stream',],
'extensions': [encode(path.join(__dirname , '/your ext path/yourextention.crx'))],
};

Is it possible to run protractor test with the head on a remote browser?

Can we run the test on our server and display the progress using the users browser ,So our servers have no graphics drivers, we run headless.
Is it possible to run with the head on a remote browser ?
There is PhantomJS but with Protractor is buggy and a dead-end.
You can still use Chrome & Firefox headless through docker-selenium or, if you don't like Docker you can do it yourself with ubuntu-headless sample. Both solutions provide Chrome & Firefox by using Xvfb even though there is no real DISPLAY.
You can also use selenium in the cloud through a paid service like SauceLabs or BrowserStack.
In OSX and without docker you can try http://xquartz.macosforge.org/landing/
In OSX and without docker you can also try Mac OSX selenium headless solution

Resources