hi,
thanks
it works...
regards
shalini gupta
On 4/26/07, SHALINI GUPTA <[EMAIL PROTECTED]> wrote:
hi,
i have made all the changes told by u..
as:-
in my ruby file :-
def start_jsalert_clicker
Thread.new{ system("ruby \"c:\\PSC\\jscriptExtraAlert.rb\"") }
end
# read file contents
def read_js_popup_contents
file = File.open("c:\\test.txt")
lines = file.readline
while lines == ""
lines = file.readline
end
lines = file.readlines
file.close
return lines
end
in windowhelper.rb
def push_alert_button
@autoit.WinWait "Microsoft Internet Explorer", ""
text = @ autoit.WinGetText "Microsoft Internet Explorer"
file = File.open("c:\\test.txt", "w")
file.puts text
file.close
@autoit.Send "{ENTER}"
end
but still the error is coming
1) Error:
test_PSCLogin(TC_PSC_userlogin):
EOFError: end of file reached
pop_chk.rb:45:in `readline'
pop_chk.rb:45:in `read_js_popup_contents'
pop_chk.rb:97:in `test_PSCLogin'
1 tests, 0 assertions, 0 failures, 1 errors
regards
shalini gupta
On 4/26/07, SHALINI GUPTA < [EMAIL PROTECTED]> wrote:
>
> HI,
> YES UR RIGHT THANKS!!
>
> REGARDS
> SHALINI GUPTA
>
> On 4/26/07, Angrez Singh < [EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >
> > Few mistakes:
> > 1. You are adding text to file called popup.txt and reading from
> > test.txt
> >
> > def push_alert_button
> > > @autoit.WinWait "Windows Internet Explorer", ""
> > > text = @autoit.WinGetText "Windows Internet Explorer"
> > > file = File.open("c:\\popup.txt", "w")
> > > file.puts text
> > > file.close
> > > @autoit.Send "{ENTER}"
> > > end
> > >
> > > > # read file contents
> > > > > > > def read_js_popup_contents
> > > > > > > file = File.open("c:\\test.txt")
> > > > > > > lines = file.readline
> > > > > > > while lines == ""
> > > > > > > lines = file.readline
> > > > > > > end
> > > > > > > lines = file.readlines
> > > > > > > file.close
> > > > > > > return lines
> > > > > > > end
> > > > > > >
> > > > > >
> > 2. In push_alert_button why the title that you are searching for is
> > "Windows Internet Explorer"? It should be "Microsoft Internet Explorer" if
> > you are using IE 6.0? That could be the reason that pop is not getting
> > clicked. If you are using IE 7.0 then the code is fine. Otherwise
> > change it.
> >
> > Let me know if changing made above made the code to work.
> >
> > - Angrez
> >
> > _______________________________________________
> > Wtr-general mailing list
> > [email protected]
> > http://rubyforge.org/mailman/listinfo/wtr-general
> >
>
>
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general