Questions tagged [ruby]

Ruby is a dynamic, reflective, object-oriented, general-purpose programming language.

Filter by
Sorted by
Tagged with
11
votes
7answers
65k views

Is it possible to stop page loading on the browser using selenium web-driver?

I searched online, but couldn't find anything about how to stop page loading over a browser using selenium web-driver. Any idea for the same?
6
votes
2answers
2k views

Which has the better support for Selenium, Python or Ruby? [closed]

I need to use Selenium to do some automating testing. Which language has better support for Selenium? That is, once a new version of Selenium is released, And I can get the newest version binding on ...
6
votes
1answer
5k views

Expect case insensitive text on page - Capybara + RSpec [closed]

I am pretty newbie in Ruby and we are using Capybara + Rspec + Poltergeist as the driver. What I want to do is to expect some text on the webpage I am testing, so I have this simple code: expect(...
6
votes
1answer
5k views

Selenium WebDriver sometimes fails to connect to the browser when running tests in headless mode

I'm experiencing timeouts when Webdriver connects to the Chrome browser in headless acceptance tests setup on Linux. I'm using the following setup to run the tests: Vagrant machine with Ubuntu 14.04 ...
6
votes
1answer
197 views

How to Run tests in parallel with Spinach BDD framework?

Currently in our company we use Spinach as a BDD framework and test runner for our automated acceptance tests. We also use Selenium as a browser driver, Capybara as an additional layer on top of it ...
4
votes
2answers
718 views

Force a browser's visibility setting to true

I'm trying to set up some specs against a real (not headless) browser but some of the javascript on the target page only runs if the browser is visible (it doesn't need to be the active app). I've ...
4
votes
2answers
5k views

Getting response headers with Selenium Webdriver / Chromedriver

I have a cucumber project in Ruby using Selenium Webdriver and Chromedriver and I would like to know if a page I access is up or in maintenance. To do this, I would like to access the response-headers ...
4
votes
1answer
277 views

Unwanted new tab opens every time I click on a link (which is not expected) [closed]

I have an issue with my automation (selenium-webdriver). Every time I click on a link, that link would open in a new tab ‒ this is not expected, and links do not have _blank attr. set to them. My ...
4
votes
1answer
307 views

Selenium tests aren´t launched anymore

I used to be able to launch all my Selenium2 WebDriver tests in Ruby on Rails via rake test:units. But recently, my test case(s) won't be found anymore. I dont get any notification or error message. ...
3
votes
2answers
1k views

How can I run one spec 100 times using the command line?

We're getting intermittent failures. Hope can I run one test 100 times to see how 'stable' it is?
3
votes
2answers
2k views

What are the differences between capybara and watir

I've used capybara for a while, now I see watir is another possibility for writing web automation. Both are ruby based and use selenium. Other than syntax differences, are there significant ...
3
votes
2answers
17k views

Connection refused error when running selenium with chrome and firefox drivers

I am running selenium tests with firefox and chrome drivers. I get a connection refused error when I run the tests in as a block Test example : require 'minitest_helper' headless = Headless.new ...
3
votes
2answers
405 views

How do I configure my env.rb file to be able to switch browsers?

