Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get intermediates pages during redirection 302 #54

Open
falaise opened this issue Jul 13, 2011 · 1 comment
Open

How to get intermediates pages during redirection 302 #54

falaise opened this issue Jul 13, 2011 · 1 comment

Comments

@falaise
Copy link

falaise commented Jul 13, 2011

Hi,

For instance, I have something like :

br= Celerity::Browser.new

br.goto foo

and br.url gives bar because foo redirect to bar.
I wish to parse also the body of page foo.

If i set a listener on :web_window_event I receive something like :

WebWindowEvent(source=[TopLevelWindow[name=""]] type=[CHANGE] oldPage=[null] newPage[HtmlPage(bar)@920503681]

Regards

@matthewbretherton
Copy link

I saw a posting where the whole redirect chain is visible in HTMLUnit but cucumber specification flowed well by simply breaking the HTML Unit auto redirect processing by

@browser.webclient.setRedirectEnabled(false)
where @browser in my Celerity browser

This makes examining the content of the redirect possible and response code

A convenient implementation in cucumber is to put it under its own tag and reduce load in the test steps

Before('@disable-auto-redirect') do
@browser.webclient.setRedirectEnabled(false)
end

Hope this helps

Matthew

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants