Waiting for t.chain to execute
Posted: Thu May 11, 2017 8:52 pm
Hello,
Is there a way to wait for a t.chain() to finish before starting execution of another?
Take this code for example.
The problem I'm having is that the second one starts before the first can finish so the next button isn't ready by the time the chain times out.
I know that I could combine the chains above, but this is a simplified example.
Is there a way to wait for a t.chain() to finish before starting execution of another?
Take this code for example.
StartTest(function(t) {
t.chain(
{
action: "type",
target: "input[name=j_username]",
text: "<user>"
},
{
action: "type",
target: "input[name=j_password]",
text: "<password>"
},
{
action: "click",
target: "button[type=submit]"
}
)
t.chain(
{
action: "click",
target: "#main-nav-bar button[text=Alarms and Events] => .x-btn-inner-default-toolbar-small"
}
)
}
)
I know that I could combine the chains above, but this is a simplified example.