Currently, here is part of my configuration with testing using Chrome: prefs = { 'download' => { 'default_directory' => "#{$myRoot}/PDF", 'prompt_for_download' => ...
3
votes
0answers
1k views

Headless Chrome with Docker Compose

I'm currently trying to setup headless chrome testing with Capybara in my docker-compose file. However, I keep getting that chromedriver has failed to start because it had crashed. Selenium::...
3
votes
1answer
920 views

how to use multiple wait conditions in selenium-webdriver using ruby?

I wanted to know, how I can use following waits in program in which situation? driver.manage.timeouts.implicit_wait = 20 driver.manage.timeouts.script_timeout = 20 driver.manage.timeouts.page_load = ...
2
votes
2answers
12k views

Getting Started Web service and RestFul API Testing with CUCUMBER - Looking for tutorials

I am looking to get started building a project and want to use CUCUMBER from day one. My Ruby background is Intermediate; however, I do have a good understanding of MVC and the structure within Ruby. ...
2
votes
1answer
33 views

Selenium with Ruby: Script not finding options in a drop-down

This is my first post, so if I have missed any info that should be included, please let me know. I am self-learning selenium/ruby automation in my spare time with only a little programming background, ...
2
votes
1answer
284 views

Test automation script with ruby, watir-webdriver to run in Safari browser in Windows?

I found in different places that, automation with safari can be done in MAC OS as safari is also an Apple product. But, we can download and install safari browser in windows and test there manually. ...
2
votes
2answers
217 views

Page Object Model and Automated Frameworks with Ruby?

So i've been reading a lot on Page Object Model. Im going to be starting developing a framework for a new project. We are using Selenium Webdriver w/Capybara (Ruby). I've seen most examples of PoM in ...
2
votes
1answer
100 views

What would switching from ruby rspec to minitest involve?

I see that minitest is now included in Ruby, just require the file. Replaces unittest. I'm still using rspec everywhere 'cos I came from Ruby on Rails. minitest looks just like rspec witht the ...
2
votes
2answers
1k views

Upgrade from Selenium 2.53 to 3.0.0

Is there an accepted upgrade path from Selenium WebDriver 2.53 to 3.0.0? I'm using the Ruby gem if curious.
2
votes
1answer
354 views

Appium (iOS) how to choose two UITableCells with the same name

I am using Appium and Cucumber with Ruby to carry out some UI tests on our application. I want to use the code below to select a button, with the same name but found in two different cells, for ...
2
votes
1answer
191 views

Test Automation tool able to determine object properties in desktop based application made with Ruby

I have to test a desktop application for Windows which was written in Ruby. I need to be able to inspect object properties. So far I have tried: UFT - it is unable to identify objects or properties ...
2
votes
1answer
1k views

How to implement the page-objects ruby gem with selenium

I would like to use the page-objects gem in my selenium test projects, but before I can do that I need to get a small proof of concept project working so I can play around with it. I have been ...
2
votes
1answer
68 views

Automation testing tools for non-GUI installer written in Ruby script on Mac and Windows

I am finding an automation testing tool to test a non-GUI installer which is written in Ruby or power script. The automation tool should work on both windows and Mac machines.
2
votes
1answer
1k views

How to Get Rid of Save Password Popup in Chrome (Ruby)

How would you disable the pop-up: "Do you want Google Chrome to save your password for this site?" I know it is due to upgrading my ChromeDriver to version 2.28. I have seen solutions recently but ...
2
votes
1answer
304 views

Preparing test data for Automated Testing

So i've ran into a bit of a problem, I have a set of automated tests created for a site, were looking into really moving towards a CI based system for testing (Running the test suite after pushing ...
2
votes
1answer
766 views

Regarding running Watir scripts for UI Automation from Jenkins CI - How to hook up Jenkins and watir-automations

I already have Watir-Ruby scripts running on a macintosh which uses Firefox as the browser to run the automation. I have been given a linux server where the Jenkins build is going on. I got to put my ...
2
votes
2answers
2k views

How to execute Ruby Selenium Web Driver tests using Jenkins?

I have written quite a few Ruby programs for my clients test automation project.But the problem is my client wants to check the output to his PC without instilling ruby.He is asking me to make one web ...
1
vote
4answers
639 views

Why does element.displayed? throws exception instead of boolean false?

Here's snippet of my code while (!$driver.find_element(:xpath,element2).displayed?) $driver.find_element(:xpath,element1).click() end for some reason element.displayed? throws this exception: ...
1
vote
1answer
2k views

Using Ruby Selenium WebDriver how to check URL or Navigation which return 404?

What is the most convenient way of using Ruby script for Selenium WebDriver to check all url's (from navigation menu)of any web page.Actually want to run them to see where they go. For example: ...
1
vote
1answer
69 views

What is the name for the 'describe it' format in testing?

This is with ruby-rspec but I have seen it for other languages too. BDD is one term but maybe that is to too general as it covers Cucumber which doesn't use this format. Example: describe "Stuff" do ...
1
vote
1answer
161 views

How to emulate right click options by Capybara?

I want to be stand on a specific element in the page then I make right click and choose one option from the menu appears
1
vote
1answer
121 views

Why are intermittent browser automation failures hard to fix and how to overcome that?

They seem to pop up almost randomly and with varying amounts of frequency. How to avoid them and fix the ones we have?
1
vote
2answers
636 views

Stop page load, or visit page without waiting for full page load -Capybara

Background: A web page takes about 2+ minutes to load. Problem: I am currently automating acceptance test using Capybara, Rspec, Selenium. Visit(URL) -- waits for all the way until the page is ...
1
vote
1answer
279 views

Display scenario/test names in Browserstack

I've got a set of cucumber tests I'm running using ruby/capybara. I have the tests outputting to Browserstack but it only outputs the session ID which isn't of much use to me and want to replace with ...
1
vote
2answers
53 views

How to test a process that involves an email using Ruby?

For instance login thru email verification requires you receive and respond to an email. There seems to be a solution in Java called GreenMail. Does anyone know of a Ruby solution?
1
vote
1answer
177 views

How to get the text from a text Box in UI when the text is not present in DOM?

I have a text box in the UI from which I want to get the text. The problem is the text is not present in the dom. It is inserted through some javascript/jquery. How to get the text from the text box ...
1
vote
1answer
709 views

Why do rspec-capybara chrome tests run headless fail on my mac and how to diagnose/fix it?

My colleague with a windows machine doesn't have this issue with the same code. All my tests that pass normally when run in chrome - fail when run headless at the point where the user presses save ...
1
vote
2answers
2k views

Selenium Ruby - How to find a radio button by name and value?

I have two radio buttons YES and NO, the step on the feature file can pass argument to the method, both radio buttons has the same name so I want to click on the radio button by finding its name and ...
1
vote
2answers
155 views

What ruby automation options (capybara, watir) will let me use Selenium 3?

Selenium 3 came out in 2016. Which ruby test frameworks have adopted it? I want to use contains which is available in Selenium 3 for selecting elements.
1
vote
1answer
39 views

ERROR at the time of capybara installation

I am trying to setup environment for Web Testing using Capybara & Cucumber. I am hitting command "gem install capybara" to install but getting an error on the terminal is: ERROR: Could not find a ...
1
vote
1answer
648 views

AWS EC2 - Cucumber, Selenium-Webdriver, Capybara, Ruby, **Jenkins** - Not a File “/usr/bin/chromedriver”

I was hoping to get a web automation test script working on an AWS EC2 instance running Ubuntu 16.04 LTS with Ruby; Capybara and Cucumber frameworks. I am intending to use Selenium-Webdriver as my ...
1
vote
1answer
676 views

What's the difference between using Python vs. Ruby for Browser Automation testing? [closed]

I want to automate test cases on web browsers and I love the concept of Python's Salad (mix of Lettuce (BDD) and Splinter (browser automation)). But I've heard that Salad might not be the most stable,...
1
vote
1answer
1k views

How can find iframe which is DIV > Iframe > form > text field with watir-webdriver [closed]

I am trying to target email text field inside form which resides in iframe . <div class="iframecontainer"> <div class="iframe"> <div class="headerText resultHeader">Result:...
1
vote
3answers
11k views

Finding grandparent of an element using xpath in selenium

I want to click the parent of an element if the text within the child matches a certain string. I am using contains to find the text and :xpath,"../../" to find the parent. Here is ruby code: test=@...
1
vote
1answer
584 views

When to launch application server during a cucumber test

I am currently setting a testing environment and I want to for now run my automated tests locally (I'll run then on a CI server in the near future). I have written a script which goes into the ...
1
vote
1answer
180 views

Pre-load database for testing

I'm a bit new to mocking data for testing. I'm using ruby in conjunction with watir-webdriver and I have a local version of the app. I'd like to run a script which empties the tables of the local ...
1
vote
2answers
618 views

Test Automation Using Ruby Selenium Web Driver

I have written quite a few Ruby programs for my clients test automation project.But the problem is my client wants to check the output to his PC without instilling ruby.He is asking me to make one web ...
1
vote
1answer
299 views

Loading test data from MySQL database

I use Ruby with Selenium to do test automation on a web application that has a MySQL DB behind it. I need a good way to load data into the DB from a Ruby script. So far in my research I have found ...