cucumber

Cucumber V4 [io.cucumber] is not identifying @Given/When/Then and giving error “The import cucumber.api.java.en.When cannot be resolved”

让人想犯罪 __ 提交于 2019-12-20 06:24:27
问题 I am migrating from Cucumber Version 1.2.4 [ <groupId>info.cukes</groupId> ] to V.4.2.2 <groupId>io.cucumber</groupId> . After this, Cucumber Framework is not able to identify @Given/When/Then annotations and given error – The import cucumber.api.java.en.Given/When/Then cannot be resolved Eclipse suggesting to add below dependency. But my thought is when I am migrating to Cucumber V4( io.cucumber ) then why shall I add dependency of V1.2.4( info.cukes ). Can someone suggest which is the

Can I use background with examples in cucumber?

孤人 提交于 2019-12-20 06:24:03
问题 I want to pass an example with first step of all scenarios. But first step in all scenarios are same, just one element is different. So I want to all that step in background and want to add examples with background. In short suppose I want to navigate to facebook, twitter, google and youtube page and click on one element. Can I use following thing for that?? Background: Open the web-page Given Open the <web_page> website Examples: |web_page| |facebook| |twitter| |google| |youtube| Scenario: .

Cucumber: undefined step, although step should be defined

余生长醉 提交于 2019-12-20 05:31:28
问题 I have created the step: Given /^the feed "([^"]*)" has an item "([^"]*)" published at "([^"]*)"$/ do |feed_name, feed_item_title, published_at| feed = Feed.find_by_name(feed_name) FeedItem.make(:feed => feed, :title => feed_item_title, :published_at => published_at) end And I run the cucumber test with: Scenario: feed items should be sorted by date Given I am signed into an account called "GT" as a customer And there is a social feed called "Twitter" for the account "GT" And the feed Twitter

Undefined, Undefined in Chrome notification when it's triggered from Selenium

筅森魡賤 提交于 2019-12-20 04:38:40
问题 I am working on automating a website written in Python and using Angular where there are many confirmation notifications. The issue I have is that Behat doesn't seem to recognise those notifications, let alone allow me to interact with them. I have attached screenshots of what the notification should look like and the Undefined – Undefined error message Behat produces instead. My scenario: Then I select the Delete the Media Plan Line Checkbox And I delete the Media Plan Line And I select Yes

want to test assertion of integer value should be >3 in Karate API

我与影子孤独终老i 提交于 2019-12-20 03:52:15
问题 json response is "Value": 0.23 i want to put assertion here value should be less than 3 so how to do this ? tried some examples in documentation but they are for array format of jsonenter code here Scenario: Shows the minimum time any DB request to CS will take This value is an important indicator for the performance of the database access. Given path 'admin/rest/status/db/' When method get Then status 200 And match response contains { Value: ">3"} * match Value == { '#? _ > 3' } * match $

How do i scroll a UITable view down until i see a cell with label “Value” in Calabash

本秂侑毒 提交于 2019-12-20 03:33:09
问题 How do i scroll a UITableView down until i see a cell with label "Value" in Calabash/Cucumber . I've been trying to do it using: Then I swipe down until I see "Value" and using: Then I scroll down until I see "Value" but none of them seem to work. Thanks! The message I get when I try with the above is obviously: You can implement step definitions for undefined steps with these snippets: Then(/^I swipe down until I see "(.*?)"$/) do |arg1| pending # express the regexp above with the code you

Cucumber/Capybara Selecting Button from Specific Class?

感情迁移 提交于 2019-12-20 02:59:07
问题 So i've ran into an issue, im trying to click a button...which unfortunately has the same text (IE there are 2 buttons on the page which the same text, basically a save button) Lets pretend the button text is just "Save". I did notice that they had different classes. <button data-action="submit" class="btn btn-primary btn-save">Save</button> whereas the other button is: <button name="button" type="submit" class="btn btn-primary set-right"> <i class="glyphicon glyphicon-floppy-disk"></i> Save

Specflow step argument transformation on table cell contents with CreateInstance

醉酒当歌 提交于 2019-12-20 01:21:50
问题 Has anyone solved the riddle of how to apply SpecFlow Step Argument Transformations to cells in a table, in conjunction with the SpecFlow.Assist CreateInstance/CreateSet? (code combined here to save space) Given a table like the following: | Price | Zip | Effective Date | | 10.00 | 90210 | in 2 days | When the 'given' step executes And the table data populates a poco Then the effective date should be transformed into a DateTime with value of 2 days from today [Given(@"a table like the

How to integrate the cucumber in testNG?

主宰稳场 提交于 2019-12-20 01:09:12
问题 I have a framework which is used to created by core JAVA+TestNG. And the framework is followed by TDD model, and POM is our build management tool. Can somebody tell me is there any possible to update the framework from TDD to BDD using cucumber. But still I would like to do minimum changes for this requirement, like not changing any existing technologies(Core language,TestNG, Maven sys.,). My objective is how to run the cucumber TC's using testNG.xml/TestNG plugins in eclipse. Is it possible

How to transform Spec-flow table data into different values

删除回忆录丶 提交于 2019-12-19 23:28:32
问题 I need to transform Spec-flow table data that we get via table.CreateInstance() or table.CreateSet() . I am using Spec flow for DB testing and in some cases, Table field values needs to be mapped to different values as DB tables are storing codes instead of the the values we have entered in tables of feature files. I do not want to include the codes in feature files as it reduces the readability. For example, If I have entered Single for status as mentioned below, I want it to be mapped or