The code of waitForElementPresen is as follows in the Accessor class,
def boolean waitForElementPresent(WorkflowContext context, String
locator, int timeout) {
//boolean result = false
for (int second = 0; second < timeout; second += 500) {
try {
if (cbp.isElementPresent(context, locator)) {
//result = true
return true
}
} catch (Exception e) {
}
Helper.pause(500)
}
//return result;
return false
}
Did you see multiple commands issued to Selenium server during the
wait time? If not, on which command did Tellurium hang?
Perhaps you could also try to delay the tests for a while and run the
tests after the redirect.
Thanks,
Jian
On Mon, Aug 15, 2011 at 5:55 PM, Josh Allen <[email protected]> wrote:
> I've yet to find a dependable way to handle redirects. Suppose I jump
> directly to a url (using urlConnect) we'll call Page A, which
> immediately redirects to Page B. After connecting to Page A, my test
> continues and looks for an element on Page B by calling
> waitForElementPresent. Tellurium hangs indefinitely here, presumably
> because it's searching for the element on Page A. Oddly, it never
> times out after the specified 10 seconds.
>
> One solution I was examining: after connecting to Page A, I can
> examine the url (using the getLocation method) until it matches
> something that looks like Page B, at which point I can proceed.
> getLocation seems to hang indefinitely as well.
>
> Any general advice for tackling this problem?
>
> Thanks!
> - Josh
>
> --
> You received this message because you are subscribed to the Google Groups
> "tellurium-users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/tellurium-users?hl=en.
>
>
--
You received this message because you are subscribed to the Google Groups
"tellurium-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/tellurium-users?hl=en.