Questions tagged [ruby]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
103 views

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

I'm a newbie on ruby language... Currently, I am using POM (page objects model) with Selenium webdriver. This is my trouble: As I'm using selenium with POM, I have 3 classes (register.br, login.br ...
4
votes
1answer
1k views

How to use multiple wait conditions in Selenium Webdriver using ruby?

I wanted to know, how I can use following waits in program at which situations? driver.manage.timeouts.implicit_wait = 20 driver.manage.timeouts.script_timeout = 20 driver.manage.timeouts.page_load = ...
0
votes
0answers
51 views

I am new with Ruby and Cucumber and I got this error undefined method `col_span' for class `Watir::TableCell' (NameError) what should I do?

I am new with Ruby and Cucumber and I got this error: undefined method 'col_span' for class 'Watir::TableCell' (NameError) What should I do?
1
vote
1answer
65 views

Are Characterization (Golden Master/Snapshot) tests supposed to be human readable?

I am trying to write characterization tests, in order to quickly put a legacy system to a test harness. I was not able to find many examples with production code. The examples I find are small ...
2
votes
2answers
600 views

Check that an element does not exist *after* a button is clicked

With ruby, I'm doing some cucumber tests with capybara to test a Shiny application (shiny is a R package to do web applications). But I'm a newbie with ruby and cucumber (and this is my first post ...
-1
votes
1answer
142 views

How to store text from a webpage using Ruby?

Ruby / automation beginner here - I'm trying to get and store an email address from a webpage using the element id, but am getting the error undefined local variable or method 'customer_email_address' ...
2
votes
3answers
629 views

Run Ruby Selenium Web Driver without Ruby?

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
627 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
1answer
339 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, ...
1
vote
0answers
236 views

My mock test for Github client contains messy stubbing and it feels like I'm testing implementation details

I wrote a GithubClient class which is basically a wrapper for Ruby's Octokit library. It contains one public method aside from the constructor, called push, which basically creates commit in the ...
1
vote
0answers
132 views

Header isnt being sent when using faraday gem ruby

I am doing an Api automation in Ruby and I am using the Gem Faraday to automate a file upload in my API. I have the follow problem: My Header is not being sent. I just tried all the options and is ...
0
votes
0answers
134 views

How can I integrate database validation (queries, updates) in Ruby, Cucumber, Watir project in RubyMine

I have setup a project in RubyMine using Ruby with Cucumber, RSPEC, and Watir for UI automation of feature files. (I also have page objects implemented). In my step_definitions where the actual UI ...
1
vote
2answers
3k 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 ...
0
votes
2answers
789 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
votes
2answers
132 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 ...
1
vote
1answer
82 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
179 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 ...
0
votes
1answer
168 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 ...
2
votes
2answers
483 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 ...
12
votes
7answers
83k 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?
2
votes
1answer
981 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 ...
0
votes
1answer
341 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
101 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 ...
1
vote
2answers
73 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?
0
votes
1answer
1k 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 ...
2
votes
1answer
72 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
233 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 ...
1
vote
1answer
271 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
1k 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 ...
0
votes
1answer
416 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?
2
votes
1answer
135 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 ...
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 ...
0
votes
1answer
572 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
1k 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
1k 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 ...
5
votes
2answers
2k 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
162 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
1answer
756 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,...
3
votes
2answers
558 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
317 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. ...
0
votes
3answers
272 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 ...
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 ...
3
votes
0answers
2k 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::...
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 ...
0
votes
1answer
2k 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
1answer
42 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 ...
2
votes
1answer
345 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
2answers
157 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.
4
votes
2answers
6k 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 ...
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 ...