cucumber

serenity cucumber browser unique session per feature

我与影子孤独终老i 提交于 2019-12-12 04:05:58
问题 I'm looking at serenity (the following versions) <serenity.version>1.1.26</serenity.version> <serenity.maven.version>1.1.26</serenity.maven.version> <serenity.cucumber.version>1.1.5</serenity.cucumber.version> I have feature files F1, F2, F3. I'm looking for support to run all the scenarios in F1 (only) to run in a single browser session. The scenarios in F2 and F3 can run in a "browser per scenario" mode. How to achieve this? 回答1: Cucumber hooks do the job for you. import cucumber.annotation

cucumber repeat substeps in a feature file

最后都变了- 提交于 2019-12-12 03:56:16
问题 I have to run a feature file with multiple cases in a single login. For ex: Scenario: check total When user logs in with "username" and "password" And user checks for "" on "" And user checks for "" on "" Examples: | username | password | amount1 | date1 |amount2|date2|... some 20 entries.. I need to check for amount on date in a single login,while in my scenario it is login each time for every entry in data table.How do I achieve it? Instead I want something like this: When user logs in with

Change the simulator language

谁说我不能喝 提交于 2019-12-12 03:48:12
问题 I need to test my application against many simulator with different language settings. For this, I set appium desired capabilities in the terminal by running: ➜ appium --language 'fr' in order to set the language of my simulator to "fr". I tried also another method by creating different profiles in my cucumber.yml configuration file. Both methods are crashing my simulator(Please see logs below). Note: I'm using appium v1.5.1 MAC OS 10.11.4 Xcode v7.0.1 cucumber v2.3.3 ruby v2.3.0 Any ideas

How and what to test by using respectively Cucumber and Rspec?

本小妞迷上赌 提交于 2019-12-12 03:12:28
问题 I am using Ruby on Rails 3.2.2, cucumber-rails-1.3.0, rspec-rails-2.8.1 and capybara-1.1.2 with the Selenium driver. I would like to know how and what to test by using respectively Cucumber and Rspec? That is, what "behavior" should I treat with Cucumber and what with Rspec so to divide testing "concerns" in a proper way? For example , in order to test a view, should I test the presence of a CSS id in a page content by using Cucumber or RSpec? or both? 回答1: Use RSpec to test the various parts

making 'some_element'.present? in watir wait for less than 5 secs

旧巷老猫 提交于 2019-12-12 02:58:58
问题 How do we make some_element.present? or some_element.visible? wait for less than 5 secs.? Because I think some_element.present? alone will wait for default value of 30 secs before timing out. Thanks 回答1: I believe you are asking how to shorten the length of time before timeout, by default its set to 30 seconds, see below on how to customize that time. According to http://watirwebdriver.com/waiting/ Explicit waits There are four built in methods that you can use to make your waiting experience

Cucumber-Java i18n zh-CN in eclipse not working

﹥>﹥吖頭↗ 提交于 2019-12-12 02:29:06
问题 we are working on test automation using Cucumber-Java, Maven in Eclipse IDE below is the code which we are trying to execute but facing issues, kindly help us I have also change default encoding to UTF-8 Cucumber code # language: zh-CN 功能: 测试 场景: 注册负方案 而且 一世 开放 "https://accounts.coursera.org/signup" 网址 在 该 浏览器 Below is the step implementation @而且("一世 开放 \"([^\"]*)\" 网址 在 该 浏览器") public void i_go_to_URL_Chinese(String url) { try { String configuredURL = config.getString(url); DriverFactory

How to debug random cucumber failures?

我是研究僧i 提交于 2019-12-12 02:23:35
问题 I'm stuck with an issue with a cucumber test suite and I can't think of any way of debugging it. We have a pretty sizeable suit of cucumber features, all of them pass on the development machines. The problem is a couple of scenarios are failing when we run the whole cucumber suite on our ci server, and running them individually makes them pass and fail (apparently) randomly when the scenario tries to fill a form (that apparently isn't on the page). Because of the random failures I thought it

Cucumber features test fail but single cucumber test passes facebook and twitter test

杀马特。学长 韩版系。学妹 提交于 2019-12-12 01:36:06
问题 I've created test to simulate logging in facebook and twitter to register on my app. When I run the individual cucumber test, it passes. However, when I run the entire cucumber test, it fails at the facebook and twitter logging in. Note: the point where it fails is the 2nd time the facebook and twitter scenario is used to login. The 1st time the feature used passed. When running cucumber features. Unable to find field "email" (Capybara::ElementNotFound) ./features/step_definitions/microsites

Ambiguous match error in cucumber step definitions

扶醉桌前 提交于 2019-12-12 01:31:25
问题 In my cucumber step definitions I have the following Then /^I should see "(.*?)"$/ do |text| page.should have_content(text) end Then /^I should see "(.*?)" within "(.*?)"$/ do |text,css| within(css) do page.should have_content(text) end end This causes an "Ambiguous Match" error by cucumber when I run the features. I can work around this error by passing the --guess flag to cucumber. But I'm wondering why cucumber is finding ambiguity in the above two step definitions when both are clearly

Download and open file using Chrome Capybara Selenium

你离开我真会死。 提交于 2019-12-12 00:44:09
问题 I'm writing tests that downloads a PDF and opens it in browser so that I can confirm some content within. I'm struggling to find a solution to configure Chromedriver to download and open instead of saving to the downloads folder (default). Is there a way I can do this? Thanks 回答1: Currently (2015-07-12) this is an open issue in chromedriver. See: https://code.google.com/p/chromedriver/issues/detail?id=1081 for details. You may be able to work-around it by configuring the chrome profile. Based