Hi Guys, Debugging further shows that with "sleep" the response time and bytes recieved are proper but when "sleep" is removed the time and recieved bytes are "zero". Also, without "sleep" navigation to multiple pages is very fast (script will not wait until page is laoded).
Script with sleep: --------------------- plugin.Clear() plugin.Log.EnableFilter(false) plugin.Record() ie.div(:id, "configure_access_left").fireEvent("onmouseup") <<<1st page sleep 10 <<< ie.div(:id, "configure_nat_left").fireEvent("onmouseup") <<<2nd page sleep 10 <<< plugin.Stop() if plugin.Log.Pages.Count != 0 page1= plugin.Log.Pages(0).Entries.Summary printf "Total time to load page (secs): %.3f\n", page1.Time printf "Number of bytes received on network: %d\n", page1.BytesReceived end ## output with sleep Total time to load page (secs): 5.199 Number of bytes received on network: 427 ##Script without Sleep .... ie.div(:id, "configure_access_left").fireEvent("onmouseup") <<<1st page ie.div(:id, "configure_nat_left").fireEvent("onmouseup") <<<2nd page plugin.Stop() .... #ouptput: --------- Total time to load page (secs): 0.002 Number of bytes received on network: 0 Kindly let me know the cause for this behaviour and also better solution to use for page to laod before navigation to next page. On Mar 17, 1:06 am, vin <vinay...@gmail.com> wrote: > Hi, > > I am using fireevent to click a div (button to navigate to a page) as > shown: > (ie.div(:id, "configure_access_left").fireEvent("onmouseup") > ### > irb(main):004:0* b = Watir::Browser.new > => #<Watir::IE:0x287a2d0 url="about:blank" title=""> > irb(main):005:0> > irb(main):006:0* b.goto "http://abc-blue" > => 1.96875 <<<<<<<<<<<<shows time > irb(main):007:0> b.div(:id, > "configure_access_left").fireEvent("onmouseup") > => > nil > <<<<<<<<<<<<<<< shows as nill > irb(main):008:0> > > By using above method, navigate to a required page is achieved but the > response shows as "nil" instead of the time. The scenario is server- > client and upon navigation to a page client will fetch the data from > the server. Here is the snippet captured with firebug: > > POSThttp://abc-blue/jsdm/ajax/access.php200 OK 571ms > sajax....(line 150) > ParamsHeadersPostPutResponseCacheHTMLXML > Response Headersview source > Date Thu, 17 Mar 2011 04:57:44 GMT > Server Mbedthis-Appweb/2.4.0 > Cache-Control no-store, no-cache, must-revalidate, post-check=0, pre- > check=0 > Content-Type text/xml; charset=UTF-8 > Etag "1368cc-296f-503300" > Content-Length 35 > Connection keep-alive > Keep-Alive timeout=60, max=95 > X-Powered-By PHP/5.3.2 > Expires Thu, 19 Nov 1981 08:52:00 GMT > Pragma no-cache > Request Headersview source > Host srx-blue > User-Agent Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: > 1.9.2.12) Gecko/20101026 Firefox/3.6.12 (.NET CLR 3.5.30729) > Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 > Accept-Language en-us,en;q=0.5 > Accept-Encoding gzip,deflate > Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7 > Keep-Alive 115 > Connection keep-alive > Method POST /jsdm/ajax/access.php HTTP/1.1 > Content-Type application/x-www-form-urlencoded; charset=UTF-8 > Refererhttp://abc-blue/login > > Please let me know if i can achieve it from any other method. > > Thanks, > Vin -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com