Contributions
Re: How to call a step in Step definition in TestComplete
Could you please see the example again.I have two scenarios and i wanted to run the same steps for scenario 1 in scenario 2, i do not need to design the same step in scenario 2.See the example below. Scenario: 1 I create new sale Given I want to create a sales order When I open the sales order page Then a new sales order is created Scenario: 2 I add another sale Given I have created an order When I add a sales order line Then the order total is updated [Binding] public class MySteps: Steps { Given("I want to create a sales order") ------------Senario 1 - step definition public void CreateSalesOrder() { } Given("I open the sales order page") ------------Senario 1 - step definition public void SalesOrderOpened() { } Given("I click the add new order button") ------------Senario 1 - step definition public void ClickNewButton) { } Then("a new sales order is created") ------------Senario 1 - step definition public void OrderCreated() { } ------For scenario 2's first step which would be calling scenario 1 step definitions [Given("I have created an order")] public void CreateOrder() { Given("I want to create a sales order") ----Calling --Senario 1 - step definition Given("I open the sales order page") ----Calling --Senario 1 - step definition Given("I click the add new order button") ----Calling --Senario 1 - step definition Then("a new sales order is created") ----Calling --Senario 1 - step definition }2.4KViews0likes4CommentsRe: How to call a step in Step definition in TestComplete
Thank you for your reply. The example above is the way it works with Specflow(gherkin) and visual studio with the step definition(code implementation for the scenario steps). I do not need to have a dependency function in VS-Specflow, I would be calling the scenario-steps(binding) for the actual calling scenario steps I need to call in a required scenario - step definition(code implementation) to avoid unnecessary multi Ghekins scenario - steps. I think the behaviour in TestComplete is not the same as Specflow in VS and Cucumber2.4KViews0likes5CommentsRe: How to call a step in Step definition in TestComplete
Is this a limitation to TestComplete? The above example reduces multi-steps in Scenario when the step has a step definition(code behind) already from another scenario. How should I call steps(code behind for scenario-step) from step definition(code behind for scenario-step) in TestComplete?2.4KViews0likes8CommentsRe: How to call a step in Step definition in TestComplete
Hi, Could you please see the example for my enquiry.See the example below for the 2 scenarios, the first scenario have step definition but scenario 2 is calling the step definition for scenario 1 in other to fulfil Feature steps:Given I have created an order.How can i achieve this with TestComplete on JScript. Scenario: 1 I create new sale Given I want to create a sales order When I open the sales order page Then a new sales order is created " Scenario: 2 I add another sale Given I have created an order When I add a sales order line Then the order total is updated The step definitions for Scenario 1 that within the method for the first scenario 2 file step[Given I have created an order] for scenario 2,would be executed .How can i acnhieve in TestComplete? [Binding] public class MySteps: Steps { [Given("I have created an order")] public void CreateOrder() { Given("I want to create a sales order"); Given("I open the sales order page"); Given("I click the add new order button"); Then("a new sales order is created"); }2.4KViews0likes11CommentsHow to call a step in Step definition in TestComplete
How can i call step into another scenario for the Step definition.I know how to do this in Specflow but i do not how the to call the step in other to avoid duplication.Could you please give me example how to do it in Step definition not the feature files.Solved3.1KViews0likes13CommentsEvaluateXPath is taking longer to return the total of the webelements
Hi, Evaluate is taking more than one minute to return the total(145) of web elements in TestComplete.In Selenium it takes 5 secs.Is there any method that i can use to return the total of the web elements for dynamic xpath. e.g "//*[@waj='rows']/div"682Views0likes1CommentSelect drop down problems
I am having problem to select a drop down item with ClickItem(), it was working before until the tags "select and option" have been replaced with "div". It was working with these below html tags with select and options e.g <select id='dropDownMenu'> <option value='foo'>Title1</option> <option value='bar'>Title2</option> </select> but it is not working with the below example for the html <div id='dropDownMenu'> <div value='foo'>Title1</div> <div value='bar'>Title2</div> </div> Could you please let me know if there is any other method to select the dropdown without using the ClickItem()Solved1.3KViews0likes1CommentHow to put specify multiple List separator in a function
Hi, How can i pass multiple list separation e.g comma[","] vertical line["|"] within a function to handle any parameter passed with any list separator. See my eaxmple below,but i am not getting it function TextString(array) { if(aqString["Contains"](array,",") == 0) { aqString["ListSeparator"] = ',' } else if (aqString["Contains"](array,"|") == 0){ aqString["ListSeparator"] = '|' } /*Get the value of the first number*/ varFirstStringTobeginLooping = aqString["GetListItem"](array,0); }930Views0likes2Comments