Cucumber_AccessIssue_parameterised_featureFile #84

Closed
PritiSathe04 opened this Issue Oct 4, 2016 · 2 comments

Projects

None yet

2 participants

Summary

Feature: Contact Us Page
As an end user
I want a contact us page
So that I can find out more about QAWorks exciting services!!

Scenario: Valid Submission
Given I am on the "QAWorks" on "Chrome"
When I click on "Contacttab"
And I enter "" with "namelocate"
And I enter "" with "emailocate"
And I enter "" with "messagelocate"
And I click on the "SendButton"
Then I should be able to contact QAWorks with the following information
| name | email | message |
|j.Bloggs | j.Bloggs@qaworks.com | please contact me I want to find out more |

Expected Behavior

1)It should open contact us page
2)It should able to send name,email,message to the text box
3)Click on send button and the data should get sent to qaworks.

Bug:
It is not able to send the data to name,email,message field.Instead of capturing data it is sending it as in the text box.

Function written for the featurefile
The following funtion doesnot work.
@And("^I enter "([a-zA-Z]{1,})" with "([^"]*)"$")
public void I_enter_name(String text,String object){
system.out.println("I Click On "+ object);
selenium.type(text, object);
}

Locators for name,email,message respectively):

namelocate=//input[@id='ctl00_MainContent_NameBox']
emailocate=//input[@id='ctl00_MainContent_EmailBox']
messagelocate= //*[@id='ctl00_MainContent_MessageBox']

Utility functions:
locator has passed to objectname
,, has sent to Text in the following function.

public void type(String Text, String objectName)
{
driver.findElement(By.xpath(OR.getProperty(objectName))).sendKeys(Text);

    }

Possible solution:
change the regular expression to accept the paratemeter in step definition.

Owner

Hi @PritiSathe04,

I think you have opened this ticket because you need help using Cucumber, is that correct?

Please understand that this is not a support forum. We use this issue tracker exclusively for tracking defects and new features in Cucumber itself.

For support using Cucumber you need to visit http://cucumber.io/support where there are signposts to our community forum and chatroom. I hope that helps!

@mattwynne mattwynne closed this Oct 4, 2016

Please can you grant me the permission to join I have sent the request.

Emailaddress- priti.sathe04@gmail.com

On Tue, Oct 4, 2016 at 4:59 PM, Matt Wynne notifications@github.com wrote:

Hi @PritiSathe04 https://github.com/PritiSathe04,

I think you have opened this ticket because you need help using Cucumber,
is that correct?

Please understand that this is not a support forum. We use this issue
tracker exclusively for tracking defects and new features in Cucumber
itself.

For support using Cucumber you need to visit http://cucumber.io/support
where there are signposts to our community forum and chatroom. I hope that
helps!


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#84 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AVjuC2Fm-8XhW4uOn2H_sFAIK5CB64pRks5qwnfLgaJpZM4KNeaz
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment