What is the difference between standalone webdriver and firefox driver?
My main goal is to pass the firefox binary path to the tests. I was able to achieve this but it seems that I have to have the directConnect flag on the protractor config to true. This uses the firefox driver
Running the tests I get some failures on the assertions
For instance :
Following passes if I run using a standalone webdriver and fails if I set directConnect to true and pass firefox binary path
expect('Hello World!').toNotEqual('Hi!');
Related
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.
I would like to know how to run jmeter - webdriver sampler by using chrome browser. Is there any new plugins need to be downloaded for chrome? And this is my sample script to open in chrome browser,
WDS.sampleResult.sampleStart()
WDS.browser.get('http://jmeter-plugins.org')
WDS.sampleResult.sampleEnd()
And I have configured jp#gc - Chrome Driver Config config element in my test plan.
If you need to use Chrome browser you need to download ChromeDriver binary and drop it somewhere to your local disk.
Once done you need to specify the full path to the ChromeDriver executable under Chrome Driver Config like:
This way you should be able to integrate WebDriver and Chrome with JMeter.
See The WebDriver Sampler: Your Top 10 Questions Answered for the most commonly asked questions regarding the WebDriver sampler solutions.
Why do we need System.setProperty in the selenium webdriver command line for browsers other than FireFox?
what is the logic behind it?
Selenium provides native support to Firefox. As per the document,
Controls the Firefox browser using a Firefox plugin. The Firefox Profile that is used is stripped down from what is installed on the machine to only include the Selenium WebDriver.xpi (plugin).
Whereas, Chrome and IE works differently,
Chrome driver :
WebDriver works with Chrome through the chromedriver binary (found on the chromium project’s download page). You need to have both chromedriver and a version of chrome browser installed. chromedriver needs to be placed somewhere on your system’s path in order for WebDriver to automatically discover it. The Chrome browser itself is discovered by chromedriver in the default installation path.
IE works only with windows,
This driver is controlled by a .dll and is thus only available on Windows OS. Each Selenium release has its core functionality tested against versions 6, 7 and 8 on XP, and 9 on Windows7.
You can refer the document for better understanding Selenium Document
I am able to successfully run test on chrome on my current set-up, however I am unable to add other browsers to my tests. I am using the grunt module 'grunt-protractor-runner' to run my e2e tests.
Having looked around I know the grunt-protractor-runner module does support multiCapabilities, so on the face of it I would expect the simple task of editing the target config file to include multiCapabilities and update chromeOnly to false.
Although I can pass multiCapabilities, I cannot however change the chromeOnly option to 'false' and get my tests to run successfully. My errors when passing Firefox and Chrome to multiCapabilities,
Running 2 instances of WebDriver[launcher] Runner Process Exited With Error Code: 8
------------------------------------
PID: 7812 (capability: chrome #1)
------------------------------------
Using the selenium server at http://localhost:4444/wd/hub
C:\Project\node_modules\protractor\node_modules\selenium- webdriver\lib\webdriver\promise.js:1702
throw error;
^
------------------------------------
PID: 6444 (capability: firefox #1)
------------------------------------
Using the selenium server at http://localhost:4444/wd/hub
C:\Project\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\promise.js:1702
throw error;
^
I am running my set-up on Windows 7, using grunt-protractor-runner 1.0.1, protractor 0.23.1, chromedriver 2.9, and selenium-server-standalone 2.41.0
It would seem that I've been able to resolve this problem - it related to not starting a standalone selenium server, which grunt-protractor-runner does not do on it's own.
The way around this is to either open a new console at the location of the protractor web-driver using webdriver-manager start --standalone and running the tests using grunt-protractor-runner as before; or as I am currently, using the grunt-protractor-webdriver module and including it within the grunt task to be called.
In my protractor.conf.js file I removed chromeOnly: true and added a multiCapabilities array of browsers.
I am using Protractor to test my angular.js app and its working great in Chrome. I had some issues getting it set up and learning the extra webdriver syntax for jasmine, but now I'm getting the hang of it and have a number of tests that are running and passing in Chrome.
Does anyone know of any way to run Protractor in Firefox or Safari or IE or Opera? I'd like to be able to run these tests against more browsers than just Chrome. I've looked through the Protractor docs on GitHub but it only shows config files for the chromeDriver. Is there such thing as a Firefox driver or a Safari driver?
PS. I don't think it'll be much help, so I'm not posting my current config file, but if it is useful, let me know and I can post it here.
Yes! You'll need to do a little setup depending on which browser driver you want to use, but firefox and safari should be trivial. Their drivers are included in the Selenium Standalone server. Just add
capabilities: {
'browserName': 'firefox' // or 'safari'
},
to the config file.
For IE, you need to install a separate binary, and the Selenium Standalone Server needs that binary to be in your PATH. After that, you should be able to use ie as a browsername in your config. Check out the IEDriver documentation here - http://code.google.com/p/selenium/wiki/InternetExplorerDriver