Questions tagged [ruby]

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

Filter by
Sorted by
Tagged with
1
vote
2answers
83 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
64 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 ...
0
votes
1answer
29 views

How can I test if a page object yml file has orphaned keys using rspec?

I like using page objects through a yaml file with name:locator pairs One problem I run into is that over time as the locators file grows, test cases are changed or removed and we end up with ...
0
votes
1answer
41 views

How can I test if a page object yml file has duplicate keys using rspec?

Given a yml file with thing1: 'thing1' thing2: 'thing2' thing3: 'first' thing3: 'second' thing4: 'thing4' thing5: 'thing5' thing5: 'thing5' thing6: 'thing6' How can I write an rspec test that fails ...
1
vote
1answer
104 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 ...
-2
votes
2answers
65 views

Coding assignment for Ruby QA job?

I'm trying to hire a QA engineer to come in and relieve some technical debt on our test suite. I'm having a hard time testing their knowledge of ruby and testing scripts in ruby. Any suggestions on a ...
2
votes
2answers
113 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 ...
0
votes
1answer
181 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
65 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
339 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
48 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
120 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
97 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
165 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
84 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
382 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
659 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
884 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
255 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?
1
vote
1answer
599 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
478 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
111 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
265 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
81 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
352 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
947 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
67 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
1k 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
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
151 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
152 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
1k 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
530 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
515 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
36 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
190 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
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
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?
0
votes
2answers
161 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
596 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
256 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
228 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
406 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
291 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
672 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
166 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 ...
2
votes
1answer
855 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 = ...