cucumber

Remote Selenium WebDriver not responding to Cucumber tests

♀尐吖头ヾ 提交于 2019-12-08 11:34:58
问题 I've set up a feature in cucumber and am using the @javascript tag to have it run in selenium On my dev machine selenium runs fine but because webdriver doesn't support native events on osx yet I need to hook it up to a virtual machine running ubuntu I've got webdriver server running on my ubuntu machine and hacked my capybara driver like so it connect to the remote server like so: def browser unless @browser @browser = Selenium::WebDriver.for(:remote, :url => "http://192.168.1.69:4444/wd/hub

How do I execute a command on already opened browser from a ruby file

流过昼夜 提交于 2019-12-08 11:12:35
问题 I use cucumber framework for testing web application, as i develop my scripts i have to launch the browser again and again every time after adding something to my code. My question is "Is it possible to execute a command on already opened browser from a ruby(.rb ) file" ??. Which will save me a lot of time . My framework is based on cucumber, capybara and selenium webdriver. Thanks In advance 回答1: It's not possible to use existing browser with Selenium Webdriver. However, there drivers

Test framework for web services

不问归期 提交于 2019-12-08 11:06:16
问题 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 business logic across these is to provide web services as an interface for testing. Of course, for this to work, we need a good framework for testing web services. Any suggestions? For example, can Cucumber do this "out of the box"? 回答1: I'm assuming you

What does this Cucumber error message mean?

做~自己de王妃 提交于 2019-12-08 10:14:16
问题 I run cucumber features and get: Using the default profile... can't activate builder (~> 2.1.2, runtime) for ["activemodel-3.0.5", "actionpack-3.0.5", "railties-3.0.5"], already activated builder-3.0.0 for ["cucumber-0.10.2"] (Gem::LoadError) What is wrong here and how can I fix it? Thanks. 回答1: It means you have builder 3.0.0 installed and loaded while rails needs 2.1.x. Try $ gem uninstall builder followed by $ bundle (assuming you're using bundler). If you're not, do $ gem install builder

Install Calabash-cucumber error on OS X Mavericks

删除回忆录丶 提交于 2019-12-08 08:24:37
问题 I am trying to install calabash on OS-x mavericks for automation by refering to the link: (https://github.com/calabash/calabash-ios) I have installed latest version of ruby, homebrew, rbenv. Please note that command homebrew doctor is giving me one warning only: Warning: Xcode is installed to a directory with a space in the name. This will cause some formulae to fail to build. I was not able to remove this warning. Also some forum suggested that this may be harmless. after struggling with

Aruba cucumber tests (ruby1.9.2)

久未见 提交于 2019-12-08 07:53:33
问题 I've just installed the aruba gem which is an extension to cucumber. It allows you to test command line applications - like generators in Rails (but, as the documentation points out, you could use it for any cmd app). I have been following this pivotal labs article about using it, but for some reason it doesn't get past the first step: the first step is green ( the creation of the app ), but the following step tries to cd test_app and can't find it and fails. Given I run "rails new test_app"

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

安稳与你 提交于 2019-12-08 07:53:15
问题 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,

How to skip all cucumber-jvm scenarios when first scenario is failed

空扰寡人 提交于 2019-12-08 07:37:50
问题 I have 8 cucumber-jvm scenarios and the very first scenario measures the page load time and environment availability. In order to avoid unnecessary runs, if the first scenario is failed - for instance, the environment is not available, or loading too slowly - all other scenarios should be skipped. How can I do that? My CucumberOptions : @RunWith(Cucumber.class) @CucumberOptions( strict = true, features = {"src/test/resources/features"}, glue = {"stepDefinitions"}, format = { "progress", "html

Cucumber - Is it possible to share a table between Scenarios?

南笙酒味 提交于 2019-12-08 07:04:47
问题 Does anyone know its its possible to define a table once in a .feature file & then access it from multiple scenarios? I'm not chaining scenarios but many of them do need to pass tables with the same data to their step definitions - also for this reason examples won't really do what I need here. Thanks! 回答1: One possible solution is to tag all your scenarious where you need a table: @given_have_table Scenario: test Then I am happy Then bind Before hook to this tag and call step that declares

Multiple sessions in capybara

浪尽此生 提交于 2019-12-08 06:47:58
问题 Background I want to test logging in as multiple users on my webapp, and I am using cucumber and capybara to do this. I found this link on how to handle multiple sessions, but unfortunately, it doesn't look like cucumber can find the in_session method that is defined. How can I access it? Cucumber scenario Given I go to teacher login in Steve's browser When I enter "Steve" in the username field And I enter "StevesPassword" in the password field And I click login Then I should see "Steve