[wtr-general] Re: Unable to locate element
Hi, I am working on an Automation project using WATIR. I am getting an error while locating an element to be clicked while automation. Error -> C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/ firewatir/element.rb:907:in `assert_exists': Unable to locate element, using :alt, "Open SDP file" (Watir::Exception::UnknownObjectException) for the command - > ie.image(:alt, 'Open SDP file').click A "puts" for that element returns false based on the alt, title or any other item that appears under that fieldset. I tried other possible way and encountered another error C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/firewatir/ element.rb:907:i n `assert_exists': Unable to locate element, using :jssh_name (Watir::Exception: :UnknownObjectException) Can the jssh error be resolved ? although I have installed .jssh for firefox3.6.13 n using firebug to trace the element. I am using firewatir (1.6.5) fxruby (1.6.20 x86-mingw32, 1.2.6 mswin32) Please Help, Thanks! -- 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
[wtr-general] Re: Unable to locate element
The page is a .php file I have extracted the code from the required area, through firebug for firefox Persistent StreamsTypeTarget PortStream StatusSDPVideo3OnVideo30100On Here towards the end is the image located. I want to locate the image in this code On Feb 17, 12:26 pm, Tim Koopmans wrote: > What does the HTML for that element look like? > > Cheers, > Tim > @90kts > > On Thu, Feb 17, 2011 at 4:57 PM, Ashu wrote: > > Hi, > > I am working on an Automation project using WATIR. I am getting an > > error while locating an element to be clicked while automation. > > Error -> C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/ > > firewatir/element.rb:907:in `assert_exists': Unable to locate element, > > using :alt, "Open SDP file" (Watir::Exception::UnknownObjectException) > > for the command - > ie.image(:alt, 'Open SDP file').click > > A "puts" for that element returns false based on the alt, title or any > > other item that appears under that fieldset. > > > I tried other possible way and encountered another error > > C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/firewatir/ > > element.rb:907:i > > n `assert_exists': Unable to locate element, using :jssh_name > > (Watir::Exception: > > :UnknownObjectException) > > Can the jssh error be resolved ? > > although I have installed .jssh for firefox3.6.13 n using firebug to > > trace the element. > > I am using > > firewatir (1.6.5) > > fxruby (1.6.20 x86-mingw32, 1.2.6 mswin32) > > > Please Help, > > Thanks! > > > -- > > Before posting, please readhttp://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 -- 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
[wtr-general] Re: Unable to locate element
On entering this line -> ie.image(:alt, 'Open SDP file').wait_until_present it returned thie following error irb(main):033:0> ie.image(:alt, 'Open SDP file').wait_until_present Watir::Exception::UnknownObjectException: Unable to locate element, using :alt, "Open SDP file" from C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/ firewatir/element.rb:907:in `assert_exists' from C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/ firewatir/element.rb:1266:in `method_missing' from (irb):33 from :0 On Feb 17, 2:00 pm, Alastair Montgomery wrote: > Is it possible that you are trying to access the element before it has had > time to render? > We use jQuery and its elements sometime take a while to render fully. > > Try putting a line of *ie.image(:alt, 'Open SDP file').wait_until_present* > before > you attempt to click on it. -- 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
[wtr-general] Re: Unable to locate element
irb(main):043:0> ie.button(:name => 'SDP_0_1').click Watir::Exception::UnknownObjectException: Unable to locate element, using {:name=>"SDP_0_1"} from C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/ firewatir/element.rb:907:in `assert_exists' from C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/ firewatir/element.rb:1066:in `click' from (irb):43 from :0 On Feb 18, 11:02 am, Tim Koopmans wrote: > Technically it is a button (input type=image) > > http://wiki.openqa.org/display/WTR/Buttons > > So use > ie.button(:name => 'SDP_0_1').click > > Cheers, > Tim > > On Fri, Feb 18, 2011 at 4:52 PM, Ashu wrote: > > SDP_0_1 -- 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
[wtr-general] Re: Unable to locate element
On trying the above line of code irb displays irb(main):045:0> ie.image(:alt, 'Open SDP file').wait_until_present Watir::Exception::UnknownObjectException: Unable to locate element, using :alt,"Open SDP file" from C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/ firewatir/element.rb:907:in `assert_exists' from C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/ firewatir/element.rb:1266:in `method_missing' from (irb):45 from :0 :-( On Feb 17, 2:00 pm, Alastair Montgomery wrote: > Is it possible that you are trying to access the element before it has had > time to render? > We use jQuery and its elements sometime take a while to render fully. > > Try putting a line of *ie.image(:alt, 'Open SDP file').wait_until_present* > before > you attempt to click on it. -- 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
[wtr-general] Re: Unable to locate element
Thanks alot for your assistance, Although I am still working on the same problem as I am still unable to trace the solution to this problem. On Feb 18, 11:02 am, Tim Koopmans wrote: > Technically it is a button (input type=image) > > http://wiki.openqa.org/display/WTR/Buttons > > So use > ie.button(:name => 'SDP_0_1').click > > Cheers, > Tim > > On Fri, Feb 18, 2011 at 4:52 PM, Ashu wrote: > > SDP_0_1 -- 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
[wtr-general] Re: Unable to locate element
Thanks alot for your assistance, Although I am still working on the same problem as I am still unable to trace the solution to this problem. On Feb 17, 2:00 pm, Alastair Montgomery wrote: > Is it possible that you are trying to access the element before it has had > time to render? > We use jQuery and its elements sometime take a while to render fully. > > Try putting a line of *ie.image(:alt, 'Open SDP file').wait_until_present* > before > you attempt to click on it. -- 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
[wtr-general] Re: Unable to locate element
yes there is 1 frame irb(main):014:0* ie.show_frames There are 1 frames frame: name: index: 1 => 0..0 irb(main):015:0> unlike any other page wherin I can see the name of the frame Here the name is not displayed On Feb 18, 2:47 pm, Chuck van der Linden wrote: > are there Frames on the page perhaps? > > On Feb 17, 11:41 pm, Ashu wrote: > > > On trying the above line of code > > irb displays > > irb(main):045:0> ie.image(:alt, 'Open SDP file').wait_until_present > > Watir::Exception::UnknownObjectException: Unable to locate element, > > using :alt,"Open SDP file" > > from C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/ > > firewatir/element.rb:907:in `assert_exists' > > from C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/ > > firewatir/element.rb:1266:in `method_missing' > > from (irb):45 > > from :0 > > :-( > > On Feb 17, 2:00 pm, Alastair Montgomery wrote: > > > > Is it possible that you are trying to access the element before it has had > > > time to render? > > > We use jQuery and its elements sometime take a while to render fully. > > > > Try putting a line of *ie.image(:alt, 'Open SDP > > > file').wait_until_present* before > > > you attempt to click on it.- Hide quoted text - > > > - Show quoted text - -- 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
[wtr-general] Re: Unable to locate element
Sure, The Xpath is - /html/body/div/div/div[6]/div/fieldset/table[2]/tbody/tr[3]/td[8] On Feb 18, 3:33 pm, Сергей Демьянчук wrote: > Hi, Ashu, > > You wrote before that you use Firebug, could you please give xpath from > firebug for desired element ? > > 2011/2/18 Chuck van der Linden > > > > > > > are there Frames on the page perhaps? > > > On Feb 17, 11:41 pm, Ashu wrote: > > > On trying the above line of code > > > irb displays > > > irb(main):045:0> ie.image(:alt, 'Open SDP file').wait_until_present > > > Watir::Exception::UnknownObjectException: Unable to locate element, > > > using :alt,"Open SDP file" > > > from C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/ > > > firewatir/element.rb:907:in `assert_exists' > > > from C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/ > > > firewatir/element.rb:1266:in `method_missing' > > > from (irb):45 > > > from :0 > > > :-( > > > On Feb 17, 2:00 pm, Alastair Montgomery wrote: > > > > > Is it possible that you are trying to access the element before it has > > had > > > > time to render? > > > > We use jQuery and its elements sometime take a while to render fully. > > > > > Try putting a line of *ie.image(:alt, 'Open SDP > > file').wait_until_present* before > > > > you attempt to click on it.- Hide quoted text - > > > > - Show quoted text - > > > -- > > Before posting, please readhttp://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<http://groups.google.com/group/watir-general%0Awatir-general+unsubscr...> -- 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
[wtr-general] Re: Unable to locate element
Well let me recorrect the path as it is /html/body/div/div/div[6]/div/fieldset/table[2]/tbody/tr[3]/td[8]/ input the input contains On Feb 18, 3:33 pm, Сергей Демьянчук wrote: > Hi, Ashu, > > You wrote before that you use Firebug, could you please give xpath from > firebug for desired element ? > > 2011/2/18 Chuck van der Linden > > > are there Frames on the page perhaps? > > > On Feb 17, 11:41 pm, Ashu wrote: > > > On trying the above line of code > > > irb displays > > > irb(main):045:0> ie.image(:alt, 'Open SDP file').wait_until_present > > > Watir::Exception::UnknownObjectException: Unable to locate element, > > > using :alt,"Open SDP file" > > > from C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/ > > > firewatir/element.rb:907:in `assert_exists' > > > from C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/ > > > firewatir/element.rb:1266:in `method_missing' > > > from (irb):45 > > > from :0 > > > :-( > > > On Feb 17, 2:00 pm, Alastair Montgomery wrote: > > > > > Is it possible that you are trying to access the element before it has > > had > > > > time to render? > > > > We use jQuery and its elements sometime take a while to render fully. > > > > > Try putting a line of *ie.image(:alt, 'Open SDP > > file').wait_until_present* before > > > > you attempt to click on it.- Hide quoted text - > > > > - Show quoted text - > > > -- > > Before posting, please readhttp://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<http://groups.google.com/group/watir-general%0Awatir-general+unsubscr...> -- 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
[wtr-general] Re: Unable to locate element
Well let me recorrect the path as it is /html/body/div/div/div[6]/div/fieldset/table[2]/tbody/tr[3]/td[8]/ input the input contains On Feb 18, 3:33 pm, Сергей Демьянчук wrote: > Hi, Ashu, > > You wrote before that you use Firebug, could you please give xpath from > firebug for desired element ? > > 2011/2/18 Chuck van der Linden > > > are there Frames on the page perhaps? > > > On Feb 17, 11:41 pm, Ashu wrote: > > > On trying the above line of code > > > irb displays > > > irb(main):045:0> ie.image(:alt, 'Open SDP file').wait_until_present > > > Watir::Exception::UnknownObjectException: Unable to locate element, > > > using :alt,"Open SDP file" > > > from C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/ > > > firewatir/element.rb:907:in `assert_exists' > > > from C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/ > > > firewatir/element.rb:1266:in `method_missing' > > > from (irb):45 > > > from :0 > > > :-( > > > On Feb 17, 2:00 pm, Alastair Montgomery wrote: > > > > > Is it possible that you are trying to access the element before it has > > had > > > > time to render? > > > > We use jQuery and its elements sometime take a while to render fully. > > > > > Try putting a line of *ie.image(:alt, 'Open SDP > > file').wait_until_present* before > > > > you attempt to click on it.- Hide quoted text - > > > > - Show quoted text - > > > -- > > Before posting, please readhttp://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<http://groups.google.com/group/watir-general%0Awatir-general+unsubscr...> -- 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
[wtr-general] Re: Unable to locate element
Thanks alot to the respected intellectual. Its been a week long, I have been hogging around with this code. Although this time it could trace the required element. Now what remains is to check if the click event will invoke the video streaming while automation. I will definitely update the status once done. Thanks once again! On Feb 18, 10:29 pm, Сергей Демьянчук wrote: > Ok, I use IE via watir, so > > using given xpath you may locate element (not image, i call this input text > as element, cuz in fact it is an watir element: Watir::TextField) and, for > example, extract desired attributes: > > attributes_array = ['name', 'src', 'alt', 'title'] > * > attributes_array.each do |attr| > puts "#{attr}:" > puts ie.text_field(:xpath, > "/html/body/div/div/div[6]/div/fieldset/table[2]/tbody/tr[3]/td[8]/input").attribute_value("#{attr}") > end* > > My output: > => ["name", "src", "alt", "title"] > > name: > SDP_0_1 > src: > file:///H:/WebPlayer/main1.php_files/play-icon-%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20big.png > alt: > Open SDP file > title: > Open SDP file > => ["name", "src", "alt", "title"] > irb(main):115:0> > > Thanks, > Sergii > > 2011/2/18 Ashu > > > Well let me recorrect the path > > as it is > > /html/body/div/div/div[6]/div/fieldset/table[2]/tbody/tr[3]/td[8]/ > > input > > > the input contains > > > name="SDP_0_0"> > > > On Feb 18, 3:33 pm, Сергей Демьянчук > > wrote: > > > Hi, Ashu, > > > > You wrote before that you use Firebug, could you please give xpath from > > > firebug for desired element ? > > > > 2011/2/18 Chuck van der Linden > > > > > are there Frames on the page perhaps? > > > > > On Feb 17, 11:41 pm, Ashu wrote: > > > > > On trying the above line of code > > > > > irb displays > > > > > irb(main):045:0> ie.image(:alt, 'Open SDP file').wait_until_present > > > > > Watir::Exception::UnknownObjectException: Unable to locate element, > > > > > using :alt,"Open SDP file" > > > > > from C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/ > > > > > firewatir/element.rb:907:in `assert_exists' > > > > > from C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/ > > > > > firewatir/element.rb:1266:in `method_missing' > > > > > from (irb):45 > > > > > from :0 > > > > > :-( > > > > > On Feb 17, 2:00 pm, Alastair Montgomery wrote: > > > > > > > Is it possible that you are trying to access the element before it > > has > > > > had > > > > > > time to render? > > > > > > We use jQuery and its elements sometime take a while to render > > fully. > > > > > > > Try putting a line of *ie.image(:alt, 'Open SDP > > > > file').wait_until_present* before > > > > > > you attempt to click on it.- Hide quoted text - > > > > > > - Show quoted text - > > > > > -- > > > > Before posting, please readhttp://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< > >http://groups.google.com/group/watir-general%0Awatir-general+unsubscr...> > > > -- > > Before posting, please readhttp://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<http://groups.google.com/group/watir-general%0Awatir-general+unsubscr...> -- 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
[wtr-general] Re: Unable to locate element
on Trying with frame r = ie.frame(:index, 1).button(:name => 'SDP_0_0') p r Output is C:\Watir Programs>traceelement1.rb #"SDP_0_0"} what=nil> On Feb 19, 12:17 am, Tim Koopmans wrote: > If it's in a frame you need to prefix the element selector with that frame: > > ie.frame(:index, 1).button(:name => 'SDP_0_0') > > Cheers, > Tim @90kts > > On Fri, Feb 18, 2011 at 10:04 PM, Ashu wrote: > > yes > > there is 1 frame > > irb(main):014:0* ie.show_frames > > There are 1 frames > > frame: name: > > index: 1 > > => 0..0 > > irb(main):015:0> > > unlike any other page wherin I can see the name of the frame > > Here the name is not displayed > > > On Feb 18, 2:47 pm, Chuck van der Linden wrote: > > > are there Frames on the page perhaps? > > > > On Feb 17, 11:41 pm, Ashu wrote: > > > > > On trying the above line of code > > > > irb displays > > > > irb(main):045:0> ie.image(:alt, 'Open SDP file').wait_until_present > > > > Watir::Exception::UnknownObjectException: Unable to locate element, > > > > using :alt,"Open SDP file" > > > > from C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/ > > > > firewatir/element.rb:907:in `assert_exists' > > > > from C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/ > > > > firewatir/element.rb:1266:in `method_missing' > > > > from (irb):45 > > > > from :0 > > > > :-( > > > > On Feb 17, 2:00 pm, Alastair Montgomery wrote: > > > > > > Is it possible that you are trying to access the element before it > > has had > > > > > time to render? > > > > > We use jQuery and its elements sometime take a while to render fully. > > > > > > Try putting a line of *ie.image(:alt, 'Open SDP > > file').wait_until_present* before > > > > > you attempt to click on it.- Hide quoted text - > > > > > - Show quoted text - > > > -- > > Before posting, please readhttp://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 -- 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
[wtr-general] Re: Unable to locate element
Hie, The solution provided was helpful in tracing the element of the filename that was saved in filename.php.html(web page complete) On running the same code on the original .php file it gave me the following error. C:\Documents and Settings\tcsadmin\Desktop>imageclicker.rb name: C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/firewatir/ element.rb:907:in `assert_exists': Unable to locate element, using :xpath, "/html/body/div/div/div[6]/div/ fieldset/table[2]/tbody/tr[3]/td[8]/ input" (Watir::Exception::UnknownObjectException) from C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/firewatir/ element.rb:894:in `attribute_value' from C:/Documents and Settings/tcsadmin/Desktop/imageclicker.rb:18 from C:/Documents and Settings/tcsadmin/Desktop/imageclicker.rb:16:in `each' from C:/Documents and Settings/tcsadmin/Desktop/ imageclicker.rb:16 Please help :-( On Feb 18, 10:29 pm, Сергей Демьянчук wrote: > Ok, I use IE via watir, so > > using given xpath you may locate element (not image, i call this input text > as element, cuz in fact it is an watir element: Watir::TextField) and, for > example, extract desired attributes: > > attributes_array = ['name', 'src', 'alt', 'title'] > * > attributes_array.each do |attr| > puts "#{attr}:" > puts ie.text_field(:xpath, > "/html/body/div/div/div[6]/div/fieldset/table[2]/tbody/tr[3]/td[8]/input").attribute_value("#{attr}") > end* > > My output: > => ["name", "src", "alt", "title"] > > name: > SDP_0_1 > src: > file:///H:/WebPlayer/main1.php_files/play-icon-%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20big.png > alt: > Open SDP file > title: > Open SDP file > => ["name", "src", "alt", "title"] > irb(main):115:0> > > Thanks, > Sergii > > 2011/2/18 Ashu > > > Well let me recorrect the path > > as it is > > /html/body/div/div/div[6]/div/fieldset/table[2]/tbody/tr[3]/td[8]/ > > input > > > the input contains > > > name="SDP_0_0"> > > > On Feb 18, 3:33 pm, Сергей Демьянчук > > wrote: > > > Hi, Ashu, > > > > You wrote before that you use Firebug, could you please give xpath from > > > firebug for desired element ? > > > > 2011/2/18 Chuck van der Linden > > > > > are there Frames on the page perhaps? > > > > > On Feb 17, 11:41 pm, Ashu wrote: > > > > > On trying the above line of code > > > > > irb displays > > > > > irb(main):045:0> ie.image(:alt, 'Open SDP file').wait_until_present > > > > > Watir::Exception::UnknownObjectException: Unable to locate element, > > > > > using :alt,"Open SDP file" > > > > > from C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/ > > > > > firewatir/element.rb:907:in `assert_exists' > > > > > from C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/ > > > > > firewatir/element.rb:1266:in `method_missing' > > > > > from (irb):45 > > > > > from :0 > > > > > :-( > > > > > On Feb 17, 2:00 pm, Alastair Montgomery wrote: > > > > > > > Is it possible that you are trying to access the element before it > > has > > > > had > > > > > > time to render? > > > > > > We use jQuery and its elements sometime take a while to render > > fully. > > > > > > > Try putting a line of *ie.image(:alt, 'Open SDP > > > > file').wait_until_present* before > > > > > > you attempt to click on it.- Hide quoted text - > > > > > > - Show quoted text - > > > > > -- > > > > Before posting, please readhttp://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< > >http://groups.google.com/group/watir-general%0Awatir-general+unsubscr...> > > > -- > > Before posting, please readhttp://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<http://groups.google.com/group/watir-general%0Awatir-general+unsubscr...> -- 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
[wtr-general] Error on running script for first time
Hi, Despite installing jssh for Firefox, the following error occurs. C:\Documents and Settings\tcsadmin\Desktop>wait.rb C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/firewatir/ firefox.rb:237:in `set_defaults': Unable to connect to machine : 127.0.0.1 on port 9997. Make sure that JSSh is properly installed and Firefox is running with '-jssh' option (Watir::Exception::UnableToStartJSShException) from C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/ firewatir/firefox.rb:131:in `initialize' from C:/Documents and Settings/tcsadmin/Desktop/wait.rb:5:in `new' from C:/Documents and Settings/tcsadmin/Desktop/wait.rb:5 How do I get rid of it, as later on this error doesnt appear. -- 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
[wtr-general] Popup Handler error
The following automation code to download a file produces an error undefined method `enabled_popup'. Please help me to resolve it. THanks. Code- require 'watir' require 'watir/contrib/enabled_popup' ie= Watir::IE.new ie.goto("http://http://www.yousendit.com/transfer.php? action=batch_download&batch_id=elNKWWV0NmNtNEkwTVE9PQ"); ie.link(:url,/transfer.php/).click_no_wait hwnd = ie.enabled_popup(15) # get a handle if one exists if (hwnd) # yes there is a popup w = WinClicker.new w.makeWindowActive(hwnd) w.clickWindowsButton_hwnd(hwnd, "Save") end -- 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
[wtr-general] Error on re-executing the script
Hi, I am getting the following error the moment I reconnect the device that is used for testing. Please help me to resolve it Thanks C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/firewatir/ jssh_socket.rb:4 8:in `recv': An established connection was aborted by the software in your host machine. - recvfrom(2) (Errno::ECONNABORTED) from C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/ firewatir/jss h_socket.rb:48:in `read_socket' from C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/ firewatir/jss h_socket.rb:47:in `each' from C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/ firewatir/jss h_socket.rb:47:in `read_socket' from C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/ firewatir/jss h_socket.rb:6:in `js_eval' from C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/ firewatir/fir efox.rb:175:in `get_window_number' from C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/ firewatir/fir efox.rb:193:in `goto' from C:/Documents and Settings/admin/Desktop/Soft /Test cases/TC02.2.rb:217:in `performStep' from C:/Documents and Settings/admin/Desktop/Soft /Soft1.53.rb:620:in `callNext' from C:/Ruby186/lib/ruby/gems/1.8/gems/fxruby-1.6.20-x86- mingw32/lib/fox 16/responder2.rb:55:in `call' from C:/Ruby186/lib/ruby/gems/1.8/gems/fxruby-1.6.20-x86- mingw32/lib/fox 16/responder2.rb:55:in `onHandleMsg' from C:/Documents and Settings/admin/Desktop/Soft /Soft1.53.rb:769:in `run' from C:/Documents and Settings/admin/Desktop/Soft /Soft1.53.rb:769 -- 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
[wtr-general] Can Watir support PHP based technology?
Hi, As the fact is that php-based has no bearing on the way watir interacts with it, because php is all done server-side and watir only deals with the html that is delivered to the browser. I would like to know is there any way wherein a PHPs functionality be wrapped thereby letting Watir to use the PHP page HTML elements? Or any other alternative wherin watir dealing with the html can be delivered to the browser. Thanks :-) -- 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
[wtr-general] Re: Error on running script for first time
On installing watir-webdriver gem... C:\Ruby186\gems>gem install watir-webdriver ERROR: http://rubygems.org/ does not appear to be a repository Building native extensions. This could take a while... ERROR: Error installing watir-webdriver: ERROR: Failed to build gem native extension. C:/Ruby186/bin/ruby.exe extconf.rb checking for rb_thread_blocking_region()... no checking for ruby_thread_has_gvl_p()... no checking for ruby_native_thread_p()... no checking for rb_thread_call_with_gvl()... no creating extconf.h creating Makefile make 'make' is not recognized as an internal or external command, operable program or batch file. Gem files will remain installed in C:/Ruby186/lib/ruby/gems/1.8/gems/ ffi-1.0.6 f or inspection. Results logged to C:/Ruby186/lib/ruby/gems/1.8/gems/ffi-1.0.6/ext/ ffi_c/gem_make .out As it required Runtime Dependencies -> gem install selenium-webdriver which again required rubyzip and rubyzip required childprocess thereby finally the Runtime Dependencies ffi ~> 0.6.3 So for every gem file installation the above error occurs. plz Help *I have downloaded all the above stated gems On Feb 22, 2:20 pm, Željko Filipin wrote: > On Tue, Feb 22, 2011 at 9:23 AM, Ashu wrote: > > Despite installing jssh for Firefox, the following error occurs. > > Try watir-webdriver gem, it drives Firefox (and other browsers) and you do > not have to install jssh: > > http://zeljkofilipin.com/2010/01/12/watir-on-webdriver/ > > Željko > -- > watir.com - community manager > watirpodcast.com - host > testingpodcast.com - audio podcasts on software testing. all of them -- 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
[wtr-general] Re: Can Watir support PHP based technology?
I am dealing with automation of the PHP web page. It repeatedly gives the error Unable to locate the element as compared to if the page is saved (web page complete) i.e.webpage.php.html. There are various fieldsets on the webpage, so before these fieldsets the class, id elements gets traced but beyond it none is being traced. Please Help.. On Feb 24, 1:58 pm, Željko Filipin wrote: > On Thu, Feb 24, 2011 at 7:56 AM, Ashu wrote: > > is there any way wherein a PHPs functionality be wrapped thereby > > letting Watir to use the PHP page HTML elements? > > "An example would be handy right about now" Brian Marick would say. > > If you are asking if Watir can automate PHP web applications, answer is yes. > > Željko > -- > watir.com - community manager > watirpodcast.com - host > testingpodcast.com - audio podcasts on software testing. all of them -- 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
[wtr-general] Re: Can Watir support PHP based technology?
Yes, I have Firebud installed on Firefox and I am using it for dealing with elements(HTML automation) Its working fine for me with HTML page On Feb 24, 5:47 pm, Željko Filipin wrote: > On Thu, Feb 24, 2011 at 1:45 PM, Ashu wrote: > > It repeatedly gives the error Unable to locate the element > > Do you know how to use Firebug (or similar tool)? > > I will say this again: "An example would be handy right about now" Brian > Marick would say. > > Željko -- 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
[wtr-general] Re: Can Watir support PHP based technology?
Yes, as the script is running on the IP address, so a webpage opens that is in PHP. Watir can detect the text that is written in td[2] xpath - /html/body/div/div/div[5]/div/div[7]/table/tbody/tr/td[2] But, There is an image file in the input below /html/body/div/div/div[6]/div/fieldset/table[2]/tbody/tr[3]/td[8]/ input as So on clicking on that image file an event occurs. But it needs to be automated. Please Help. Thanks! On Feb 24, 6:24 pm, Željko Filipin wrote: > On Thu, Feb 24, 2011 at 1:49 PM, Ashu wrote: > > Its working fine for me with HTML page > > But there is a problem inspecting the page of your PHP app? > > Željko -- 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
[wtr-general] Re: Poll: What version of ruby do you use? What version of Watir do you use?
ruby 1.8.6 (2010-02-04 patchlevel 398) [i386-mingw32] watir 1.6.5 :-) On Feb 28, 3:50 pm, Alister Scott wrote: > Hi, > > We're doing a quick poll about Ruby and Watir versions, so if you could > please tell us what you use, that'd be great! > > http://watir.com/2011/02/28/poll-what-rubywatir-versions-do-you-use/ > > Thanks, > > Alister Scott > Brisbane, Australia > Watir Web Master:http://watir.com > Blog:http://watirmelon.com > LinkedIn:http://www.linkedin.com/in/alisterscott > > "There are two ways to get enough: One is to continue to accumulate more and > more. The other is to desire less." *~ G. K. Chesterton* -- 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
[wtr-general] Re: Unable to locate element
Hi, As I am Newbie to ruby and after doing enough research to resolve my problem, I have discovered that I can try to do a HTTP POST or GET. Can anybody suggest provide me a directive in this regard Thanks! On Feb 27, 12:42 pm, Eric Christopherson wrote: > On Mon, Feb 21, 2011 at 7:46 AM, Ashu wrote: > > Unable to locate element, using :xpath, "/html/body/div/div/div[6]/div/ > > fieldset/table[2]/tbody/tr[3]/td[8]/ > > One thing I've noticed is that Firebug reports tbody elements where > they haven't been specified in the HTML (and thus Watir won't find > them). Try taking out 'tbody/'. -- 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
[wtr-general] Re: Unable to locate element
Ok Sir... Thanks! On Mar 1, 11:20 pm, Chuck van der Linden wrote: > btw: if you have a NEW question, it is generally best to start a new > thread, not tack it onto the end of a thread dealing with an entirely > different subject. > > If your question is how to use ruby to do HTTP requests directly (as > opposed to using Watir to drive a web-browser that sends/receives > those requests, then you should be asking in a more general Ruby > oriented group. Doing that sort of thing is beyond the scope of this > discussion group > > On Feb 28, 3:20 am, Ashu wrote: > > > Hi, > > As I am Newbie to ruby and after doing enough research to resolve my > > problem, I have discovered that I can try to do a HTTP POST or GET. > > > Can anybody suggest provide me a directive in this regard > > Thanks! > > > On Feb 27, 12:42 pm, Eric Christopherson > > wrote: > > > > On Mon, Feb 21, 2011 at 7:46 AM, Ashu wrote: > > > > Unable to locate element, using :xpath, "/html/body/div/div/div[6]/div/ > > > > fieldset/table[2]/tbody/tr[3]/td[8]/ > > > > One thing I've noticed is that Firebug reports tbody elements where > > > they haven't been specified in the HTML (and thus Watir won't find > > > them). Try taking out 'tbody/'. -- 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
[wtr-general] Need support in using POST method in RUBY
Hi, I am making use of POST method to trace and element in a PHP file which needs to be automated. While trying to locate through the XPATH, watir was unable to locate the element as the page that was referenced was a PHP page. I would like to learn more on the POST parameters. resp, data = http.post(path, data, headers) As 'Content-Type' => 'text/xml' And what is data parameter? What should I assign to 'data' parameter? Thanks... -- 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
[wtr-general] Re: Need support in using POST method in RUBY
while executing the script I get the following error How do I resolve it... SocketError: getaddrinfo: The storage control blocks were destroyed. from C:/Ruby186/lib/ruby/1.8/net/http.rb:560:in `initialize' from C:/Ruby186/lib/ruby/1.8/net/http.rb:560:in `open' from C:/Ruby186/lib/ruby/1.8/net/http.rb:560:in `connect' from C:/Ruby186/lib/ruby/1.8/timeout.rb:53:in `timeout' from C:/Ruby186/lib/ruby/1.8/timeout.rb:93:in `timeout' from C:/Ruby186/lib/ruby/1.8/net/http.rb:560:in `connect' from C:/Ruby186/lib/ruby/1.8/net/http.rb:553:in `do_start' from C:/Ruby186/lib/ruby/1.8/net/http.rb:542:in `start' from C:/Ruby186/lib/ruby/1.8/net/http.rb:440:in `start' On Mar 2, 11:22 am, Ashu wrote: > Hi, > I am making use of POST method to trace and element in a PHP file > which needs to be automated. While trying to locate through the XPATH, > watir was unable to locate the element as the page that was referenced > was a PHP page. > I would like to learn more on the POST parameters. > resp, data = http.post(path, data, headers) > As 'Content-Type' => 'text/xml' > And what is data parameter? > What should I assign to 'data' parameter? > Thanks... -- 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
[wtr-general] Re: Can Watir support PHP based technology?
Thanks alot... It was a very helpful reply from respected Super Key Looking at the time bound nature of the project, the above reply which actually worked out for me will be helpful in progressing ahead with the project. Thanks alot. I did observe that there are minor things that go overlooked which do cost us lot of time consumption. On Mar 2, 12:06 am, Super Kevy wrote: > First I'm glad you figured out whether php, java, ruby, asp it all > plays in a browser as HTML. > That should make your life easier. At some point go through the simple > tutorials athttp://www.w3schools.com/ > > Try this code fragment. Your trying to click an image button within a > form > > require 'rubygems' > require 'watir' > > sURL='http://your_test_url.htm' # Change this to your URL > browser = Watir::Browser.new > browser.goto(sURL) > sleep 3 > # The input button has a name attribute so we can use it as a handle > browser.button(:name,'SDP_0_0').flash() # MAKE ME FLASH a Yellow > highlight > sleep 3 > browser.button(:name,'SDP_0_0').click # The actual click of the > button > puts 'DONE' > > On Feb 28, 12:46 pm, Chuck van der Linden wrote: > > > On Feb 27, 8:44 pm, Ashu wrote: > > > > Yes, > > > as the script is running on the IP address, so a webpage opens that is > > > in PHP. > > > > Watir can detect the text that is written in td[2] > > > xpath - /html/body/div/div/div[5]/div/div[7]/table/tbody/tr/td[2] > > > But, > > > There is an image file in the input below > > > /html/body/div/div/div[6]/div/fieldset/table[2]/tbody/tr[3]/td[8]/ > > > input > > > as > > > > > name="SDP_0_0"> > > > > So on clicking on that image file an event occurs. > > > But it needs to be automated. > > > Please Help. > > > Thanks! > > > What have you tried so far? what if any results did you get? > > > you realize it's not our job to write your code for you?- Hide quoted text - > > > - Show quoted text - -- 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
[wtr-general] How to Trace the change in a field
hi, there is a field on the php page that keeps track of the change in counter field. On every next refresh the value changes of that variable. Change counter 1 The "1" in the above code determines that one transaction has taken place and it continues to increase up on every transaction update. I am unable to figure out the logic to keep track of the change. -- 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
[wtr-general] Re: How to Trace the change in a field
The xpath for the html html counter change1 is xpath /html/body/div/div/div[4]/div/fieldset/table[3]/tbody/tr[9]/ td[2]/div On Mar 3, 2:17 pm, Ashu wrote: > hi, > there is a field on the php page that keeps track of the change in > counter field. > On every next refresh the value changes of that variable. > Change counter > 1 > The "1" in the above code determines that one transaction has taken > place and it continues to increase up on every transaction update. > I am unable to figure out the logic to keep track of the change. -- 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
[wtr-general] Re: How to Trace the change in a field
ya I agree with Orde well my testing page contains multiple "" with same class = normal and div contains class = system for every "" On Mar 3, 10:27 am, orde wrote: > Find a way to determine the value of and assign > it to a variable. > > On Mar 3, 1:35 am, Ashu wrote: > > > The xpath for the html > > html counter change > class="normal">1 > > > is xpath /html/body/div/div/div[4]/div/fieldset/table[3]/tbody/tr[9]/ > > td[2]/div > > > On Mar 3, 2:17 pm, Ashu wrote: > > > > hi, > > > there is a field on the php page that keeps track of the change in > > > counter field. > > > On every next refresh the value changes of that variable. > > > Change counter > > > 1 > > > The "1" in the above code determines that one transaction has taken > > > place and it continues to increase up on every transaction update. > > > I am unable to figure out the logic to keep track of the change. -- 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
[wtr-general] Re: Need support in using POST method in RUBY
hi, Actually there was no need of POST in this case as my problem got resolved by including sleep statements. Thanks alot for the support and guidance. This forum has truly helped me sought out numerous issues. Thanks. On Mar 4, 10:58 pm, Chuck van der Linden wrote: > Monitoring HTTP traffic between the client and server is a completely > separate issue, and yes there are tools for that (including Fiddler2 > on windows), but I don't think that's what the OP was asking about. > > On Mar 3, 2:28 am, Danijel wrote: > > > In one way you can use watir-selenium , they have function > > > "Selenium for Java [java] Checking network > > traffic",https://mail.google.com/mail/?shva=1#inbox/12e77a83a1360d2d > > you can read there about session data. > > > br,Dani > > > On 2 mar., 07:22, Ashu wrote: > > > > Hi, > > > I am making use of POST method to trace and element in a PHP file > > > which needs to be automated. While trying to locate through the XPATH, > > > watir was unable to locate the element as the page that was referenced > > > was a PHP page. > > > I would like to learn more on the POST parameters. > > > resp, data = http.post(path, data, headers) > > > As 'Content-Type' => 'text/xml' > > > And what is data parameter? > > > What should I assign to 'data' parameter? > > > Thanks... -- 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
[wtr-general] Re: How to Trace the change in a field
Yes, you are right Chunk, My HTML code looks like this - /html/body/div/div/div[4]/div/fieldset/table[3]/tbody/tr[9]/Change counter0 I have tried as suggested by you, It gives me following error... C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/firewatir/ jssh_socket.rb:12:in `const_get': wrong number of arguments (2 for 1) (ArgumentError) from C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/ firewatir/jssh_socket.rb:12:in `js_eval' from C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/ firewatir/element.rb:997:in `text' from C:/Documents and Settings/tcsadmin/Desktop/ check_changecounter.rb:9 On Mar 4, 10:23 pm, Chuck van der Linden wrote: > If I read you correctly, the challenge is "get the contents of the > second cell on the table row where the first cell is 'change counter'" > is that right? > > Presuming that "change counter" appears nowhere else in that table, > AND that you have some way to identify the table itself, or a > container that holds the table > > browser.table(:how, "what").row(:text, /counter change/).cell(:index, > 2).text > > if there is no other row in any other table that contains 'counter > change' then you might even be able to do it by going straight to the > row and not worrying about the table element. > > browser.row(:text, /counter change/).cell(:index, 2).text > > To understand why that works, do some googling and reading about > something called 'regular expressions' > > PS for challenges like this, a tiny bit more of the HTML such as > details on the table, can be useful in terms of people being able to > give you better examples of the code you would need to use. The more > details you put into a question on the group, the more likely you are > to get a more 'exact' answer instead of a generic one. > > On Mar 3, 10:57 am, Ashu wrote: > > > ya I agree with Orde > > > well my testing page contains multiple "" with same class = normal > > and div contains class = system for every "" > > > On Mar 3, 10:27 am, orde wrote: > > > > Find a way to determine the value of and assign > > > it to a variable. > > > > On Mar 3, 1:35 am, Ashu wrote: > > > > > The xpath for the html > > > > html counter change > > > class="normal">1 > > > > > is xpath /html/body/div/div/div[4]/div/fieldset/table[3]/tbody/tr[9]/ > > > > td[2]/div > > > > > On Mar 3, 2:17 pm, Ashu wrote: > > > > > > hi, > > > > > there is a field on the php page that keeps track of the change in > > > > > counter field. > > > > > On every next refresh the value changes of that variable. > > > > > Change counter > > > > > 1 > > > > > The "1" in the above code determines that one transaction has taken > > > > > place and it continues to increase up on every transaction update. > > > > > I am unable to figure out the logic to keep track of the change. -- 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
[wtr-general] Application crashes on first execution
Hi, I am working on a project dealing with automation using WATIR. I have scripts for testing a Hardware device. On every first instance of executing the script, a new browser opens up. (Mozilla Browser 3.6.3) I hav installed jssh for firefox.(jssh-3.6-WINNT.xpi) Despite of that I am getting the following error, on first run. -> C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/firewatir/ firefox.rb:237:i n `set_defaults': Unable to connect to machine : 127.0.0.1 on port 9997. Make su re that JSSh is properly installed and Firefox is running with '-jssh' option (W atir::Exception::UnableToStartJSShException) As my application crashes, thereafter on the next execution the abover error doesnt appear and my application runs fine. I am using firewatir (1.6.5) fxruby (1.6.20 x86-mingw32, 1.2.6 mswin32) ruby 1.8.6 (2010-02-04 patchlevel 398) [i386-mingw32] Please help Thanks! -- 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
[wtr-general] Application crashes on first execution
Hi, I am working on a project dealing with automation using WATIR. I have scripts for testing a Hardware device. On every first instance of executing the script, a new browser opens up. (Mozilla Browser 3.6.3) I hav installed jssh for firefox.(jssh-3.6-WINNT.xpi) Despite of that I am getting the following error, on first run. -> C:/Ruby186/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/firewatir/ firefox.rb:237:in `set_defaults': Unable to connect to machine : 127.0.0.1 on port 9997. Make sure that JSSh is properly installed and Firefox is running with '-jssh' option (Watir::Exception::UnableToStartJSShException) As my application crashes, thereafter on the next execution the abover error doesnt appear and my application runs fine. I am using firewatir (1.6.5) fxruby (1.6.20 x86-mingw32, 1.2.6 mswin32) ruby 1.8.6 (2010-02-04 patchlevel 398) [i386-mingw32] Please help Thanks! -- 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
[wtr-general] Error while browser opens
Whenever I make a call for a new browser instance to be opened, by using the following $browser = Watir::Browser.new I am greeted with the following error in the command window, although my application doesnt crashes. C:/Ruby186/lib/ruby/gems/1.8/gems/activesupport-2.2.3/lib/ active_support/core_ext/enumerable.rb:57: warning: method redefined; discarding old sum (eval):1: warning: method redefined; discarding old dl (eval):1: warning: method redefined; discarding old dt (eval):1: warning: method redefined; discarding old dd Is there any solution to evade it? Thanks! -- 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
[wtr-general] Problem in setting radio button value
hi, I want to set radio button which are having the following fields(I have searched on related posts in the forum, was unable to solve my problem) Idle SituationText1Text2 ModeText3Text4 my automation code is browser.radio(:name => "idle0").flash browser.radio(:value => "1").set browser.radio(:name => "mode0").flash browser.radio(:value => "1").set Here, automation for only the idle0 works, but automation at mode0 doesnt take place Is there any other alternative? Thanks! -- 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
[wtr-general] Re: Problem in setting radio button value
Well thanks for the reply Karim. I did manage to solve the problem using browser.radios.each {|m| if m.name == "cc_output_mode0" && m.value == "1" m.set end } :-) On Mar 24, 4:22 pm, karim rayani wrote: > In the entire page, there are radio button which have the value property as > "1". hence browser.radio(:value => "1").set in the last line is going set > the radio button with value 1 which comes first in the html structure. > > I think you need some syntax like to fix the problem, by using multiple > attributes since a since attribute does not uniquely identify the object > > browser.radio(:value => "1", :index => 2).set > > On Thu, Mar 24, 2011 at 4:38 PM, Ashu wrote: > > hi, > > I want to set radio button which are having the following fields(I > > have searched on related posts in the forum, was unable to solve my > > problem) > > > Idle Situation > value="0" name="idle0">Text1 > value="1" name="idle0">Text2 > > > Mode > checked="checked" value="0" name="mode0">Text3 > value="1" name="mode0">Text4 > > > my automation code is > > browser.radio(:name => "idle0").flash > > browser.radio(:value => "1").set > > browser.radio(:name => "mode0").flash > > browser.radio(:value => "1").set > > > Here, automation for only the idle0 works, but automation at mode0 > > doesnt take place > > Is there any other alternative? > > Thanks! > > > -- > > Before posting, please readhttp://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<http://groups.google.com/group/watir-general%0Awatir-general+unsubscr...> -- 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
[wtr-general] Sending bits to parallel port
Hi, My project deals with sending data bits to a port through the parallel port. I am making use of dlportio.dll. I am referring to an example provided in http://yueda.issp.u-tokyo.ac.jp/weda/ruby/prnprtLX.rb. Can anyone please explain me how the code words especially I have never come across Inpbyte.call(adrs)&0xff. Thanks! -- 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
[wtr-general] Check already existed browser instance
Hi, I found a similar thread in Selenium forum. My application requires the need for browser instance while executing the code. As if the browser is closed by the user then the call to browser terminates my application. (I do create new browser instance as and when needed and terminate it otherwise) So, is there any way to check if a browser instance exists else create a new browser instance if it doesnt exist. Thanks. -- 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
[wtr-general] Check for browser instance
Hi, I found a similar thread in Selenium forum. My application requires the need for browser instance while executing the code. As if the browser is closed by the user then the call to browser terminates my application. (I do create new browser instance as and when needed and terminate it otherwise) So, is there any way to check if a browser instance exists else create a new browser instance if it doesnt exist. Thanks. -- 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
[wtr-general] Printing a Text on Browser
Hie, I want to trace a text from browser and print it. Html is :- Product Id123456 Can you please help me, as I want to trace and display 123456. Thanks -- 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
[wtr-general] Re: Printing a Text on Browser
Hi, on trying the above I get the following error :undefined method 'td' for # On May 5, 1:34 am, Željko Filipin wrote: > On Wed, May 4, 2011 at 10:31 PM, Ashu wrote: > > Product Id > >123456 > > Can you please help me, as I want to trace and display 123456. > > Try this: > > puts browser.td(:id => "e0_id").text > > Željko > -- > watir.com - community manager > watir.com/book - author > watirpodcast.com - host > viaqa.mobi conference on software testing - organizer -- 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
[wtr-general] Re: Printing a Text on Browser
Well I tried it, but since there doesnt exist any cell in the HTML, hence it does return with a error. On May 5, 12:54 pm, Željko Filipin wrote: > On Thu, May 5, 2011 at 9:40 AM, Ashu wrote: > > on trying the above I get the following error > > :undefined method 'td' for # > title="company:network"> > > Try this then: > > puts browser.cell(:id => "e0_id").text > > Željko -- 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
[wtr-general] Re: Printing a Text on Browser
Is there an alternative wherein I can list all the tables and then locate the particular desired text? Thanks... On May 5, 1:48 pm, Ashu wrote: > Well I tried it, > but since there doesnt exist any cell in the HTML, hence it does > return with a error. > > On May 5, 12:54 pm, Željko Filipin > wrote: > > > On Thu, May 5, 2011 at 9:40 AM, Ashu wrote: > > > on trying the above I get the following error > > > :undefined method 'td' for # > > title="company:network"> > > > Try this then: > > > puts browser.cell(:id => "e0_id").text > > > Željko -- 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