Advice on redirects?

Skip to first unread message

Josh Allen

Aug 15, 2011, 5:55:50 PM8/15/11
to tellurium-users
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?

- Josh

Jian Fang

Aug 17, 2011, 6:30:46 PM8/17/11
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) {



//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.



> --
> You received this message because you are subscribed to the Google Groups "tellurium-users" group.
> To post to this group, send email to
> To unsubscribe from this group, send email to
> For more options, visit this group at

Reply all
Reply to author
0 new messages