Maybe we need to make some distinctions here. I view Watir as a 'browser driver' in the sense that it talks to the DocumentObjectModel of a browser and doesn't care how the browser deals with http protocol (well, we can maybe peek a bit). Watir API is talking to the final composition of html, js, css, etc.. as a DOM entity and not separate the parts that it takes to build it. The browser builds the DOM, Watir can query the DOM and modify it and initiate the submit request to invoke a behavior the way a human user would.
What you seem to be asking for is more like HtmlUnit which has a 'webclient as a substitute for a browser' where you can access the 'protocol' the webclient is using. There you can talk http protocol directly. In that paradign HtmlUnit IS the browser while in our paradimg we let the Browser be the Browser and Watir manipulate its DOM. The advantage of Watir is that it can test the final Behaviour as profided by the DOM to the user without managing the structural state of sessions, cookies and http requests. We instruct the browser to fetch a page but by the API which is simulating the way a user would do it using the Browser's mechanisms. This may be a trivial explanation but an important distinction I think. marekj Watirloo: Semantic Page Objects in UseCases http://github.com/marekj/watirloo/ On Fri, Apr 24, 2009 at 6:26 AM, Jarmo Pertman <[email protected]> wrote: > > Oh, you're right! I forgot to think anything about sessions and > cookies :/ In that way it should be indeed easier just to scan page > html... > > But anyway, I don't see why such things are needed. Why won't you just > create normal tests, which assert multiple things and they would fail > for sure if page is 404 or something similar? > > Jarmo > > On Apr 23, 6:22 pm, Paul Rogers <[email protected]> wrote: >> can you get openssl to work on windows. I dont remember if this is easy or >> hard. >> Watir is different to net/http. If you did a watir request, and then a >> net/http request, thats 2 requests. And you need to get all the cookies etc >> from the browser into net/http. And you wont get any javascript or ajax >> stuff happening. >> >> Paul >> >> On Thu, Apr 23, 2009 at 4:50 AM, Jarmo Pertman <[email protected]> wrote: >> >> > Sorry, you also need to replace require 'net/http' with require 'net/ >> > https' >> >> > Jarmo > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
