cucumber

Ruby - unable to bind to locking port 7054 within 45 seconds (Selenium::WebDriver::Error::WebDriverError)

♀尐吖头ヾ 提交于 2019-12-23 07:40:53
问题 I recently started seeing this error message when trying to run any Cucumber tests. I've done some research and found a few other similar instances of this error, but most of them were browser related issues. I don't see any browser specific error messages in this output: unable to bind to locking port 7054 within 45 seconds (Selenium::WebDriver::Error::WebDriverError) I saw another question posted here that was answered (A selenium webdriver exception), however that solution didn't work for

Rails3 Google Maps testing with selenium

こ雲淡風輕ζ 提交于 2019-12-23 07:29:32
问题 I'm trying to test a google maps app with Rails3. I'm using cucumber with capybara and selenium for JavaScript testing. I have a map where I wait for google maps to be loaded, and then send an ajax request to my server, where I get locations that I'm inserting into the map. I'm wondering if it's possible with selenium to wait until google maps is loaded, the ajax call to my server is finished and the marker are placed inside the map. The other issue is, how to select this marker within google

How to get the fully qualified name of method in Ruby?

妖精的绣舞 提交于 2019-12-23 05:57:30
问题 Let's say that I've got a method available in my workspace in Ruby. Is there a command I can use that will recover the fully qualified name of the method? I'm looking for something similar to the which function in Matlab, that returns an unambiguous name for any argument it's given. I ask because I'm writing a test in Cucumber that needs to send particular GET and POST requests. I have both get and post methods in my workspace, but I didn't import them myself and so I don't know where they

How to retrieve values from Result set and use it for calculations

╄→гoц情女王★ 提交于 2019-12-23 05:41:05
问题 I am using cucumber with Java and I want to calculate the tax. To do so I am connecting to data base and fetching the Gross Amount from data base. Below are the Gross pension values which result set has returned 248.36, 125.36,452.36,578.35,456.77, But now tax is getting calculated only for last value i.e, 456.77.I want to calculate tax for all the values. How do I do it? Below is the code which I have tried while(rs.next()) { //To retrieve the first column GrossPension = rs.getFloat(

How to retrieve values from Result set and use it for calculations

牧云@^-^@ 提交于 2019-12-23 05:41:01
问题 I am using cucumber with Java and I want to calculate the tax. To do so I am connecting to data base and fetching the Gross Amount from data base. Below are the Gross pension values which result set has returned 248.36, 125.36,452.36,578.35,456.77, But now tax is getting calculated only for last value i.e, 456.77.I want to calculate tax for all the values. How do I do it? Below is the code which I have tried while(rs.next()) { //To retrieve the first column GrossPension = rs.getFloat(

Passing Custom Headers to Selenium from Capybara

三世轮回 提交于 2019-12-23 03:58:12
问题 We use custom headers to authenticate our web apps. An http proxy service intercepts requests, confirms the authenticity of the user and then injects custom headers into the request. In order to test the app, I need to write those headers into the request before it hits my ApplicationController methods. Right now, the current hack works for all my non-javascript tests: # in hooks.rb Before do require 'capybara/driver/rack_test_driver' module Capybara::Driver class Authentic < RackTest def env

protractor + cucumber - element not visible even though element is visible

为君一笑 提交于 2019-12-23 03:52:12
问题 this.When(/^the user clicks on login button$/, function () { return browser.wait(wagLoginPage.loginPage.signIn.isPresent().then(function (visible) { if(visible){ console.log("element is visible !!!!!!!"); wagLoginPage.loginPage.signIn.click().then(function(){ expect(visible).to.be.true; }); } else{ expect(visible).to.be.true; } }, function () { chai.assert.isFalse(true, "SingIn is not visible!") })); }); My test randomly fails in the above step. For the above code, in console window

cucumber (in Java): How can I run scenarios with both tags only

耗尽温柔 提交于 2019-12-22 17:39:37
问题 I have some feature files with multiple tags for each scenario. But I would like to run those who has both @a AND @b scenarios. How can I do that? tags = {"@a, @b"}, --> this will do @a OR @b scenarios Thanks. 回答1: I figured it out: tags = {"@a, @b"}, --> this will do @a OR @b scenarios tags = {"@a", "@b"}, --> this will do @a AND @b scenarios 来源: https://stackoverflow.com/questions/39968139/cucumber-in-java-how-can-i-run-scenarios-with-both-tags-only

Cucumber Report Missing report result - report was not successfully completed

£可爱£侵袭症+ 提交于 2019-12-22 14:03:04
问题 I use Cucumber Reports plugin to get cucumber reports in pipeline jobs it works fine before but now i have this error: [CucumberReport] Preparing Cucumber Reports [CucumberReport] JSON report directory is "target/" [CucumberReport] Copied 1 json files from workspace "c:/jenkins/workspace/..." to reports directory "/var/jenkins_home/jobs/..." [CucumberReport] Copied 0 properties files from workspace "c:/jenkins/workspace/..." to reports directory "/var/jenkins_home/jobs/..." [CucumberReport]

rspec: undefined local variable or method `be_true'

自作多情 提交于 2019-12-22 13:48:31
问题 I am using rspec 2.4.0 and cucumber 0.6.4. I am running a simple scenario (for the sake of this question): Scenario: Simple Test When I test something with step definition: require 'rspec' require 'rspec/expectations' When /^I test something$/ do result = (1==1) result.should be_true end When I run this scenario I get the following problems: undefined local variable or method `be_true' for #<Object:0x1b3b424> (NameError) I am also using bundler to manage my dependencies. Am I doing something