Hi,
It is a login form and not a pop-up.

Regards
Chandrika

On Jan 18, 9:19 pm, jnxgn <[email protected]> wrote:
> Did you double check it is not a pup but a  login form?
>
> On 18 Jan., 12:45, Chandu80 <[email protected]> wrote:
>
> > I have a login function written in ruby  as follows
>
> > def login(link,login,password,g)
> >     #href_status = href.empty?
> >     #puts "#{href_status}"
> >     dialogue_text ='Connect to ' + link
> >     p = Watir.autoit.WinWait(dialogue_text,'',30)
> >     #p = Watir.autoit.WinWait("Connect to 10.130.92.4",'',30)
> >     puts "p = #{p}"
> >     #pop_exists result take in variable
> >     puts" #{dialogue_text}"
> >     puts"login = #{login}"
> >     puts"password = #{password}"
> >     #Execute function only when there is login pop up detected
> >     if (p==1)
> >       puts " Begin Login\n"
> >       #Watir.autoit.WinWait("Connect to 10.130.92.4")
> >       Watir.autoit.WinWait(dialogue_text)
> >       Watir.autoit.WinActivate(dialogue_text)
> >       Watir.autoit.Send(login)
> >       Watir.autoit.Send('{TAB}')
> >       Watir.autoit.Send(password)
> >       Watir.autoit.Send('{ENTER}')
> >       sleep 1
> >       q = Watir.autoit.WinWait("Windows Internet Explorer",'',10)
> >       puts "q = #{q}"
> >       if(q==1)
> >         g.jsClick($ie,"OK")
> >       end
> >     else
> >       puts"Login not required\n"
> >       sleep 1
> >       if(q==1)
> >         g.jsClick($ie,"OK")
> >       end
> >       #if(href_status == true)
> >         #g.jsClick($ie,"OK")
> >       #end
> >     end
> >     return p
> >   end
> > The dialogue_text denotes the login pop-up and the variable 'p' takes
> > in value if the pop-up has appeared or not i.e. whether 1 or 0
>
> > Now when I execute the script that calls this function,the value p is
> > shown to be 0 but the login pop-up does appear.So the value of p
> > should be 1 and the statements under the if condition should be
> > executed.
> > Thus the pop-up blocks the script and it doesn't execute further and
> > hence autoit fails.
>
> > Kindly suggest what should be done in this case.
>
> > Thanks in advance
>
> > Regards
> > Chandrika
-- 
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