Ruby Cucumber Automation

We are doing automation using Ruby and Cucumber. We have around 80 feature files, 1 web_Steps file containing all the generic steps. The problem we are facing is all locators are present in the feature file. So if the html structure changes then we h

Start the cucumber test with Mockito

I'm trying to run a JUnit Cucumber test that uses Mockito. Here's the issue I'm running into. In my Cucumber Runner class, I have @RunWith(Cucumber.class) And in my regular JUnit tests I have @RunWith(Mockito.class) Given that I can only have one @Ru

Fusion of two tables of capybara elements

This is similar to something i posted yesterday but i got mixed up with what i actually had in front of me. I have two arrays that need merging into the same index value but i have capybara elements as opposed to strings and integers. Example @return

Can not make cucumber work with Ruby 2.x on Windows

When I run cucumber, I get the following messages: *** WARNING: You must use ANSICON 1.31 or higher ( to get coloured output on Windows Warning: you should require 'minitest/autorun' instead. Warning: or add 'gem "minit

capybara / cucumber can not find the radio

I'm having an issue finding a radio button. Here is a snippet of the html: <form action="/" id="frm-info" method="post"><input id="ClickedButton" name="ClickedButton" type="hidden" value

Make the cucumber test pass if there is no test data

I am writing cucumber tests for a web-app that we are making for a 3rd party where they have complete control of our shared test-environment. As things are right now, my tests fail on almost a daily basis due to data being removed or changed in our t

Get the text of the div element with selenium

I am using Cucumber, with Ruby and Selenium. I've got the following HTML: <html> <body> <div class="breadcrumbtrail" id="breadcrumbtrail"> home </div> </body> </html> and the following step definitio

Selenium Webdriver gets a cookie value

I am trying to get a cookie value but keep getting an error of <Selenium::WebDriver::Driver:0x13a0e0e8 browser=:firefox> I am calling @browser.cookie_named("configsession").each do |cookie| puts cookie[:name] is there something I i'm doing

JVM cucumber: How to use a double as input value?

For a Behavior test that I'm trying to write, I require inputs that are floating point. How do I set up my gherkin string to look for these values?Simple (.+) should work Given I have a floating point 1.2345 number @Given("^I have a floating point (.

Ruby + Cucumber: How to run cucumber in the code?

I'd like to execute Cucumber features from within Ruby code. Typically the cucumber binary installed with the gem is executed on the command line with one or more features specified. However, I'd like to define logic that creates a dynamic feature ex

How to map a table of cucumber data to Scala?

Code: val someVariableIWantToSave //I do not know what to do here When("""^this request is sent to the XYZ service:$"""){ (requestData:DataTable) => //// we might want to do somethign else with Datatable in the mapping of

Share the backgrounds between the cucumber files?

I have some Cucumber scenarios, for which I created the following files: create_extended_search.feature activate_extended_search.feature edit_extended_search.feature delete_extended_search.feature Within these files, I have several scenarios. Three o

How to avoid hard coding values ​​in cucumber features?

When writing my scenerios, is it possible to not have to hard code text in the steps? Like say I am insert a username in a textbox field, and a password in the password field. If I need to do this in many places, it would be a pain to fix. Example: G

Javascript test via cucumber - is there a non-jruby solution?

Currently we're using Cucumber, Capybara, Celerity/Culerity w/jruby and I'm frustrated by the spurious failures on our Ajax and javascript heavy app. Not only that buy on our VM we end up having segmentation faults and memory issues after running the

how to check that nothing has changed in the cucumber?

The business scenario I'm trying to test with cucumber/gherkin (specflow, actually) is that given a set of inputs on a web form, I make a request, and need to ensure that (under certain conditions), when the result is returned, a particular field has

How can I find the first checkbox in Capybara?

I'd like to find the first instance of a checkbox using the capybara dsl. Anyone know how to do that? I thought perhaps it'd be this, but it didn't work: find('input:first', :type => 'checkbox') Assuming Capybara.default_selector is set to CSS then:

Rspec, Cucumber: Best Database Cleanup Strategy

I would like to increase the speed of my tests. Should I use use_transactional_fixtures or go with the database_cleaner gem? Which database_cleaner strategy is the best? I noticed that after migration from :truncation to :transaction my more than 800

ruby cucumber analysis practices

I have many cucumber feature files, each consists of many scenarios. When run together, some of them fails. When I run each single test file, they passes. I think my database is not correctly clean after each scenario. What is the correct process to

Using the cucumber test for downloading on rails 3

I want cucumber test for uploadify on ruby on rails 3. I had tried to click on the upload button from capybara but as it is neither button nor link. Furthermore, it is hiding the text_field so I cannot write "When I fill in "upload" with &q

Problem of strange cucumber roads

I'm doing a simple app in rails without using cucumber I have this user story: Scenario: add new expense Given I am on the expenses page When I follow "new expense" Then I am on new expense page Then I fill in "expense_title" with &quo

How to resolve the Rails model namespace collision

The story so far: I have a rails app with a model named "Term". All is well until trying to install Cucumber. Upon running rake cucumber I get Term is not a class (TypeError) This happens because Cucumber includes another gem, 'term-ansicolor' (

Test Framework for Web Services

We have a monolithic application written in Visual Dataflex, and various complementing applications written in other (.NET) languages. They all share the same database, and need to follow the same business logic. One way to facilitate unified busines