On Jun 16, 6:13 am, era gupta <era.gupt...@gmail.com> wrote: > Thanks Chuck for your response. > > Find below the code that I am trying to access: > > require 'watir' > Watir::Browser.default = 'firefox' > b = Watir::Browser.new > b.goto "<site-url>" > b.link(:href, "<Link to access>").click > b.text_field(:id, "email_id").set("ad...@test.com") > b.text_field(:name, "pass").set("test") > b.link(:text, "Login").click > > In the above code line no. 6,7 and 8 I want to call when the site asks for > the login again. Otherwise it should go to some other task. > > Any Idea how it can be done. >
well, if you had provided responses to the questions I already asked you, I could suggest an approach, but since you just ignored them, I'll repeat the questions again. (because like, I asked them for a reason you know? not just because I needed to practice my typing skills) * Does your system always do this, or is there some random element which controls when someone is asked for their credentials a second time? * Is there an easy way to tell (such as perhaps the page title) if the user is still faced with a request for credentials verses being logged into the system? * Is the page source the same on both pages that request credentials? -- 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