Cucumber/Capybara: Could not launch browser window - selenium

I am using Cucumber/Capybara framework using Jruby. I have setup all the things required to run the test. When I execute it, no error message is displayed, but webdriver window also does not come up. I have tried with Mozilla Firefox 17.0.1 and 22.0 version. I am using a windows 7 machine. My other teammates have followed the same process, but they are able to run the tests.
C:\Application>bundle exec cucumber features\login.feature
Mocha deprecation warning: Change `require 'mocha'` to `require 'mocha/setup'`.
Rack::File headers parameter replaces cache_control after Rack 1.5.
Using the default profile...
Feature: Login
In order to adhere to GIS requirements
As an employee
I want to be able to log in using the enterprise single sign on
Scenario: Login to home page←[90m # features\login.feature:6←[0m
No Webdriver window getting launched.

Related

Unable to Run Automated Test Cases With Minimized Window in Chrome

I use Cucumber framework in version 4.0 and Selenium Server Standalone in version 2.53.0 to automate test cases. While Google Chrome version is 86.0.4240, the already automated test cases are executed without any problems and even when the Web explorer window is minimized each step is executed perfectly.
However when the Chrome version is updated to the latest available version, these test cases execution is stopped when the Web explorer window is minimized.
Does any body know how to avoid this happening after updating the Web Explorer?
Thank you!

Setup Required to Run TestCafe tests on Safari browser

I'm attempting to execute a TestCafe suite on locally installed Safari. I have previously executed the tests on chrome, chrome:headless, firefox, and firefox:headless. When running the command testcafe --list-browsers to retrieve my list of installed browsers, I receive the following:
testcafe --list-browsers
Using locally installed version of TestCafe.
firefox
chrome
safari
When I execute a simple test via command line, testcafe safari path/to/tests/, the Safari browser will launch, but no navigation takes place. I remain on the launch window (showing my favorites and recently visited pages).
When the same command is executed for a different browser (say, testcafe chrome path/to/tests/), the tests are executed in the local browser.
Am I missing something that is required to get Safari up and running with TestCafe? I'm using TestCafe version 1.6.1. I'm not seeing any additional setup mentioned on the TestCafe documentation...
I was able to resolve this issue by disabling all uses of TestCafe Browser Tools in System Preferences -> Security & Privacy -> Privacy -> Automation. On my subsequent execution, I was prompted to allow TestCafe Browser Tools for Safari. After accepting the prompt, the tests ran as expected.
I also had deleted my node_modules directory and reinstalled dependencies, although I'm skeptical if that helped.

How does the elixir community recommend setting up integration tests with chromedriver?

I am using Hound (https://github.com/HashNuke/hound) for integration testing a Phoenix application. I have chrome and chrome headless working. To get it working I have another terminal window running chromedriver (installed via brew). This feels odd to me. Is there a library or test setup that would feel more "integrated" into the application? What's the Elixir way of doing this?
In the Ruby world there's the webdrivers gem (https://github.com/titusfortner/webdrivers). As far as I know it downloads a specified driver (lets say chromedriver) to $HOME. Then with every test run, the test uses the driver downloaded to that destination to execute the tests.
Before the webdrivers gem there was chromedriver-helper gem. Before that it was phantomjs. These implementations made it so running integration tests required 1: downloading the driver 2: running the test
In Elixir (with Hound) I have my tests working by first running chromedriver --verbose in a terminal split, and in the other screen I run mix test. This works fine but feels disjointed. This adds extra steps, 1: download the driver 2: start the driver 3: run the test 4: stop driver
I could write a script manually to run chromedriver in the background, and stop it after the tests are run.
I am new to the Elixir community and so I've researched a lot. It's still not clear to me if there is a "traveled path" I should go down vs just hooking everything up manually.
Have I missed a recommended abstraction? Is this intentional? Is this "just not created, yet"?
Thank you
Have you checked out wallaby? See https://github.com/keathley/wallaby

Selenium WDS executeScript()

I have a strange problem, which I'm unable to solve for sometime. I have a selenium WDS for Firefox browser. I tried to execute the code in JMeter UI, everything works fine. But when I try to execute the same in a server (using XVFB driver), I get the error:
rm="sun.org.mozilla.javascript.EvaluatorException: Can&apos;t find method org.openqa.selenium.remote.RemoteWebDriver.executeScript(string,org.openqa.selenium.remote.RemoteWebElement). (<Unknown source>#17) in <Unknown source> at line number 17"
All the required drivers are the same as the one I locally try. Yet, I get the error only when I run in the server but not locally. Please help
Most probably you have different versions of either WebDriver Sampler or dependency libraries, I don't see any other ways for the same script to work on one machine and don't work on another.
Install the same version of JMeter onto both machines (use JMeter 3.2 or later, whatever is available at JMeter Downloads Page)
Install latest version of the WebDriver Sampler plugin using JMeter Plugins Manager
Your test should now be running fine.

Using IEDriver with Ruby on Rails - How to navigate to start page?

I have several written automated tests in Ruby on Rails that run on Chrome using Chromedriver. I'd like to take those tests and start running them on IEdriver, but currently, when I start the tests, it opens in my local host and states that "This is the initial start page for the WebDriver server"
I've read that this is normal, but given that the first steps of the test is to navigate to our company website, I'm not sure what I need to do to selenium or to my tests to help it navigate to a valid website to start.
All good, it was zoom settings in the ie9 window.