Please provide a full executable example rather than snippets. Else
it'd very difficult to reproduce and provide help.
On 04/03/2014 03:04, Johnny Wong wrote:
OK, some additional clarification. I am also using "Parametrization by
name delimiters" and this seems incompatible with Composite Steps
@When("I log into the MShops Administrator to check $active
item with title \"$title\", price $price, and stock $stock")
@Composite(steps = {
"When I log into the MShops Administrator",
"When I click \"Operaciones\"",
"When I click \"Publicaciones\"",
"When I click \"MercadoLibre\"",
"When I fill the textbox with the \"Buscar\" hint with
\"[NONCE]\"",
"When I click \"Buscar\"",
"Then I should see an $active MercadoLibre listing with title
\"$title\", price $price, and stock $stock",
"When I click \"MercadoShops\"",
"When I fill the textbox with the \"Buscar\" hint with
\"[NONCE]\"",
"When I click \"Buscar\"",
"Then I should see an $active MercadoShops listing with title
\"$title\", price $price, and stock $stock"
})
public void adminLogin(String active, String title, float
price, String stock) {
}
sends an exception telling me that '$price' is an unparseable number.
I need parametrization by name delimiters because it enables the reuse
of the same step for different parameter values with different names
Any thoughts?
On Mon, Mar 3, 2014 at 11:48 AM, Mauro Talevi
<[email protected] <mailto:[email protected]>> wrote:
Yes, it should be possible provided the candidate steps are
collected before the composite steps.
You need to ensure this in your steps factory. Try putting the
composite step in a separate steps class.
Else please attach a sample project reproducing the issue to a new
JIRA.
On 3 Mar 2014, at 13:30, Johnny Wong <[email protected]
<mailto:[email protected]>> wrote:
Hi -- I'd like to build composite steps, where sub-steps may be
specified in another class. Is this possible? When I tried it, it
did not seem to find the outside-of-this-class steps.
To be clearer:
StepClass1 -> extends WebDriverStep
- StepA
- StepB
StepClass2 -> extends WebDriverStep
- StepC
- StepD
*- CompositeStepAA: {StepA, StepC, StepB, StepD} ==> This is
what I am trying to accomplish*
Both StepClass1 and StepClass2 are injected via the stepsFactory()
What is the best way to do the above? Should I have StepClass
inherit from StepClass1 (but will that result in double steps?)
Thanks!