cucumber

Capybara:Webkit unable to find iframe or its content

有些话、适合烂在心里 提交于 2019-12-08 17:12:09
问题 I allow users to share photos with other individuals. When the user is viewing a photo and its description, they can click on "share" and a new page loads. On this page the fill in an email address (and optional comments - not tested here) and click "Share Photo". The systems sends an email to the recipient with a link contained and the subject line includes the name of the photo. The page with the Share form also displays a list of individuals the photo has already been shared with. The full

How do I conditionally skip a scenario in Cucumber?

a 夏天 提交于 2019-12-08 16:33:57
问题 How do I conditionally skip a scenario? For example, I wish to continue a scenario only if certain conditions are met, but I do not want it to register as a failure if it's not present. 回答1: This is an issue I had. The tests I write are against a UI that has a constantly changing BE database that I am currently unable to have static data in. This means that some times it is possible that there is no data for the test. Not a pass not a fail, just unable to run. The way that I found to work

Observed package id 'build-tools;20.0.0' in inconsistent location

≡放荡痞女 提交于 2019-12-08 14:54:03
问题 ./gradlew --parallel :app:assembleDebugTest when i run above command in android studio terminal i got this error. Error Parallel execution is an incubating feature. Observed package id 'build-tools;20.0.0' in inconsistent location 'sdk/build-tools/android-4.4W' (Expected 'sdk/build-tools/20.0.0') Gradle file apply plugin: 'com.android.application' android { compileSdkVersion 22 buildToolsVersion '23.0.2' packagingOptions { exclude 'LICENSE.txt' } defaultConfig { applicationId "package"

Run tests in multiple browsers with ruby + watir-webdriver + cucumber and parallel_tests gem

[亡魂溺海] 提交于 2019-12-08 14:08:29
Currently I use the parallel profile in cucumber.yml to load an environment specific file and hooks.rb to set the browser. I run my tests using 'parallel_cucumber features'. There is not much in my hooks.rb file: Before do @browser = Watir::Browser.new :firefox end After do @browser.close end The profile looks like this: parallel: FIG_NEWTON_FILE=local.yml --no-source --color --format pretty Is there a way to change my hooks.rb file so that all features run against a set of browsers (firefox, chrome, safari)? Is possible to pass the file name or environment through the command line? You can

All steps shown as pass before protractor cucumber execution

江枫思渺然 提交于 2019-12-08 12:59:38
问题 While executing my scripts, Immediately all steps shows as pass in console after that my actual scripts getting executed. Even after returning promise in each step. Feature File: Feature: Running Cucumber with Protractor Scenario: To verify the Search result Given I am on home page When I enter search value Then I verify the search page Step Definition: var chai = require('chai'); var chaiAsPromised = require('chai-as-promised'); var expect = chai.expect; chai.use(chaiAsPromised); module

Using Watir to click on a specific link when there are other links with the same display text

蹲街弑〆低调 提交于 2019-12-08 12:56:03
问题 so i have a table that looks something like that where there is a list of books and in the very first column there is two links, view and delete, for each book. i would like to be able to use Watir to find the row with a specified book title and click on that view button for that book. Here is what I have so far And /^click on View link of "(.*)" on the result set table$/ do |cell_name| cellButton("submit.view", cell_name, "") end # # And /^click on Delete link of "(.*)" on the result set

Cucumber test double: scenario failing but its steps passing

拈花ヽ惹草 提交于 2019-12-08 12:38:59
问题 I'm learning Rspec + Cucumber with The RSpec Book. I'm just at the beginning, while developing a Codebreaker game. In it, there is a feature "Codebreaker starts game" that represents simply a user typing a command in the shell and getting two responses: "Welcome to Codebreaker!" and "Enter a guess:". Here it is how the feature looks like: Feature: code-breaker starts game As a code-breaker I want to start a game So that I can break the code Scenario: start game Given I am not yet playing When

Cucumber feature files are not executed using Maven

安稳与你 提交于 2019-12-08 12:17:43
问题 Hi I have setUp a Java project using Maven in eclipse. I am facing an issue whenever I am trying to run the script. Its is executed by the not opening the desired website which I am parsing from the feature file. Please have a look to the following code and Image of my directories setup in eclipse Here is my code for PageStepsDefs.java package com.workshop.airport.workshop.airport; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import cucumber.api.java

Is “enabled?” method available on Watir and/or Page-Objects for a link?

独自空忆成欢 提交于 2019-12-08 11:42:43
问题 Yesterday i was working on determining is this link was or not enabled, waiting until enabled in order to click it. I'm using Cucumber + Ruby + Watir + Page-Object gem. The link is very similar to: <a id="the_link" href="#" disabled="disabled">Proceed with your order</a> Once you fill some fields, the link is enabled and the source changes to: <a id="the_link" href="#">Proceed with your order</a> The idea is to wait until the link is enabled in this way, which works with buttons: def click_on

Testing http basic authentication with Cucumber and RSpec in Rails 3.2.3

家住魔仙堡 提交于 2019-12-08 11:36:58
问题 I want to test the build-in basic http authentication mechanism in Rails 3.2.3. I have tried to test the http authentication in both RSpec and Cucumber but with a failing step in both tools. In Cucumber I get the following message on running my Feature: When I perform HTTP authentication as "admin" with "test" # features/step_definitions/web_steps.rb:1 undefined method `env' for nil:NilClass (NoMethodError) ./features/step_definitions/web_steps.rb:3:in `/^I perform HTTP authentication as "([^