But the problem is... I need to login the user first with watir and
then get the html with net/http, is it possible?

Since I think it's impossible to get the real html with watir now I'm
trying to do it using only net/http library.

In my case I need  first to login the user onto the webpage and then
go to the pages I want to get the html.
This is what I'm doing... but it seems to me the user can't login:

    require 'net/http'
    require 'activesupport'
    server="myserver.com"
    port=80

    http = Net::HTTP.new(server, port)
    http.start()

    data={":loginName=>"myLoginName",
      :password=>"myPassord"
    }

    resp,data=http.post("/login.do",data.to_query)
    if resp.code=="200" then
      headers={
        "Cookie"=>resp["set-cookie"].to_s()
      }
    end
    resp,data=http.get('/MyAccount.do',headers)
    html=data
    http.finish()

Any idea???

Thanks.

On May 20, 12:55 pm, sHiVa <[email protected]> wrote:
> Hi TCBlues,
>
> As it is an another package in ruby, you can mix up both Watir and net/
> http.
> Grab all the html content in to a file or string, and perform your

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to [email protected]
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to