Giter Club home page Giter Club logo

selenium-cucumber-ruby's People

Contributors

agilecreativity avatar chanond-w avatar coolbrg avatar datascaleshreyas avatar drcolza avatar sameer49 avatar shreyaspatil avatar vertisinfotechsameer avatar vertisinfotechshreyas avatar vertispse avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

selenium-cucumber-ruby's Issues

Unable to launch chrome in win10

Hey Sameer,
I am using Rspec as directed by my company . and also I follow your steps of understanding how we use the Selenium webdriver with ruby.

I have succesfully setup the test automation and working fine in Firefox,

When I try to execute the same in chrome and IE , the browser doesnt get launch and give me this error.

Failure/Error: @driver = Selenium::WebDriver.for :chrome

 Selenium::WebDriver::Error::WebDriverError:
   unable to connect to chromedriver 127.0.0.1:9515

Running any feature opens blank firefox

Hi,

I am new to selenium-cucumber-ruby and just started 2 days ago with very minimal experience in programming. I did everything that was stated here (https://seleniumcucumber.info/) in the tutorials for the setup and creating a new project. However, whenever I try to run any feature (even the example in the tutorial), it only opens a blank Firefox.

I have the following gems installed:
image

I also attached the chrome webdriver location to the path.

Thanks for any help.

Few canned methods are not recognized in Capyabra

Even while using the canned steps the cucumber is not recognizing.

i.e You can implement step definitions for undefined steps with these snippets: alert is displayed.

for few canned steps,

example:
Then I should see alert text as "(.?)"
Then I select "(.
?)" option by text from dropdown having id "(.?)"
Then I select "(.
?)" option by text from dropdown having name "(.?)"
Then I select "(.
?)" option by text from dropdown having class "(.?)"
Then I select "(.
?)" option by text from dropdown having xpath "(.?)"
Then I select "(.
?)" option by text from dropdown having css "(.*?)"


System: Windows 7 x64
Ruby Version: 2.1.7p400 (2015-08-18 revision 51632) [x64-mingw32]
Capybara: capybara (2.5.0, 2.4.4)
Cucumber: cucumber (2.1.0, 1.3.20)

wait_for

Would there be side-effects to wrapping most canned-in methods with wait_for?

