Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [ruby]

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

0
votes
1answer
23 views

send_keys option do not work in firefox headless mode using Capybara

<span class="Select-some-wrapper" id=“id—value"> <div class="Select-placeholder">Name</div> <div role=“xx” aria-expanded="false" aria-owns="" aria- activedescendant=“id—value" ...
0
votes
1answer
43 views

How to enter text into a text field nested in an iFrame?

I am using Ruby with Cucumber and attempting to build up a suite of automated tests against a dynamics 2013 system. We have a cart that is a nested into an iFrame and we are attempting to enter a ...
0
votes
1answer
44 views

Can you set an Active Directory username and password using Chrome capabilities?

I currently have tests in rspec/capybara that use Active Directory to automatically log users in. I would like to specify a different username/password within a Chrome profile in order to test ...
1
vote
2answers
33 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
51 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
40 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 ...
2
votes
1answer
118 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
36 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 ...
0
votes
1answer
125 views

How to assert that all input fields are clear from a web page form after being reset?

I am revisiting a page to create a new record instead of editing a record and I need to ensure that all the field values have been cleared out. (the page is shared between the different actions so I ...
0
votes
2answers
272 views

How to clear text field in Appium 1.8.0?

Using appium 1.7.2, my test ran correctly and never had any issue with clearing text field with element.clear. but now since i upgrade my appium to 1.8.0 element.clear seems to stop working. it didn't ...
0
votes
2answers
317 views

Page Object Model with Ruby and Selenium(Capybara)?

So I've written a good amount of scripts using Capybara with Selenium Web-driver. It's going well but my automation tests feel more like step by steps scripts, without much Object Oriented design or ...
0
votes
1answer
97 views

Selenium with ruby how to identify an object by its type? e.g <input type=“text” name=“FirstName” value=“”>

Selenium with ruby how to identify an object by its type? e.g <input type="text" name="FirstName" value=""> What is the ruby code to identify this kind of element?
0
votes
1answer
230 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 ...
4
votes
2answers
197 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 ...
1
vote
1answer
66 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?
2
votes
1answer
192 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. ...
1
vote
0answers
54 views

(Ruby) How can I invoke multiples Selenium Webdriver just in one browser POM

I'm newbie on ruby language... Currently I am using POM (page objects model) with Selenium webdriver. This is my throuble: As I'm using selenium with POM, I have 3 classes (register.br, login.br and ...
3
votes
2answers
228 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' => ...
2
votes
1answer
558 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 ...
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::...
2
votes
1answer
55 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.
0
votes
1answer
522 views

How to connect Jenkins to my test folder saved on my C drive?

I'm getting the error message below: Building in workspace C:\Program Files (x86)\Jenkins\workspace\Motor Trade [Motor Trade] $ sh -xe C:\Windows\TEMP\jenkins8268766883038519599.sh The system cannot ...
1
vote
2answers
1k 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
123 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
0answers
120 views

Cucumber/Selenium WebDriver Ruby not popping a browser during remote session (TeamViewer)

This is a bit of a mystery. I'm running a remote desktop session using TeamViewer in an OSx system (which behaves like an ordinary console in every way that I can detect). From the command line, I'...
2
votes
2answers
890 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 ...
0
votes
2answers
362 views

Xpath of an element keeps changing when testing in different OS or device

Me and my team sometimes experienced this issue when testing one cucumber feature in: different version of Android and iOS different device with same OS version. this really slowing us down ...
1
vote
4answers
235 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: ...
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 ...
1
vote
1answer
30 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 ...
0
votes
1answer
106 views

How do I stop my rspec capybara tests failing intermittently

The intermittent failures are hard to pin down and they can be in many different tests. Often you can see the element you are targeting in the browser but the program just doesn't seem to be in sync ...
0
votes
1answer
27 views

Running tests in chrome but just getting data;. in every browser window

My test suite (ruby, rspec, capybara) was able to run browser based feature tests before but they somehow are broken now, and none pass. This only happens on my Ubuntu machine. On other machines ...
2
votes
2answers
951 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.
3
votes
2answers
413 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?
0
votes
2answers
113 views

Stop animations javascript and other front end work on page load with selenium

I have a flaky selenium spec because a notice disappears after page load because of a separate event that happens from polling the client or some other change. One solution would be immediately on ...
1
vote
1answer
485 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 ...
0
votes
3answers
213 views

Is there any Java based page object framework similar to Taza?

This is probably not a typical SO question. But, I need to post this here because google searches have not given me the answer I was looking for. Hopefully, the experienced developers here can give ...
0
votes
1answer
216 views

Stopping Test Servers on Gitlab CI?

I posted this on SO, but figured it might be more appropriate here since it's an actual testing question. I have a CI.yaml file (For Gitlab CI) that builds our Rails app and runs integration (Rspec/...
1
vote
0answers
319 views

Can't find button and click

Got a button that changes state when clicked on. But, I cannot "find the button, even when in it's default state.: Source code: <div class="alert alert-warning" ng-hide="show_cd_only"> <...
2
votes
1answer
232 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 ...
1
vote
1answer
605 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
153 views

What frameworks are good for a beginner in automated functional testing? [duplicate]

I want to start doing some functional testing. I tried some time ago in Java and Selenium, but seemed to run into a number of problems with configuration. Previously I have made simple tests with ...
1
vote
0answers
712 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 = ...
0
votes
1answer
282 views

Rubymine / Cucumber: Tests run fine, but are shown as “Failed to start” in Event Log

I have several Cucumber tests that are running fine (I closely watch them), all pass, and everything works good. But Event Log in Rubymine keeps showing all the tests that pass in this way: Failed to ...
5
votes
1answer
3k 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
159 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 ...
5
votes
1answer
4k 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 ...
2
votes
1answer
621 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 ...
0
votes
1answer
5k views

Get browser's current position using selenium webdriver

I would like to know if there's any way to know the absolute position of the browser's visible canvas. Ex: if I'm at a webpage and I scroll down 200px, I would like to know I'm on the coordinate {X,...
4
votes
2answers
4k 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 ...