On Wednesday, May 30, 2012 10:46:31 PM UTC-7, gajendra wrote: > > Hi All, > > Is there any way, we can debug the WATIR scripts step by step? >
As mentioned some IDE's like Rubymine provide debuggers.. useful I think for more complicated programs. for most watir scripts I just use IRB. you can cut and past from your script (to read in static variables etc) and if you try something in IRB and it does what you need it's easy to cut and past it to your scripts. Often I will just open an irb session, get a browser session going, then manually navigate the browser to where I need to be. Once there I can try things in IRB using methods like .flash to see if I am properly identifying an element, before attempting to read values or manipulate it in some way.. I find this a very easy and effective way to develop scripts. Typically I'll use two cmd sessions, one with irb going, and the other to be able to invoke cucumber using a tag to execute the test case I'm working on automating. If I'm working with something that uses a lot of session cookies, I'll do something like have the IRB session controlling a chrome browser, and cucumber setup to use firefox or IE. > And > > Can we run the scripts on the existing opened browser? > Ex. > I have to verify that Reply to the mail is working or not. > > For this should I always have to launch the browser, open the gmail page, > login, check the inbox mail and then go to Reply? > > Or > Is it possible that I will be on Reply Page of the mail and start run the > script to check the Reply functionality? > > Kindly Help me on this. > > Regards, > Gajendra > -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. [email protected] http://groups.google.com/group/watir-general [email protected]