undefined method `selected?' for nil:NilClass (NoMethodError)

I get error on executing following step on test site.

step %[I select "Male" option by text from radio button group having id "radio_gender"]

I then searched all files under C:\Ruby22-x64\lib\ruby\gems\2.2.0\gems\selenium-cucumber-3.1.5\lib\selenium-cucumber\methods

and couldn't find 'selected?' method defined anywhere. This is going to impact several canned tests.

How to query page elements

Hi,
How to query the page element elements for ids and texts. like in android we use "query("android.view.View")". So is there any way to get page element attributes?

Thanks,
PV

Can't change implicit wait timeout

Hello,
I'm trying to change the implicit timeout from 30sec to 10sec.
Changing this $driver.manage.timeouts.implicit_wait = 30 into $driver.manage.timeouts.implicit_wait = 10 from env.rb file doesn't work.

Everytime a step is failing, it takes 30 seconds to the test to fail :
timed out after 30 seconds (no such element: Unable to locate element:
It should be 10.

Can you help me @sameer49 ?

Repo Help?

@sameer49 i know you're super busy, but if you like i'd gladly help out on doing merges and PR reviews.. Please let me know what you think.

Thanks,
Brian

How to run jquery code from chrome browser which is started by driver

Hello,

I am trying to prepare TA for web, and try to using chrome browser to run a jquery code:
$driver.execute_script("return $()")
Well error pop up:
$ is not defined (Selenium::WebDriver::Error::JavascriptError)
Is anybody can help to check this?
BTW, if I using Firefox browser, it is OK.

Thanks

Need Help : Jenkins Parameters help

I would like to understand if we can acheive my requirement using this plugin:
I have with several columns in a text file. If I select Column1, then I would like to return all other column values in an array OR concatinated string in a specified format and return the string.
Example:
ParamProperties.txt:
Name Address1 City State Zip
John 1KaisyRd Newton MA 02030
Kelly 3NelloreRd Weston MA 02032
Now, I will select Name (John or Kelly), then it should return the parameter string as: 1KaisyRd-Newton-MA-02030.
I would like to understand if we can acheive my requirement using this plugin:

I have with several columns in a text file. If I select Column1, then I would like to return all other column values in an array OR concatinated string in a specified format and return the string.

Example:

ParamProperties.txt:

NameAddress1CityStateZip

John1KaisyRdNewtonMA02030

Kelly3NelloreRdWestonMA02032

Now, I will select Name (John or Kelly), then it should return the parameter string as: 1KaisyRd-Newton-MA-02030.

Failed to open TCP connection to 127.0.0.1:7055 (Connection refused - connect(2) for "127.0.0.1" port 7055) (Errno::ECONNREFUSED)

Issue Description:

If I run feature scenario A and scenario B together, Scenario A runs ok, but Scenario B throws following error:

Failed to open TCP connection to 127.0.0.1:7055 (Connection refused - connect(2) for "127.0.0.1" port 7055) (Errno::ECONNREFUSED)

But If I run scneario(s) one by one, it's working as expected.

Any thoughts!

I have close_driver method at at_exit.

here is my gem list:

selenium-client (1.2.18)
selenium-cucumber (3.1.5)
selenium-webdriver (3.3.0, 2.53.4, 2.35.1)
cucumber (2.4.0, 2.1.0, 2.0.0)
cucumber-api (0.4)
cucumber-core (1.5.0, 1.3.0, 1.1.3)
cucumber-wire (0.0.1)
json (2.0.3, 2.0.2, 1.8.6, 1.8.3)
json-schema (2.7.0)
jsonapi (0.1.1.beta6, 0.1.1.beta2)
jsonapi-parser (0.1.1.beta3)
jsonapi-renderer (0.1.1.beta1)
jsonpath (0.5.8)

Selenium XML TEst scripts and Cucumber

Hi,

We have selenium test driver scripts are XML files. We are planning to move to Jenkins and cucumber and how can we execute the tests using jenkins.

Cucumber with Selenium 3

I have to use selenium 3.0.0 (or higher version) with Cucumber, but I am getting following exception at all times:
cucumber.runtime.CucumberException: Failed to instantiate class

I tried different version combinations of Selenium and Cucumber like 3.0.0 with 1.2.4 respectively or 3.0.0 with 1.1.8 and so on.

But not able to get rid of exception, does anyone have idea?

Error when try to run android app

When i try to start Android App sample i receive this msg, firefox starts and calculator.feature does not work. would yo help me?

Messsage received:
WARNING: cannot load such file -- 2.1/gherkin_lexer_en
Couldn't load 2.1/gherkin_lexer_en
The $LOAD_PATH was:

Need Help

Good Day ,
Can anyone please help me how to test transaction on banking application page please.
Thanks

Anyone still maintaining this?

There are many things that this gem doesn't work with now (cucumber 2.2, selenium 2.53, and ruby 2.3.0, incorporate RSpec Matchers). I'd like to make a PR which overhauls the gem to be up-to-date with current standards, including, but not limited to the above gem mentions, but only if the PR's will be reviewed and merged by the project owner. @sameer49, please let me know if you're willing to review and approve a PR which should improve the flexibility and functionality of the gem.

Thanks,
Brian

undefined method 'expect' fails most methods in assertion_methods.rb

Hi, most of my assertion tests started failing after upgrading to ruby 2.2.6p396 (2016-11-15 revision 56800) [x64-mingw32] that I had to do to use another gem.

I get following error.

undefined method `expect' for #Object:0x00000007787e48 (NoMethodError)

I added require 'rspec/expectations' to my env.rb file as advised here - http://stackoverflow.com/questions/18071777/using-expect-matcher-in-rspec

but that didn't work either. Could you please look into this and advise?

Meanwhile, if I find a solution, I will post it.

CucumberExpressionError for few of the Step def.

Hello,

On executing few scenario which has step def with regular expression as \s*((?: , I am getting CucumberExpressionError.

Please suggest.

Issue:

Scenario: verify page title
Then I should see page title as "Test Page for selenium–cucumber"

Expression /^I should\s((?:not)?)\s+see page title as "(.?)"$/ has 2 capture groups (["", "Test Page for selenium–cucumber"]), but there were 1 parameter types ([".?"]) (Cucumber::CucumberExpressions::CucumberExpressionError)*

C:/Ruby23/lib/ruby/gems/2.3.0/gems/cucumber-expressions-4.0.3/lib/cucumber/cucumber_expressions/argument.rb:15:in build' C:/Ruby23/lib/ruby/gems/2.3.0/gems/cucumber-expressions-4.0.3/lib/cucumber/cucumber_expressions/regular_expression.rb:43:in match'
C:/Ruby23/lib/ruby/gems/2.3.0/gems/cucumber-3.0.1/lib/cucumber/glue/step_definition.rb:101:in arguments_from' C:/Ruby23/lib/ruby/gems/2.3.0/gems/cucumber-3.0.1/lib/cucumber/glue/registry_and_more.rb:66:in block in step_matches'
C:/Ruby23/lib/ruby/gems/2.3.0/gems/cucumber-3.0.1/lib/cucumber/glue/registry_and_more.rb:65:in each' C:/Ruby23/lib/ruby/gems/2.3.0/gems/cucumber-3.0.1/lib/cucumber/glue/registry_and_more.rb:65:in reduce'
C:/Ruby23/lib/ruby/gems/2.3.0/gems/cucumber-3.0.1/lib/cucumber/glue/registry_and_more.rb:65:in step_matches' C:/Ruby23/lib/ruby/gems/2.3.0/gems/cucumber-3.0.1/lib/cucumber/step_match_search.rb:19:in call'
C:/Ruby23/lib/ruby/gems/2.3.0/gems/cucumber-3.0.1/lib/cucumber/step_match_search.rb:19:in call' C:/Ruby23/lib/ruby/2.3.0/delegate.rb:83:in method_missing'
C:/Ruby23/lib/ruby/gems/2.3.0/gems/cucumber-3.0.1/lib/cucumber/step_match_search.rb:62:in call' C:/Ruby23/lib/ruby/gems/2.3.0/gems/cucumber-3.0.1/lib/cucumber/filters/activate_steps.rb:66:in matches'
C:/Ruby23/lib/ruby/gems/2.3.0/gems/cucumber-3.0.1/lib/cucumber/filters/activate_steps.rb:47:in result' C:/Ruby23/lib/ruby/gems/2.3.0/gems/cucumber-3.0.1/lib/cucumber/filters/activate_steps.rb:37:in find_match'
C:/Ruby23/lib/ruby/gems/2.3.0/gems/cucumber-3.0.1/lib/cucumber/filters/activate_steps.rb:33:in attempt_to_activate' C:/Ruby23/lib/ruby/gems/2.3.0/gems/cucumber-3.0.1/lib/cucumber/filters/activate_steps.rb:29:in map'
C:/Ruby23/lib/ruby/gems/2.3.0/gems/cucumber-3.0.1/lib/cucumber/filters/activate_steps.rb:29:in new_test_steps' C:/Ruby23/lib/ruby/gems/2.3.0/gems/cucumber-3.0.1/lib/cucumber/filters/activate_steps.rb:23:in test_case'
C:/Ruby23/lib/ruby/gems/2.3.0/gems/cucumber-3.0.1/lib/cucumber/filters/activate_steps.rb:12:in test_case' C:/Ruby23/lib/ruby/gems/2.3.0/gems/cucumber-core-3.0.0/lib/cucumber/core/test/case.rb:25:in describe_to'
C:/Ruby23/lib/ruby/gems/2.3.0/gems/cucumber-core-3.0.0/lib/cucumber/core/test/filters/locations_filter.rb:18:in block in done' C:/Ruby23/lib/ruby/gems/2.3.0/gems/cucumber-core-3.0.0/lib/cucumber/core/test/filters/locations_filter.rb:17:in each'
C:/Ruby23/lib/ruby/gems/2.3.0/gems/cucumber-core-3.0.0/lib/cucumber/core/test/filters/locations_filter.rb:17:in done' C:/Ruby23/lib/ruby/gems/2.3.0/gems/cucumber-core-3.0.0/lib/cucumber/core/filter.rb:62:in done'
C:/Ruby23/lib/ruby/gems/2.3.0/gems/cucumber-core-3.0.0/lib/cucumber/core/test/filters/tag_filter.rb:18:in done' C:/Ruby23/lib/ruby/gems/2.3.0/gems/cucumber-core-3.0.0/lib/cucumber/core/compiler.rb:24:in done'
C:/Ruby23/lib/ruby/gems/2.3.0/gems/cucumber-core-3.0.0/lib/cucumber/core/gherkin/parser.rb:37:in done' C:/Ruby23/lib/ruby/gems/2.3.0/gems/cucumber-core-3.0.0/lib/cucumber/core.rb:32:in parse'
C:/Ruby23/lib/ruby/gems/2.3.0/gems/cucumber-core-3.0.0/lib/cucumber/core.rb:21:in compile' C:/Ruby23/lib/ruby/gems/2.3.0/gems/cucumber-3.0.1/lib/cucumber/runtime.rb:74:in run!'
C:/Ruby23/lib/ruby/gems/2.3.0/gems/cucumber-3.0.1/lib/cucumber/cli/main.rb:33:in execute!' C:/Ruby23/lib/ruby/gems/2.3.0/gems/cucumber-3.0.1/bin/cucumber:9:in <top (required)>'
C:/Ruby23/bin/cucumber:22:in load' C:/Ruby23/bin/cucumber:22:in

'

Ruby - ruby 2.3.3p222

*** GEM LISTS ***
cucumber (3.0.1)
cucumber-core (3.0.0)
cucumber-expressions (4.0.3, 4.0.0)
cucumber-tag_expressions (1.0.1)
cucumber-wire (0.0.1)
gherkin (4.1.3)
rspec (3.5.0)
rspec-core (3.5.4)
rspec-expectations (3.5.0)
rspec-mocks (3.5.0)
rspec-support (3.5.0)
rubyzip (1.2.1)
selenium-cucumber (3.1.5)
selenium-webdriver (3.6.0, 3.4.0)

Generate random email address

Hi @sameer49 ,

I'm quite new to automation testing using selenium-cucumber-ruby and your repository has been very helpful to make me understand how this work. However, i'm a bit lost in one of my steps. It consists of adding a random email address in an input field on a webpage.

I'm initially tried to use the "enter_text(by, text, access_value)" but i don't know with what to replace the "by" and "access_value" (as i said, i'm very new to ruby and selenium-cucumber)

My aim is to define a method to generate a random string, in my env.rb file and then use it in my step definitions file to form an email address in the following format "auto#{random_string}@test.qa" , but not sure if it will work.

The method i used is as below(found this when searching online) :

def random_string(length=6)
chars = 'abcdefghjkmnpqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ0123456789'
string = ''
length.times { string << chars[rand(chars.size)] }
string
end

Can you help please?

Thanks

Selenium-cucumber console

I'm not sure if this is the right place for this question, but does Selenium-cucumber have a "console" option akin to calabash's calabash-ios console?
When I start an irb and attempt to require "selenium-cucumber", I get the following NoMethod error:

➜  selenium-test irb
irb(main):001:0> require "selenium-cucumber"
NoMethodError: undefined method `Then' for main:Object
    from /usr/local/lib/ruby/gems/2.3.0/gems/selenium-cucumber-3.1.5/lib/selenium-cucumber/assertion_steps.rb:4:in `<top (required)>'
    from /usr/local/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/lib/ruby/gems/2.3.0/gems/selenium-cucumber-3.1.5/lib/selenium-cucumber.rb:1:in `block in <top (required)>'
    from /usr/local/lib/ruby/gems/2.3.0/gems/selenium-cucumber-3.1.5/lib/selenium-cucumber.rb:1:in `each'
    from /usr/local/lib/ruby/gems/2.3.0/gems/selenium-cucumber-3.1.5/lib/selenium-cucumber.rb:1:in `<top (required)>'
    from /usr/local/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:133:in `require'
    from /usr/local/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:133:in `rescue in require'
    from /usr/local/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:40:in `require'
    from (irb):1
    from /usr/local/bin/irb:11:in `<main>'
irb(main):002:0>

I assume there is a way to load the selenium-cucumber api helpers into an irb, but I just don't know how. Any help would be much appreciated!

Inconsistency in the Grammar of 'Predefined Steps' related to 'co-ordinates'

Steps to Reproduce :

  • Go to Swipe steps
    • See the To perform swipe using co-ordinates with direction use following steps : => Then I swipe from **co-ordinates "(.?)","(.?)" to co-ordinates "(.?)","(.?)"
    • See the To perform swipe using co-ordinates => Then I swipe from co-ordinates "(.?)","(.?)" to co-ordinates "(.?)","(.?)"
  • Now go to long tap steps
    • See the To perform long tap with default duration of 2 seconds using co-ordinates use following step : => Then I long tap on co\ -ordinate "(.?)","(.?)
    • See the To perform long tap with customized duration of seconds using co-ordinates use following step : => Then I long tap on co\ -ordinate "(.?)","(.?)" for "(.*?)" sec

Expected Result

  1. The grammar in predefined steps should be consistent.

Actual Result

  1. The grammar in predefined steps is not consistent. Some steps use co\ -ordinate and some use co-ordinates

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.