[wtr-general] Re: Scripts not working in IE11 browser
Hi All, I too have run into this issue where I am trying to run my scripts on IE10 on my windows 8 environment. I am able to launch the browser and then navigate to the expected url but then IE browser fails to locate any element whereas the same script is working fine on other browsers. I have already followed the given link ( https://code.google.com/p/selenium/wiki/InternetExplorerDriver) but that was of no use. Please tell me any possible solution. 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 --- You received this message because you are subscribed to the Google Groups Watir General group. To unsubscribe from this group and stop receiving emails from it, send an email to watir-general+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[wtr-general] Can we use Watir for cloud based web applications testing?
Hi All: I have a query. Can we use Watir for cloud based web applications testing? Thanks in Advance !! -- Thanks and Regards, Amit -- -- 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 --- You received this message because you are subscribed to the Google Groups Watir General group. To unsubscribe from this group and stop receiving emails from it, send an email to watir-general+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [wtr-general] Can we use Watir for cloud based web applications testing?
Hi Željko, Could you please elaborate on this, please? On Tue, Mar 12, 2013 at 3:56 PM, Željko Filipin zeljko.fili...@gmail.comwrote: On Tue, Mar 12, 2013 at 11:14 AM, Amit Kumar amit.sr...@gmail.com wrote: Can we use Watir for cloud based web applications testing? An Example Would Be Handy Right About Now[1]. Željko -- [1] http://www.exampler.com/blog/2007/08/07/marketing-mania-continues/ -- -- 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 --- You received this message because you are subscribed to the Google Groups Watir General group. To unsubscribe from this group and stop receiving emails from it, send an email to watir-general+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Thanks and Regards, Amit -- -- 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 --- You received this message because you are subscribed to the Google Groups Watir General group. To unsubscribe from this group and stop receiving emails from it, send an email to watir-general+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [wtr-general] Can we use Watir for cloud based web applications testing?
Željko, I meant cloud based application, which will be run on cloud. Actually, I do not have that knowledge about cloud computing. On Tue, Mar 12, 2013 at 4:24 PM, Željko Filipin zeljko.fili...@gmail.comwrote: On Tue, Mar 12, 2013 at 11:43 AM, Amit Kumar amit.sr...@gmail.com wrote: Could you please elaborate on this, please? Sure. What do you mean by cloud based web applications testing? Ž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 --- You received this message because you are subscribed to the Google Groups Watir General group. To unsubscribe from this group and stop receiving emails from it, send an email to watir-general+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Thanks and Regards, Amit -- -- 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 --- You received this message because you are subscribed to the Google Groups Watir General group. To unsubscribe from this group and stop receiving emails from it, send an email to watir-general+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [wtr-general] Can we use Watir for cloud based web applications testing?
Željko, I am talking about cloud computing. Actually I want to use Watir cloud based application. http://en.wikipedia.org/wiki/Cloud_computing Hope this helps. Please let me know if you want to know anything else? On Tue, Mar 12, 2013 at 4:46 PM, Željko Filipin zeljko.fili...@gmail.comwrote: On Tue, Mar 12, 2013 at 12:13 PM, Amit Kumar amit.sr...@gmail.com wrote: I meant cloud based application, which will be run on cloud. Actually, I do not have that knowledge about cloud computing. What do you mean by cloud? Do you have a problem to solve, or are you just curious? Ž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 --- You received this message because you are subscribed to the Google Groups Watir General group. To unsubscribe from this group and stop receiving emails from it, send an email to watir-general+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Thanks and Regards, Amit -- -- 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 --- You received this message because you are subscribed to the Google Groups Watir General group. To unsubscribe from this group and stop receiving emails from it, send an email to watir-general+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [wtr-general] Can we use Watir for cloud based web applications testing?
Željko, Thanks. It Helps. On Tue, Mar 12, 2013 at 4:56 PM, Željko Filipin zeljko.fili...@gmail.comwrote: On Tue, Mar 12, 2013 at 12:23 PM, Amit Kumar amit.sr...@gmail.com wrote: Actually I want to use Watir cloud based application. Watir drives browsers. If your application is web application that you access from a browser, Watir does not care if the application is on your computer or in the cloud. Ž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 --- You received this message because you are subscribed to the Google Groups Watir General group. To unsubscribe from this group and stop receiving emails from it, send an email to watir-general+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Thanks and Regards, Amit -- -- 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 --- You received this message because you are subscribed to the Google Groups Watir General group. To unsubscribe from this group and stop receiving emails from it, send an email to watir-general+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [wtr-general] I am beginner, getting error please help !
Thanks Željko. Appreciate your help !! On Tue, Feb 5, 2013 at 7:54 PM, Željko Filipin zeljko.fili...@gmail.comwrote: On Mon, Feb 4, 2013 at 3:25 PM, Amit Kumar amit.sr...@gmail.com wrote: But if we have Watir-webdriver for Firefox. Why do we need selenium-webdriver? Is it mandatory ? Yes. watir-webdriver gem is just an API on top of selenium-webdriver gem. Željko -- https://leanpub.com/watirbook -- -- 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 --- You received this message because you are subscribed to the Google Groups Watir General group. To unsubscribe from this group and stop receiving emails from it, send an email to watir-general+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Thanks and Regards, Amit -- -- 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 --- You received this message because you are subscribed to the Google Groups Watir General group. To unsubscribe from this group and stop receiving emails from it, send an email to watir-general+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [wtr-general] I am beginner, getting error please help !
Dear Joe: Thanks for providing this useful information. Could you please suggest me that which versions of Ruby, Rubygems and Watir should I use on Windows 8? I am currently using Ruby1.8.7, rubygems1.8.25. On Fri, Feb 1, 2013 at 8:46 PM, Joe Fleck joeflec...@gmail.com wrote: Hi Amit, Here is my gem list for a Windows8 VM. C:\gem list *** LOCAL GEMS *** bigdecimal (1.1.0) builder (3.1.4) childprocess (0.3.7) commonwatir (4.0.0) ffi (1.3.1 x86-mingw32) hoe (3.5.0) io-console (0.3) json (1.5.4) mini_magick (3.2.1) minitest (2.5.1) multi_json (1.5.0) mysql (2.9.0 x86-mingw32) mysql2 (0.3.11 x86-mingw32) nokogiri (1.5.6 x86-mingw32) rake (0.9.2.2) rautomation (0.7.3) rdoc (3.9.4) rubyzip (0.9.9) s4t-utils (1.0.4) selenium-webdriver (2.29.0) subexec (0.0.4) terminal-table (1.4.5) user-choices (1.1.6.1) watir (4.0.2 x86-mingw32) watir-classic (3.4.0) watir-webdriver (0.6.2) websocket (1.0.6) win32-api (1.4.8 x86-mingw32) win32-process (0.7.1) win32screenshot (1.0.7) windows-api (0.4.2) windows-pr (1.2.2) xml-simple (1.1.2) Joe On Fri, Feb 1, 2013 at 9:30 AM, Amit Kumar amit.sr...@gmail.com wrote: Thanks a lot Joe. It worked. One quick question: I am using Windows 8 and Ruby 1.8.7 Could you please suggest me which versions of the Ruby, Rubygems and Watir are best for Windows 8. I will really appreciate. if you provide me complete package for Watir on Windows 8. On Fri, Feb 1, 2013 at 7:49 PM, Joe Fleck joeflec...@gmail.com wrote: I would change 'default' to 'new'. browser = Watir::Browser.new :ff The above should do it. Joe On Fri, Feb 1, 2013 at 9:18 AM, Amit Kumar amit.sr...@gmail.com wrote: Hi Joe: Thanks for your reply. I installed watir-webdriver-0.6.2. Now I am getting different error: hello.rb:3: undefined method `default=' for Watir::Browser:Class (NoMethodError) And my code looks like: require 'rubygems' require 'watir-webdriver' browser = Watir::Browser.default = firefox browser = Watir::Browser.start URL browser.form(:id, signin).text_field(:id, username).set(username) browser.form(:id, signin).text_field(:id, password).set(Password) browser.form(:id, signin).button(:value, Sign In).click On Fri, Feb 1, 2013 at 7:35 PM, Joe Fleck joeflec...@gmail.com wrote: Hi Amit, When driving Firefox you need to use watir-webdriver not watir. These are the two line I changed. require 'watir-webdriver' browser = Watir::Browser.default = firefox On Fri, Feb 1, 2013 at 8:52 AM, Amit Kumar amit.sr...@gmail.com wrote: Dear All: Hope you all are doing great. Please help on following error. I am getting error while executing script. I am using Windows 8 and Ruby187. Code: require 'rubygems' require 'Watir' Watir::Browser.default = firefox browser = Watir::Browser.start website url browser.form(:id, signin).text_field(:id, username).set(username) browser.form(:id, signin).text_field(:id, password).set(password) browser.form(:id, signin).button(:value, Sign In).click Error: E:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require': no such file to load -- watir/loader (LoadError) from E:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require' from E:/Ruby187/lib/ruby/gems/1.8/gems/commonwatir-4.0.0/lib/Watir.rb:1 from E:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:60:in `gem_original_require' from E:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:60:in `require' from hello.rb:2 -- Thanks and Regards, Amit -- -- 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 --- You received this message because you are subscribed to the Google Groups Watir General group. To unsubscribe from this group and stop receiving emails from it, send an email to watir-general+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- 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 --- You received this message because you are subscribed to the Google Groups Watir General group. To unsubscribe from this group and stop receiving emails from it, send an email to watir-general+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out
Re: [wtr-general] I am beginner, getting error please help !
Thanks for your help !! But I am confused on selenium-webdriver (2.29.0). Why do we need selenium-webdriver (2.29.0) here? Please brief on the same. On Mon, Feb 4, 2013 at 6:48 PM, Joe Fleck joeflec...@gmail.com wrote: Hi Amit, I recommend using the following: ruby 1.9.3 selenium-webdriver (2.29.0) watir-webdriver (0.6.2) latest version of watir gem and rubygems I think if you have ruby 1.8.7 you are in good shape too. Joe On Mon, Feb 4, 2013 at 3:09 AM, Amit Kumar amit.sr...@gmail.com wrote: Dear Joe: Thanks for providing this useful information. Could you please suggest me that which versions of Ruby, Rubygems and Watir should I use on Windows 8? I am currently using Ruby1.8.7, rubygems1.8.25. On Fri, Feb 1, 2013 at 8:46 PM, Joe Fleck joeflec...@gmail.com wrote: Hi Amit, Here is my gem list for a Windows8 VM. C:\gem list *** LOCAL GEMS *** bigdecimal (1.1.0) builder (3.1.4) childprocess (0.3.7) commonwatir (4.0.0) ffi (1.3.1 x86-mingw32) hoe (3.5.0) io-console (0.3) json (1.5.4) mini_magick (3.2.1) minitest (2.5.1) multi_json (1.5.0) mysql (2.9.0 x86-mingw32) mysql2 (0.3.11 x86-mingw32) nokogiri (1.5.6 x86-mingw32) rake (0.9.2.2) rautomation (0.7.3) rdoc (3.9.4) rubyzip (0.9.9) s4t-utils (1.0.4) selenium-webdriver (2.29.0) subexec (0.0.4) terminal-table (1.4.5) user-choices (1.1.6.1) watir (4.0.2 x86-mingw32) watir-classic (3.4.0) watir-webdriver (0.6.2) websocket (1.0.6) win32-api (1.4.8 x86-mingw32) win32-process (0.7.1) win32screenshot (1.0.7) windows-api (0.4.2) windows-pr (1.2.2) xml-simple (1.1.2) Joe On Fri, Feb 1, 2013 at 9:30 AM, Amit Kumar amit.sr...@gmail.com wrote: Thanks a lot Joe. It worked. One quick question: I am using Windows 8 and Ruby 1.8.7 Could you please suggest me which versions of the Ruby, Rubygems and Watir are best for Windows 8. I will really appreciate. if you provide me complete package for Watir on Windows 8. On Fri, Feb 1, 2013 at 7:49 PM, Joe Fleck joeflec...@gmail.com wrote: I would change 'default' to 'new'. browser = Watir::Browser.new :ff The above should do it. Joe On Fri, Feb 1, 2013 at 9:18 AM, Amit Kumar amit.sr...@gmail.com wrote: Hi Joe: Thanks for your reply. I installed watir-webdriver-0.6.2. Now I am getting different error: hello.rb:3: undefined method `default=' for Watir::Browser:Class (NoMethodError) And my code looks like: require 'rubygems' require 'watir-webdriver' browser = Watir::Browser.default = firefox browser = Watir::Browser.start URL browser.form(:id, signin).text_field(:id, username).set(username) browser.form(:id, signin).text_field(:id, password).set(Password) browser.form(:id, signin).button(:value, Sign In).click On Fri, Feb 1, 2013 at 7:35 PM, Joe Fleck joeflec...@gmail.com wrote: Hi Amit, When driving Firefox you need to use watir-webdriver not watir. These are the two line I changed. require 'watir-webdriver' browser = Watir::Browser.default = firefox On Fri, Feb 1, 2013 at 8:52 AM, Amit Kumar amit.sr...@gmail.com wrote: Dear All: Hope you all are doing great. Please help on following error. I am getting error while executing script. I am using Windows 8 and Ruby187. Code: require 'rubygems' require 'Watir' Watir::Browser.default = firefox browser = Watir::Browser.start website url browser.form(:id, signin).text_field(:id, username).set(username) browser.form(:id, signin).text_field(:id, password).set(password) browser.form(:id, signin).button(:value, Sign In).click Error: E:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require': no such file to load -- watir/loader (LoadError) from E:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require' from E:/Ruby187/lib/ruby/gems/1.8/gems/commonwatir-4.0.0/lib/Watir.rb:1 from E:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:60:in `gem_original_require' from E:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:60:in `require' from hello.rb:2 -- Thanks and Regards, Amit -- -- 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 --- You received this message because you are subscribed to the Google Groups Watir General group. To unsubscribe from this group and stop receiving emails from it, send
[wtr-general] I am beginner, getting error please help !
Dear All: Hope you all are doing great. Please help on following error. I am getting error while executing script. I am using Windows 8 and Ruby187. *Code: *require 'rubygems' require 'Watir' Watir::Browser.default = firefox browser = Watir::Browser.start website url browser.form(:id, signin).text_field(:id, username).set(username) browser.form(:id, signin).text_field(:id, password).set(password) browser.form(:id, signin).button(:value, Sign In).click *Error:* E:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require': no such file to load -- watir/loader (LoadError) from E:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require' from E:/Ruby187/lib/ruby/gems/1.8/gems/commonwatir-4.0.0/lib/Watir.rb:1 from E:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:60:in `gem_original_require' from E:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:60:in `require' from hello.rb:2 -- Thanks and Regards, Amit -- -- 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 --- You received this message because you are subscribed to the Google Groups Watir General group. To unsubscribe from this group and stop receiving emails from it, send an email to watir-general+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [wtr-general] Past date selection from calendar
Hi Revanth, You haven't posted any HTML code or condition, not getting, what do you want exactly? I assume, you have a text field associated with calender. If this is the case then you can select any date as follows. t=Time.now y=t.strftime(%Y) m=t.strftime(%m) d=t.strftime(%d) date= y+-+m+-+d browser.text_field(:id, date).value=date If this is not the case, please post your question with sufficient details. -Amit On Tue, Sep 27, 2011 at 12:43 PM, Revanth revanths...@gmail.com wrote: Hi, How do I select a past date from a past year in the calendar using Watir? -- 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.comhttp://groups.google.com/group/watir-general%0awatir-general+unsubscr...@googlegroups.com -- Thanks and Regards, Amit -- 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: Getting Error for Chrome when I run script from PHP code. Works fine for Firefox !!!!!
Hello.could someone help me on this? On Fri, Sep 23, 2011 at 6:15 PM, Amit Bobade amit.sr...@gmail.com wrote: *Dear All:* I am getting below error while executing the script form PHP on Chrome Browser: Error while awaiting automation ping from browser process. estautomationproxy_launcher.cc(259): error: Value of: automation()-GetBrowserWindowCount(window_count) Which is: 0 Actual: false Expected: true Let me explain the all the corner cases: 1. I am calling Ruby-Watir script from PHP code. 2. It works properly for FIREFOX. 3. When I run the script on CHROME manually (i.e. without calling from PHP) then it works properly. 4. And if I run script calling from PHP on CHROME then it gives mentioned error. 5. I am using Ruby187 and Watir Webdriver. Could someone tell the reason behind this, why am I getting this error on Chrome? Please help on this, I hope the details are enough to understand the problem. If you need more information, please feel free to ask for the same. I will really appreciate your help !! Thanks in Advance * * Regards, Amit -- Thanks and Regards, Amit -- 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
Re: [wtr-general] Re: New (minor) version of the book
Nice One Thanks. On Fri, Sep 23, 2011 at 1:45 PM, Aditya vaditya2...@gmail.com wrote: Great Book !!! On Fri, Sep 23, 2011 at 1:42 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Thu, Sep 22, 2011 at 8:42 PM, Super Kevy kpe...@scholarshipamerica.org wrote: The book is awesome for a Work in progress. Thanks. Will you ever consider describing how to configure some IDEs to run the script, SCITE, TEXTPAD come to mind :) Added to TODO: https://github.com/zeljkofilipin/watirbook/commit/6c6d083fc454401aadfeb6cef20ff1e602ccc683 I am not familiar with scite or textpad, so if you are using them, feel free to write a chapter or two for the book. Full credits to you and all that. If you have further comments, please send them to watirb...@googlegroups.com. I have sent 0.7.1 announcement here by mistake. Ž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 -- 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 -- Thanks and Regards, Amit -- 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
Re: [wtr-general] Re: Getting Error: `WebDriverError': Element is not currently visible and so may not be interacted with (Selenium::WebDriver::Error::ElementNotDisplayedError)
Okay guys, It's my mistake. I used *when_present *for* input id=fb-note-title type= text /* . It (*when_present*) is working fine for *browser.link(:id, showlink).click *. But my script is producing the following error for * input id= fb-note-title type=text / ** Error: Element is not currently visible and so may not be interacted with * Please let me know how to deal with this. And I am really sorry, I wasted your valuable time, but I realize some important things about Watir. Thank you all. Thanks, -Amit On Sun, Sep 4, 2011 at 1:11 PM, Chuck van der Linden sqa...@gmail.comwrote: On Sep 3, 3:00 am, Alister Scott alister.sc...@gmail.com wrote: are you using id = showlink or id = fb-note-title? You may be waiting for the wrong thing That or his error has moved down the script and he has not realized it. I'd bet that the click on 'showlink' is working fine now and we have a later error with another element (:id, 'fb-note-title') that is again being created or manipulated by clientside scripting, so is not present when the page finishes loading from the server and he needs to again wait until it is present before trying to interact with 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.comhttp://groups.google.com/group/watir-general%0awatir-general+unsubscr...@googlegroups.com -- Thanks and Regards, Amit -- 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
Re: [wtr-general] Getting Error: `WebDriverError': Element is not currently visible and so may not be interacted with (Selenium::WebDriver::Error::ElementNotDisplayedError)
Hi Micheal, I tried to access element as follows. Such issues occur with my scripts sometimes. Such problems really suck when I give demo to my senior. Am I using Watir in wrong direction? Is it because of slow connection? *RUBY CODE: * browser = Watir::Browser.new :ff browser.goto(http://yogita/gosocially/re-login.php;) browser.form(:id, signin).text_field(:id, username).set(earthmplex) browser.form(:id, signin).text_field(:id, password).set(earth123) browser.form(:id, signin).button(:value, Sign In).click sleep(5) #After adding this line, there was no error. browser.link(:id, showlink).click *HTML CODE: * div class=attch-img a href=javascript:void(0); class=attach_link dashboard_sprites OFF id=showlink title=Link/a /div Thanks, Amit. On Thu, Sep 1, 2011 at 8:26 AM, Michael mmcwill...@gmail.com wrote: Please post your ruby code as well so we can see how you are trying to locate this element. You can always use wait_until { … locate link … }, but if this is truly static HTML I would be surprised if that was necessary. On 2011-08-31, at 12:32 AM, Amit Bobade wrote: Thanks for your prompt reply, Micheal. Element is not hidden. It is very simple HTML code. I tried using sleep( ) method for this and fortunately it worked I don't know the exact problem and this may not be a proper solution. Could you please suggest something more productive? HTML CODE: div class=attch-img a href=javascript:void(0); class=attach_link dashboard_sprites OFF id=showlink title=Link/a /div div class=attch-img a href=javascript:void(0); style=opacity: 0.5; class=OFF attach_video dashboard_sprites title=Configure Youtube to upload video/a /div Thanks, -Amit On Wed, Aug 31, 2011 at 11:51 AM, Michael mmcwill...@gmail.com wrote: Your HTML and code snippets would help us see what is going on. In general you cannot interact with elements that are hidden (not visible). This may be occurring for a few reasons: - element is hidden (or positioned off the screen) by CSS styles or JavaScript - your selector found a different element matching your selector, and this element is hidden On 2011-08-31, at 12:06 AM, Amit Bobade wrote: Hi, I am getting following error while running my script on FF. `WebDriverError': Element is not currently visible and so may not be interacted with (Selenium::WebDriver::Error::ElementNotDisplayedError) I am using Ruby187 and Watir-webdriver. Could someone tell me why this error is occuring? -- Thanks and Regards, Amit -- 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 -- 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 -- Thanks and Regards, Amit -- 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 -- 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 -- Thanks and Regards, Amit -- 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
Re: [wtr-general] Getting Error: `WebDriverError': Element is not currently visible and so may not be interacted with (Selenium::WebDriver::Error::ElementNotDisplayedError)
Hi Brett, Thanks for your reply. I tried using when_present but it produces following error: timed out after 30 seconds, waiting for {:type=(any text type), :tag_name=input or textarea, :id=fb-note-title} to become present Does that fix it 100% of the time? I am not sure that it worked for 100%. Because sometimes, I got error after using sleep() too. Thanks, Amit. On Fri, Sep 2, 2011 at 6:00 PM, brett sykes brettcsy...@gmail.com wrote: Try deleting the sleep and changing: browser.link(:id, showlink).click to browser.link(:id, showlink).when_present.click Does that fix it 100% of the time? It kind of sounds like you have some sort of panel that's loading a bunch of stuff up before making itself visible. Brett On Fri, Sep 2, 2011 at 4:35 AM, Amit Bobade amit.sr...@gmail.com wrote: Hi Micheal, I tried to access element as follows. Such issues occur with my scripts sometimes. Such problems really suck when I give demo to my senior. Am I using Watir in wrong direction? Is it because of slow connection? *RUBY CODE: * browser = Watir::Browser.new :ff browser.goto(http://yogita/gosocially/re-login.php;) browser.form(:id, signin).text_field(:id, username).set(earthmplex) browser.form(:id, signin).text_field(:id, password).set(earth123) browser.form(:id, signin).button(:value, Sign In).click sleep(5) #After adding this line, there was no error. browser.link(:id, showlink).click *HTML CODE: * div class=attch-img a href=javascript:void(0); class=attach_link dashboard_sprites OFF id=showlink title=Link/a /div Thanks, Amit. On Thu, Sep 1, 2011 at 8:26 AM, Michael mmcwill...@gmail.com wrote: Please post your ruby code as well so we can see how you are trying to locate this element. You can always use wait_until { … locate link … }, but if this is truly static HTML I would be surprised if that was necessary. On 2011-08-31, at 12:32 AM, Amit Bobade wrote: Thanks for your prompt reply, Micheal. Element is not hidden. It is very simple HTML code. I tried using sleep( ) method for this and fortunately it worked I don't know the exact problem and this may not be a proper solution. Could you please suggest something more productive? HTML CODE: div class=attch-img a href=javascript:void(0); class=attach_link dashboard_sprites OFF id=showlink title=Link/a /div div class=attch-img a href=javascript:void(0); style=opacity: 0.5; class=OFF attach_video dashboard_sprites title=Configure Youtube to upload video/a /div Thanks, -Amit On Wed, Aug 31, 2011 at 11:51 AM, Michael mmcwill...@gmail.com wrote: Your HTML and code snippets would help us see what is going on. In general you cannot interact with elements that are hidden (not visible). This may be occurring for a few reasons: - element is hidden (or positioned off the screen) by CSS styles or JavaScript - your selector found a different element matching your selector, and this element is hidden On 2011-08-31, at 12:06 AM, Amit Bobade wrote: Hi, I am getting following error while running my script on FF. `WebDriverError': Element is not currently visible and so may not be interacted with (Selenium::WebDriver::Error::ElementNotDisplayedError) I am using Ruby187 and Watir-webdriver. Could someone tell me why this error is occuring? -- Thanks and Regards, Amit -- 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 -- 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 -- Thanks and Regards, Amit -- 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 -- 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 -- Thanks and Regards, Amit -- 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 -- 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 -- Thanks and Regards, Amit -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice
[wtr-general] Getting Error: `WebDriverError': Element is not currently visible and so may not be interacted with (Selenium::WebDriver::Error::ElementNotDisplayedError)
Hi, I am getting following error while running my script on FF. `WebDriverError': Element is not currently visible and so may not be interacted with (Selenium::WebDriver::Error::ElementNotDisplayedError) I am using Ruby187 and Watir-webdriver. Could someone tell me why this error is occuring? -- Thanks and Regards, Amit -- 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
Re: [wtr-general] Getting Error: `WebDriverError': Element is not currently visible and so may not be interacted with (Selenium::WebDriver::Error::ElementNotDisplayedError)
Thanks for your prompt reply, Micheal. Element is not hidden. It is very simple HTML code. I tried using sleep( ) method for this and fortunately it worked I don't know the exact problem and this may not be a proper solution. Could you please suggest something more productive? HTML CODE: div class=attch-img a href=javascript:void(0); class=attach_link dashboard_sprites OFF id=showlink title=Link/a /div div class=attch-img a href=javascript:void(0); style=opacity: 0.5; class=OFF attach_video dashboard_sprites title=Configure Youtube to upload video/a /div Thanks, -Amit On Wed, Aug 31, 2011 at 11:51 AM, Michael mmcwill...@gmail.com wrote: Your HTML and code snippets would help us see what is going on. In general you cannot interact with elements that are hidden (not visible). This may be occurring for a few reasons: - element is hidden (or positioned off the screen) by CSS styles or JavaScript - your selector found a different element matching your selector, and this element is hidden On 2011-08-31, at 12:06 AM, Amit Bobade wrote: Hi, I am getting following error while running my script on FF. `WebDriverError': Element is not currently visible and so may not be interacted with (Selenium::WebDriver::Error::ElementNotDisplayedError) I am using Ruby187 and Watir-webdriver. Could someone tell me why this error is occuring? -- Thanks and Regards, Amit -- 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 -- 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 -- Thanks and Regards, Amit -- 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
Re: [wtr-general] Re: Getting errro in Chrome. Please suggest answer.
Hi, I downloaded the chrome drivers and added path as follows: profile = Selenium::WebDriver::Chrome::Profile.new profile['download.prompt_for_download'] = false profile['download.default_directory'] = C:\\xampp\\htdocs\\Ruby187\\bin browser = Watir::Browser.new :chrome, :profile = profile browser.goto(http://yogita/gosocially/re-login.php;) But still it giving same error as follows: * Started ChromeDriver port=1689 .\test\automation\proxy_launcher.cc(124): error: Value of: app_launched Actual: 1 Expected: AUTOMATION_SUCCESS Which is: 0 Error while awaiting automation ping from browser process .\test\automation\proxy_launcher.cc(259): error: Value of: automation()-GetBrowserWindowCount(window_count) Actual: false Expected: true Thanks, Amit. * On Tue, Aug 30, 2011 at 6:12 PM, Amit Bobade amit.sr...@gmail.com wrote: Okay..Thank you four great help Yuping and Alister. Thanks, -Amit On Tue, Aug 30, 2011 at 3:33 PM, Yuping Zhong littlezhong...@gmail.comwrote: Hi Amit, You need to download the chrome driver and put it on your PATH. On Tue, Aug 30, 2011 at 5:15 PM, Amit Bobade amit.sr...@gmail.comwrote: Thank you very much for your reply, Alister. I am using watir-webdriver, so still do I need to download Chrome driver? I think, watir -webdriver support Chrome, FF and IE. Thanks, On Tue, Aug 30, 2011 at 12:03 PM, Alister Scott alister.sc...@gmail.com wrote: have you downloaded the chromdriver and put it on your path http://watirwebdriver.com/chrome/ -- 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 -- Thanks and Regards, Amit -- 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 -- 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 -- Thanks and Regards, Amit -- Thanks and Regards, Amit -- 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
Re: [wtr-general] Re: Getting errro in Chrome. Please suggest answer.
Thank you very much for your reply, Alister. I am using watir-webdriver, so still do I need to download Chrome driver? I think, watir -webdriver support Chrome, FF and IE. Thanks, On Tue, Aug 30, 2011 at 12:03 PM, Alister Scott alister.sc...@gmail.comwrote: have you downloaded the chromdriver and put it on your path http://watirwebdriver.com/chrome/ -- 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 -- Thanks and Regards, Amit -- 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
Re: [wtr-general] Re: Getting errro in Chrome. Please suggest answer.
Okay..Thank you four great help Yuping and Alister. Thanks, -Amit On Tue, Aug 30, 2011 at 3:33 PM, Yuping Zhong littlezhong...@gmail.comwrote: Hi Amit, You need to download the chrome driver and put it on your PATH. On Tue, Aug 30, 2011 at 5:15 PM, Amit Bobade amit.sr...@gmail.com wrote: Thank you very much for your reply, Alister. I am using watir-webdriver, so still do I need to download Chrome driver? I think, watir -webdriver support Chrome, FF and IE. Thanks, On Tue, Aug 30, 2011 at 12:03 PM, Alister Scott alister.sc...@gmail.comwrote: have you downloaded the chromdriver and put it on your path http://watirwebdriver.com/chrome/ -- 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 -- Thanks and Regards, Amit -- 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 -- 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 -- Thanks and Regards, Amit -- 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] Windows-Chrome-Ruby187- Getting 2 Errors alternatively
Hi, When I run my script on Chrome browser, it gives two errors alternatively. 1) * Started ChromeDriver port=1689 .\test\automation\proxy_launcher.cc(124): error: Value of: app_launched Actual: 1 Expected: AUTOMATION_SUCCESS Which is: 0 Error while awaiting automation ping from browser process .\test\automation\proxy_launcher.cc(259): error: Value of: automation()-GetBrowserWindowCount(window_count) Actual: false Expected: true * 2) unable to connect to chromedriver http://127.0.0.1:2447 -- Thanks and Regards, Amit -- 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] Getting errro in Chrome. Please suggest answer.
Dear All: I am trying to run the script from HTML and the script is getting run successfully in FF. But it is showing error while running in Chrome. I am getting following error: * Started ChromeDriver port=1689 .\test\automation\proxy_launcher.cc(124): error: Value of: app_launched Actual: 1 Expected: AUTOMATION_SUCCESS Which is: 0 Error while awaiting automation ping from browser process .\test\automation\proxy_launcher.cc(259): error: Value of: automation()-GetBrowserWindowCount(window_count) Actual: false Expected: true * *I am using Ruby187 and Watir Webdrivers. *Please tell me how to resolve this error. -- Thanks and Regards, Amit -- 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
Re: [wtr-general] Chrome is getting closed even I do not use browser.close() method.
Dear Željko, I am still facing this problem. Any updates? Thanks, Amit. 2011/7/22 Amit Bobade amit.sr...@gmail.com Thank you very much. Please let us know once you are done. Thanks in advance. On Fri, Jul 22, 2011 at 1:48 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Fri, Jul 22, 2011 at 7:50 AM, Amit Bobade amit.sr...@gmail.com wrote: My scripts are running properly but Chrome browser is getting closed even I do not use browser.close() method. To quote Jari (from http://stackoverflow.com/questions/6176526/chrome-browser-opens-and-closes-using-watir-webdriver ): The Chrome driver will close all browser instances when your program exits. It's a known issue, and its priority was fortunately bumped today - look for a fix soon. Željko -- watir.com - community manager watir.com/book - author watirpodcast.com - host -- 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 -- Thanks and Regards, Amit -- Thanks and Regards, Amit -- 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
Re: [wtr-general] Chrome is getting closed even I do not use browser.close() method.
Thank you very much. Please let us know once you are done. Thanks in advance. On Fri, Jul 22, 2011 at 1:48 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Fri, Jul 22, 2011 at 7:50 AM, Amit Bobade amit.sr...@gmail.com wrote: My scripts are running properly but Chrome browser is getting closed even I do not use browser.close() method. To quote Jari (from http://stackoverflow.com/questions/6176526/chrome-browser-opens-and-closes-using-watir-webdriver ): The Chrome driver will close all browser instances when your program exits. It's a known issue, and its priority was fortunately bumped today - look for a fix soon. Željko -- watir.com - community manager watir.com/book - author watirpodcast.com - host -- 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 -- Thanks and Regards, Amit -- 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] Chrome is getting closed even I do not use browser.close() method.
Dear all: I am facing problem with chrome browser. My scripts are running properly but Chrome browser is getting closed even I do not use *browser.close()* method. This is a problem with Chrome only, FF and IE are working as expected. I am using Watir-webdriver. Please tell me know the solution. Thanks in advance. -- Thanks and Regards, Amit -- 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
Re: [wtr-general] Unable to Identify the Divs
Hi, Try to access this div using Xpath. On Fri, Jul 15, 2011 at 4:10 PM, pun2et puneet.pat...@gmail.com wrote: I am trying to find a Div which is inside a div tree as shown below. Div with Class=”globalSearchItems” is not able find using watir code. Div class=contentFrame DIV id=content p/p p/p a name=top/a b p/p p/p div class=globalSearchItems p/p p/p div class=globalSearchItems p/p p/p /div /div puts @browser.div(:class, contentFrame).div(:id, content).exist? = True why divs are returning false? puts @browser.div(:class, contentFrame).div(:id, content). div(:class, globalSearchItems ).exist? = false puts @browser.div(:class, globalSearchItems ).exist? = false -- 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 -- Thanks and Regards, Amit -- 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
Re: [wtr-general] Re: Jssh Socket error
Hi, To maximize the IE browser, try this: require 'rubygems' require 'Watir' ie = Watir::IE.new ie.goto(http://www.google.com;) ie.maximize For other browsers, I am trying to find out the solutions. Thanks, -Amit On Fri, Jul 8, 2011 at 5:24 PM, Aditya vaditya2...@gmail.com wrote: Thanks for the information. But what about the rest i asked for? How can i maximize the browser and the rest? And Also i want to pass the browser as a parameter and at run i can verify for IE,Firefox and safari. So i planned. I worked on this earlier but now the solution is specific to fire fox. if you change ie in that you still see the firefox opening rather ie. So i need this. help me in this as well. On Fri, Jul 8, 2011 at 11:00 AM, Amit Bobade amit.sr...@gmail.com wrote: hi, browser = Watir::Browser.new :ff - Why do we need to have FF here? You can have :chrome and : ie also. Thanks, -Amit On Thu, Jul 7, 2011 at 7:43 PM, V vaditya2...@gmail.com wrote: How do i maximize the FF window? I need to replace the browser every time i execute. How? browser = Watir::Browser.new :ff - Why do we need to have FF here? On Jul 7, 6:58 pm, V vaditya2...@gmail.com wrote: Changed as require rubygems require 'watir' require 'watir-webdriver' def defaultbrowser(br) #~ require 'watir-webdriver' Watir::Browser.default=br puts Default Browser: +Watir::Browser.default end def setdefaultbrowser(br) br=Watir::Browser.new end br= 'ie' #'safari', 'firefox', or 'ie' #URL= #~ defaultbrowser(br) setdefaultbrowser(br) is occuring the following error C:/Ruby187/lib/ruby/gems/1.8/gems/watir-webdriver-0.2.5/lib/watir- webdriver/version.rb:2: warning: already initialized constant VERSION C:/Ruby187/lib/ruby/gems/1.8/gems/watir-webdriver-0.2.5/lib/watir- webdriver/exception.rb:8: superclass mismatch for class UnknownObjectException (TypeError) from C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: 36:in `gem_original_require' from C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: 36:in `require' from C:/Ruby187/lib/ruby/gems/1.8/gems/watir-webdriver-0.2.5/lib/ watir-webdriver.rb:7 from C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: 59:in `gem_original_require' from C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: 59:in `require' Removed Watir require rubygems #require 'watir' require 'watir-webdriver' def defaultbrowser(br) #~ require 'watir-webdriver' Watir::Browser.default=br puts Default Browser: +Watir::Browser.default end def setdefaultbrowser(br) br=Watir::Browser.new end br= 'ie' #'safari', 'firefox', or 'ie' #URL= #~ defaultbrowser(br) setdefaultbrowser(br) Executed ... Thanks But i need to replace the browser every time i execute. How? browser = Watir::Browser.new :ff - Why do we need to have FF here? On Jul 7, 6:51 pm, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Thu, Jul 7, 2011 at 3:20 PM, V vaditya2...@gmail.com wrote: exceptions.rb:12: superclass mismatch for class UnknownObjectException (TypeError) You require both watir and watir-webdriver in your script. Require only watir-webdriver. Ž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.comhttp://groups.google.com/group/watir-generalwatir-general+unsubscr...@googlegroups.com -- Thanks and Regards, Amit -- 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 -- 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 -- Thanks and Regards, Amit -- 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
Re: [wtr-general] Re: Jssh Socket error
hi, I encountered this problem long before. I tried so hard to overcome this problem. The solution is - use Watir-webdriver and change your script accordingly. To install Watir-webdriver use following command: gem install watir-webdriver Let me know if any problem. Thanks, -Amit On Thu, Jul 7, 2011 at 6:06 PM, V vaditya2...@gmail.com wrote: Facing the same issue. Again Ruby version 1.8.7 watir 1.9.1. Windows. Facing the /Ruby187/lib/ruby/gems/1.8/gems/firewatir-1.9.1/lib/ firewatir/jssh_socket.rb:19:in `js_eval': this.docShell is null (JsshSocket::JSTypeError) issue. Please help me in this asap On Jun 27, 10:34 pm, Abe Heward abe.hew...@gmail.com wrote: Tried updating to Ruby 1.9.2 and Watir 1.9.0 today. Immediately ran into this same problem again when I tried to run a test script with Firefox. Firefox doesn't want to open. -- 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 -- Thanks and Regards, Amit -- 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
Re: [wtr-general] Re: Jssh Socket error
Hi, Have you changed scripts for watir-Webdrivers as follows? Include :- require 'rubygems' require 'Watir-webdriver' To open browser:- browser = Watir::Browser.new :ff browser.goto(URL) Try this and let me know. Thanks, Amit On Thu, Jul 7, 2011 at 6:30 PM, V vaditya2...@gmail.com wrote: Installed Watir-Webdriver. But no use. C:\Ruby187gem install watir-webdriver Fetching: json_pure-1.5.3.gem (100%) Fetching: rubyzip-0.9.4.gem (100%) Fetching: childprocess-0.1.9.gem (100%) Fetching: selenium-webdriver-0.2.2.gem (100%) Fetching: watir-webdriver-0.2.5.gem (100%) Successfully installed json_pure-1.5.3 Successfully installed rubyzip-0.9.4 Successfully installed childprocess-0.1.9 Successfully installed selenium-webdriver-0.2.2 Successfully installed watir-webdriver-0.2.5 5 gems installed Installing ri documentation for json_pure-1.5.3... Installing ri documentation for rubyzip-0.9.4... Installing ri documentation for childprocess-0.1.9... Installing ri documentation for selenium-webdriver-0.2.2... Installing ri documentation for watir-webdriver-0.2.5... Installing RDoc documentation for json_pure-1.5.3... Installing RDoc documentation for rubyzip-0.9.4... Installing RDoc documentation for childprocess-0.1.9... Installing RDoc documentation for selenium-webdriver-0.2.2... Installing RDoc documentation for watir-webdriver-0.2.5... C:\Ruby187 But executing the script, still facing the same issue. Ruby187/lib/ruby/gems/1.8/gems/firewatir-1.9.1/lib/firewatir/ jssh_socket.rb:19:in `js_eval': this.docShell is null (JsshSocket::JSTypeError) from C:/Ruby187/lib/ruby/gems/1.8/gems/firewatir-1.9.1/lib/firewatir/ firefox.rb:194:in `set_browser_document' from C:/Ruby187/lib/ruby/gems/1.8/gems/firewatir-1.9.1/lib/firewatir/ firefox.rb:45:in `initialize' from C:/Ruby187/lib/ruby/gems/1.8/gems/commonwatir-1.9.1/lib/watir/ browser.rb:65:in `new' from C:/Ruby187/lib/ruby/gems/1.8/gems/commonwatir-1.9.1/lib/watir/ browser.rb:65:in `new' On Jul 7, 5:46 pm, Amit Bobade amit.sr...@gmail.com wrote: hi, I encountered this problem long before. I tried so hard to overcome this problem. The solution is - use Watir-webdriver and change your script accordingly. To install Watir-webdriver use following command: gem install watir-webdriver Let me know if any problem. Thanks, -Amit On Thu, Jul 7, 2011 at 6:06 PM, V vaditya2...@gmail.com wrote: Facing the same issue. Again Ruby version 1.8.7 watir 1.9.1. Windows. Facing the /Ruby187/lib/ruby/gems/1.8/gems/firewatir-1.9.1/lib/ firewatir/jssh_socket.rb:19:in `js_eval': this.docShell is null (JsshSocket::JSTypeError) issue. Please help me in this asap On Jun 27, 10:34 pm, Abe Heward abe.hew...@gmail.com wrote: Tried updating to Ruby 1.9.2 and Watir 1.9.0 today. Immediately ran into this same problem again when I tried to run a test script with Firefox. Firefox doesn't want to open. -- 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 -- Thanks and Regards, Amit -- 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 -- Thanks and Regards, Amit -- 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
Re: [wtr-general] Re: Jssh Socket error
Hi, Lets resolved error first. To open browser use following code: To open browser:- browser = Watir::Browser.new :ff browser.goto(URL) Try this. Thanks Amit On Thu, Jul 7, 2011 at 7:11 PM, V vaditya2...@gmail.com wrote: changed.. But getting this error: Bro.rb:17:in `setdefaultbrowser': undefined method `default' for Watir::Browser:Class (NoMethodError) And Also i want to pass the browser as a parameter and at run i can verify for IE,Firefox and safari. So i planned. I worked on this earlier but now the solution is specific to fire fox. if you change ie in that you still see the firefox opening rather ie. So i need this. help me in this as well. On Jul 7, 6:28 pm, Amit Bobade amit.sr...@gmail.com wrote: Hi, Check your code properly, mate. def setdefaultbrowser() require 'watir' should be - require 'watir-webdriver' Thanks, -Amit. On Thu, Jul 7, 2011 at 6:50 PM, V vaditya2...@gmail.com wrote: My code Looks like this. Let me know what to do. As getting the below error: C:/Ruby187/lib/ruby/gems/1.8/gems/commonwatir-1.9.1/lib/watir/ version.rb:3: warning: already initialized constant VERSION C:/Ruby187/lib/ruby/gems/1.8/gems/commonwatir-1.9.1/lib/watir/ exceptions.rb:12: superclass mismatch for class UnknownObjectException (TypeError) from C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: 36:in `gem_original_require' from C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: 36:in `require' from C:/Ruby187/lib/ruby/gems/1.8/gems/commonwatir-1.9.1/lib/watir/ waiter.rb:6 from C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: 36:in `gem_original_require' from C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: 36:in `require' from C:/Ruby187/lib/ruby/gems/1.8/gems/commonwatir-1.9.1/lib/watir.rb: 7 from C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: 59:in `gem_original_require' from C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: 59:in `require' from Bro.rb:7:in `defaultbrowser' CODE: require rubygems require Watir-webdriver require test/unit require win32ole def defaultbrowser(br) require 'watir' Watir::Browser.default=br puts Default Browser: +Watir::Browser.default end def setdefaultbrowser() require 'watir' #~ $br=Watir::Browser.new $br=Watir::Browser.new :ff #~ Watir::Browser.default=br #~ puts Default Browser: +Watir::Browser.default if ($br) $br.close($br) # Not working need to do else $br=Watir::Browser.new end end br= 'firefox' #'safari', 'firefox', or 'ie' #URL= defaultbrowser(br) setdefaultbrowser() On Jul 7, 6:12 pm, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Thu, Jul 7, 2011 at 3:00 PM, V vaditya2...@gmail.com wrote: Ruby187/lib/ruby/gems/1.8/gems/firewatir-1.9.1/lib/firewatir/ jssh_socket.rb:19:in `js_eval': this.docShell is null (JsshSocket::JSTypeError) You have installed watir-webdriver, but you are still using firewatir gem in your scripts, as the error message says. Replace require firewatir with require watir-webdriver in your scripts. Željko -- 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 -- Thanks and Regards, Amit -- 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 -- Thanks and Regards, Amit -- 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
Re: [wtr-general] Re: Jssh Socket error
hi, browser = Watir::Browser.new :ff - Why do we need to have FF here? You can have :chrome and : ie also. Thanks, -Amit On Thu, Jul 7, 2011 at 7:43 PM, V vaditya2...@gmail.com wrote: How do i maximize the FF window? I need to replace the browser every time i execute. How? browser = Watir::Browser.new :ff - Why do we need to have FF here? On Jul 7, 6:58 pm, V vaditya2...@gmail.com wrote: Changed as require rubygems require 'watir' require 'watir-webdriver' def defaultbrowser(br) #~ require 'watir-webdriver' Watir::Browser.default=br puts Default Browser: +Watir::Browser.default end def setdefaultbrowser(br) br=Watir::Browser.new end br= 'ie' #'safari', 'firefox', or 'ie' #URL= #~ defaultbrowser(br) setdefaultbrowser(br) is occuring the following error C:/Ruby187/lib/ruby/gems/1.8/gems/watir-webdriver-0.2.5/lib/watir- webdriver/version.rb:2: warning: already initialized constant VERSION C:/Ruby187/lib/ruby/gems/1.8/gems/watir-webdriver-0.2.5/lib/watir- webdriver/exception.rb:8: superclass mismatch for class UnknownObjectException (TypeError) from C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: 36:in `gem_original_require' from C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: 36:in `require' from C:/Ruby187/lib/ruby/gems/1.8/gems/watir-webdriver-0.2.5/lib/ watir-webdriver.rb:7 from C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: 59:in `gem_original_require' from C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: 59:in `require' Removed Watir require rubygems #require 'watir' require 'watir-webdriver' def defaultbrowser(br) #~ require 'watir-webdriver' Watir::Browser.default=br puts Default Browser: +Watir::Browser.default end def setdefaultbrowser(br) br=Watir::Browser.new end br= 'ie' #'safari', 'firefox', or 'ie' #URL= #~ defaultbrowser(br) setdefaultbrowser(br) Executed ... Thanks But i need to replace the browser every time i execute. How? browser = Watir::Browser.new :ff - Why do we need to have FF here? On Jul 7, 6:51 pm, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Thu, Jul 7, 2011 at 3:20 PM, V vaditya2...@gmail.com wrote: exceptions.rb:12: superclass mismatch for class UnknownObjectException (TypeError) You require both watir and watir-webdriver in your script. Require only watir-webdriver. Ž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 -- Thanks and Regards, Amit -- 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
Re: [wtr-general] Re: How to get the value of the li tag
Good work Jasmine. :) Really helpful. Thanks 2011/6/29 Jasmine nicely...@hotmail.com I have resolved the problem. ie.li(:text.q).text On 6月29日, 上午11时50分, Jasmine nicely...@hotmail.com wrote: ie.li(:text,q).click .the satement can get the value,but click is not right.I need click the name On 6月29日, 上午11时35分, Jasmine nicely...@hotmail.com wrote: How to get the value of the li tag? There are code about the question div class=dy_bgg ul li v=12 style=cursor: pointer;class=dy_bggq/li li v=13 style=cursor: pointer;class=dy_bggt/li I want to get q or t,there is only data if use ie.li(:class,dy_bgg),I need to get the value and click 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 -- Thanks and Regards, Amit -- 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
Re: [wtr-general] Re: How to make the scripts more effective at slow connection?
Thanks for your valuable advice. :) On Mon, Jun 27, 2011 at 2:24 PM, Danijel danijel.vuko...@gmail.com wrote: Hi Amit, Like said joedio, you need to add when you are loading new pages, every page has it's own recognizing element, until this element is present then wait, after finding element you can continiue with test execution. it's same for AJAX. br,Dani -- 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 -- Thanks and Regards, Amit -- 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 make the scripts more effective at slow connection?
Dear All: I am using Watir for automation scripts. But sometimes the scripts do not work properly due to slow internet connection. Actually When I was giving demo to my team members then it happened. Also at fast connection, sometimes the scripts does not get loaded and execution gets stopped due to some reasons. Please could you provide some solutions regarding to the same. Please tell me how to make scripts more effective. -- Thanks and Regards, Amit -- 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 we check whether particular div is loaded or not?
Dear All: I want to check whether particular 'div' is loaded or not using Watir? Is it possible? if yes, please tell how to check for the same. Thanks in advance. -- Thanks and Regards, Amit -- 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
Re: [wtr-general] Can we check whether particular div is loaded or not?
Thank you so much, Željko :) On Tue, Jun 21, 2011 at 3:31 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Tue, Jun 21, 2011 at 11:55 AM, Amit Bobade amit.sr...@gmail.com wrote: I want to check whether particular 'div' is loaded or not using Watir? This will return true or false: browser.div(how, what).exist? http://rdoc.info/gems/watir/1.9.0/Watir/Element:exist%3F Ž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 -- Thanks and Regards, Amit -- 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
Re: [wtr-general] watir-webdriver instead of firewatir- Showing error
Thank you very very much Cristina and Jari. :) I tried - gem update childprocess and it worked. Thanks. On Thu, Jun 9, 2011 at 7:11 PM, a b cristina.watir.toro...@gmail.comwrote: Or if it is still not working try to uninstall everything, even ruby; delete the remaining files and perform a fresh installation. I have encountered similar errors and that is what i did. Cristina On Thu, Jun 9, 2011 at 9:25 AM, a b cristina.watir.toro...@gmail.comwrote: Hi Amit, try: browser = Watir::Browser.new :ff browser.goto(http://www.gosocially.com/index.php;) Cristina On Thu, Jun 9, 2011 at 6:04 AM, Amit Bobade amit.sr...@gmail.com wrote: Dear All: I want to use watir-webdriver instead of firewatir. I installed watir-webdriver now but when I execute my script I am getting following error. Why it is so? Error: E:/Ruby187/lib/ruby/site_ruby/1.8/rubygems.rb:242:in `activate': can't activate ffi (= 1.0.7, runtime) for [selenium-webdriver-0.2.1, watir-webdriver-0.2.4], already activated ffi-0.6.3-x86-mingw32 for [childprocess-0.1.7, selenium-webdriver-0.2.1, watir-webdriver-0.2.4] (Gem::LoadError) from E:/Ruby187/lib/ruby/site_ruby/1.8/rubygems.rb:258:in `activate' from E:/Ruby187/lib/ruby/site_ruby/1.8/rubygems.rb:257:in `each' from E:/Ruby187/lib/ruby/site_ruby/1.8/rubygems.rb:257:in `activate' from E:/Ruby187/lib/ruby/site_ruby/1.8/rubygems.rb:258:in `activate' from E:/Ruby187/lib/ruby/site_ruby/1.8/rubygems.rb:257:in `each' from E:/Ruby187/lib/ruby/site_ruby/1.8/rubygems.rb:257:in `activate' from E:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:33:in `require' from profile_album_pub.rb.rb:11 My Code: require rubygems require watir-webdriver Watir::Browser.default = firefox browser = Watir::Browser.start http://www.gosocially.com/index.php; Please suggest solution. Thanks in advance. -- Thanks and Regards, Amit -- 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 -- 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 -- Thanks and Regards, Amit -- 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] watir-webdriver instead of firewatir- Showing error
Dear All: I want to use watir-webdriver instead of firewatir. I installed watir-webdriver now but when I execute my script I am getting following error. Why it is so? Error: E:/Ruby187/lib/ruby/site_ruby/1.8/rubygems.rb:242:in `activate': can't activate ffi (= 1.0.7, runtime) for [selenium-webdriver-0.2.1, watir-webdriver-0.2.4], already activated ffi-0.6.3-x86-mingw32 for [childprocess-0.1.7, selenium-webdriver-0.2.1, watir-webdriver-0.2.4] (Gem::LoadError) from E:/Ruby187/lib/ruby/site_ruby/1.8/rubygems.rb:258:in `activate' from E:/Ruby187/lib/ruby/site_ruby/1.8/rubygems.rb:257:in `each' from E:/Ruby187/lib/ruby/site_ruby/1.8/rubygems.rb:257:in `activate' from E:/Ruby187/lib/ruby/site_ruby/1.8/rubygems.rb:258:in `activate' from E:/Ruby187/lib/ruby/site_ruby/1.8/rubygems.rb:257:in `each' from E:/Ruby187/lib/ruby/site_ruby/1.8/rubygems.rb:257:in `activate' from E:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:33:in `require' from profile_album_pub.rb.rb:11 My Code: require rubygems require watir-webdriver Watir::Browser.default = firefox browser = Watir::Browser.start http://www.gosocially.com/index.php; Please suggest solution. Thanks in advance. -- Thanks and Regards, Amit -- 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
Re: [wtr-general] watir-webdriver instead of firewatir- Showing error
Dear Željko, Thanks for your reply. I tried as you suggested but it didn't work for me. I got following error for the same code. ERROR: E:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/dependency.rb:247:in `to_specs': Could not find ffi (~ 0.6.3) amongst [abstract-1.0.0, actionmailer-3.0.7, actionpack-3.0.7, activemodel-3.0.7, activerecord-3.0.7, activeresource-3.0.7, activesupport-3.0.7, activesupport-2.3.9, arel-2.0.9, builder-3.0.0, builder-2.1.2, bundler-1.0.13, calendar_date_select-1.16.2, childprocess-0.1.7, commonwatir-1.9.0.rc4, commonwatir-1.8.1, commonwatir-1.6.7, erubis-2.6.6, firewatir-1.9.0.rc4, firewatir-1.8.1, firewatir-1.6.7, hoe-2.8.0, i18n-0.5.0, json_pure-1.5.1, mail-2.2.19, mime-types-1.16, net-http-digest_auth-1.1.1, nokogiri-1.4.4.1-x86-mingw32, polyglot-0.3.1, rack-1.2.2, rack-mount-0.6.14, rack-test-0.5.7, rails-3.0.7, railties-3.0.7, rake-0.8.7, rautomation-0.5.1, rubygems-update-1.8.5, rubygems-update-1.4.1, rubyzip-0.9.4, s4t-utils-1.0.4, selenium-client-1.2.18, selenium-webdriver-0.2.1, selenium-webdriver-0.2.0, selenium-webdriver-0.1.3, sqlite3-1.3.3-x86-mingw32, thor-0.14.6, treetop-1.4.9, tzinfo-0.3.27, user-choices-1.1.6.1, watir-1.9.0.rc4, watir-1.8.1, watir-1.6.7, watir-webdriver-0.2.4, watir-webdriver-0.2.3, win32-api-1.4.7-x86-mingw32, win32-process-0.6.5, windows-api-0.4.0, windows-pr-1.1.2, xml-simple-1.0.12] (Gem::LoadError) from E:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/specification.rb:759:in `activate_dependencies' from E:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/specification.rb:756:in `each' from E:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/specification.rb:756:in `activate_dependencies' from E:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/specification.rb:741:in `activate' from E:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/specification.rb:762:in `activate_dependencies' from E:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/specification.rb:756:in `each' from E:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/specification.rb:756:in `activate_dependencies' from E:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/specification.rb:741:in `activate' from E:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/specification.rb:762:in `activate_dependencies' from E:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/specification.rb:756:in `each' from E:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/specification.rb:756:in `activate_dependencies' from E:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/specification.rb:741:in `activate' from E:/Ruby187/lib/ruby/site_ruby/1.8/rubygems.rb:211:in `try_activate' from E:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:58:in `require' from profile_album_pub.rb:2 On Thu, Jun 9, 2011 at 5:34 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Thu, Jun 9, 2011 at 12:04 PM, Amit Bobade amit.sr...@gmail.com wrote: E:/Ruby187/lib/ruby/site_ruby/1.8/rubygems.rb:242:in `activate': can't activate ffi (= 1.0.7, runtime) for [selenium-webdriver-0.2.1, watir-webdriver-0.2.4], already activated ffi-0.6.3-x86-mingw32 for This sounds like rubygems problem: http://www.google.com/search?q=%22can%27t+activate%22+%22already+activated%22 Looks like you should uninstall old version of ffi, and maybe update rubygems. Ž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 -- Thanks and Regards, Amit -- 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
Re: [wtr-general] Re: Getting (JsshSocket::JSSyntaxError) Error
Hi, I tried it but id didn't work. I got following error again. Does it has some specific solution? Because of this I am not able to move forward. E:/Ruby187/lib/ruby/gems/1.8/gems/firewatir-1.6.7/lib/firewatir/jssh_socket.rb:19:in `js_eval': missing ; before statement (JsshSocket::JSSyntaxError) from E:/Ruby187/lib/ruby/gems/1.8/gems/firewatir-1.6.7/lib/firewatir/element.rb:1002:in `text' from manual_publish.rb:202 On Wed, Jun 1, 2011 at 8:48 PM, Angrez Singh ang...@gmail.com wrote: can you try checking a static text inside the div? something like this: text.include?(text) On Wed, Jun 1, 2011 at 4:19 PM, Amit Bobade amit.sr...@gmail.com wrote: Hi, My code is as follows. I located element manually instead of using xpath. Following code works properly for *exists? *But it does not work for *text.include?(#{variable_name}). * **I tried this with *text.include?(variable_name) *too (i.e. removing #{ } ) as Gilberto suggested, but it didn't work. browser.div(:id, 'published-articles').div(:class, 'top-green-left').div(:class, 'scroll-main-content').div(:class, 'holder osX').div(:class, 'jScrollPaneContainer').div(:class, 'scroll-pane').div(:class, 'scroll-main-content-set').div(:class, 'scroll-main-content-set-center vertical_repeat').div(:class, 'scroll-main-content-set-center-content').div(:class, 'right-text-top').div(:class, 'scroll-main-content-set-attch-img').div(:class, 'scroll-main-content-set-center-content-bold').* text.include?(#{variable_name})* On Wed, Jun 1, 2011 at 3:49 PM, Angrez Singh ang...@gmail.com wrote: can you please post the code that you are executing? On Wed, Jun 1, 2011 at 1:05 PM, Gilberto Velenux Ficara g.fic...@gmail.com wrote: On 31 Mag, 07:38, Amit Bobade amit.sr...@gmail.com wrote: Dear All: I am getting following error while executing the script. Please provide some solution. E:/Ruby187/lib/ruby/gems/1.8/gems/firewatir-1.6.7/lib/firewatir/jssh_socket .rb:19:in `js_eval': missing ; before statement (JsshSocket::JSSyntaxError) I had the same error, but it was a bug on my code... I was using something like: browser.div(:class, /#{variable}/).present? but variable was already a regexp. I changed it back to: browser.div(:class, variable).present? and now it works... I hope it helps :) Gilberto -- 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.comhttp://groups.google.com/group/watir-general%0awatir-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 -- Thanks and Regards, Amit -- 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 -- 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 -- Thanks and Regards, Amit -- 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
Re: [wtr-general] Re: Getting (JsshSocket::JSSyntaxError) Error
Hi Gilberto, I tried this one. But unfortunately I did not work. On Wed, Jun 1, 2011 at 1:05 PM, Gilberto Velenux Ficara g.fic...@gmail.com wrote: On 31 Mag, 07:38, Amit Bobade amit.sr...@gmail.com wrote: Dear All: I am getting following error while executing the script. Please provide some solution. E:/Ruby187/lib/ruby/gems/1.8/gems/firewatir-1.6.7/lib/firewatir/jssh_socket .rb:19:in `js_eval': missing ; before statement (JsshSocket::JSSyntaxError) I had the same error, but it was a bug on my code... I was using something like: browser.div(:class, /#{variable}/).present? but variable was already a regexp. I changed it back to: browser.div(:class, variable).present? and now it works... I hope it helps :) Gilberto -- 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 -- Thanks and Regards, Amit -- 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
Re: [wtr-general] Re: Getting (JsshSocket::JSSyntaxError) Error
Hi, My code is as follows. I located element manually instead of using xpath. Following code works properly for *exists? *But it does not work for *text.include?(#{variable_name}). * **I tried this with *text.include?(variable_name) *too (i.e. removing #{ } ) as Gilberto suggested, but it didn't work. browser.div(:id, 'published-articles').div(:class, 'top-green-left').div(:class, 'scroll-main-content').div(:class, 'holder osX').div(:class, 'jScrollPaneContainer').div(:class, 'scroll-pane').div(:class, 'scroll-main-content-set').div(:class, 'scroll-main-content-set-center vertical_repeat').div(:class, 'scroll-main-content-set-center-content').div(:class, 'right-text-top').div(:class, 'scroll-main-content-set-attch-img').div(:class, 'scroll-main-content-set-center-content-bold').* text.include?(#{variable_name})* On Wed, Jun 1, 2011 at 3:49 PM, Angrez Singh ang...@gmail.com wrote: can you please post the code that you are executing? On Wed, Jun 1, 2011 at 1:05 PM, Gilberto Velenux Ficara g.fic...@gmail.com wrote: On 31 Mag, 07:38, Amit Bobade amit.sr...@gmail.com wrote: Dear All: I am getting following error while executing the script. Please provide some solution. E:/Ruby187/lib/ruby/gems/1.8/gems/firewatir-1.6.7/lib/firewatir/jssh_socket .rb:19:in `js_eval': missing ; before statement (JsshSocket::JSSyntaxError) I had the same error, but it was a bug on my code... I was using something like: browser.div(:class, /#{variable}/).present? but variable was already a regexp. I changed it back to: browser.div(:class, variable).present? and now it works... I hope it helps :) Gilberto -- 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.comhttp://groups.google.com/group/watir-general%0awatir-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 -- Thanks and Regards, Amit -- 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: Getting (JsshSocket::JSSyntaxError) Error
Seems like nobody knows solution for this..strange On Tue, May 31, 2011 at 11:08 AM, Amit Bobade amit.sr...@gmail.com wrote: Dear All: I am getting following error while executing the script. Please provide some solution. E:/Ruby187/lib/ruby/gems/1.8/gems/firewatir-1.6.7/lib/firewatir/jssh_socket.rb:19:in `js_eval': missing ; before statement (JsshSocket::JSSyntaxError) Thanks in advance. -- Thanks and Regards, Amit -- Thanks and Regards, Amit -- 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] Getting (JsshSocket::JSSyntaxError) Error
Dear All: I am getting following error while executing the script. Please provide some solution. E:/Ruby187/lib/ruby/gems/1.8/gems/firewatir-1.6.7/lib/firewatir/jssh_socket.rb:19:in `js_eval': missing ; before statement (JsshSocket::JSSyntaxError) Thanks in advance. -- Thanks and Regards, Amit -- 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
Re: [wtr-general] Re: Where to put user defined class to include it in various scripts
Thanks a ton, Joedio. :) On Sat, May 21, 2011 at 6:15 PM, joedio joe...@comcast.net wrote: Amit, These are indeed a Ruby questions NOT a Watir questions. I appreciate your candor in noting that with your question. The answers to your questions are: 1. Where to save this class so that I will be able to include it in my scripts? A: You can save it anywhere you like in the file system 2. Can I include this class using 'require' ? A: Yes I STRONGLY recomend that you now refer to the require and include methods in Ruby RDoc http://ruby-doc.org/core/ It will explain the use of those (and many many more) methods available with Ruby. Also if you have Ruby 1.8.7 installed take the time to read the documents which are under the \doc directory under your Ruby install path. Reading them will save you a lifetime of grief and confusion. You can also find this on-line at: http://www.ruby-doc.org/docs/ProgrammingRuby/ Joe On May 21, 4:24 am, Amit Bobade amit.sr...@gmail.com wrote: *Dear All:* This is more like a Ruby Question. Could anybody help me? I have written a class and now I require it for some scripts. So instead of copying this class in every script I have to include this class in my scripts. Therefore, please tell me 1. Where to save this class so that I will be able to include it in my scripts? 2. Can I include this class using 'require' ? -- Thanks and Regards, Amit -- 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 -- Thanks and Regards, Amit -- 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
Re: [wtr-general] How to get the status of http
Dear Qiannan, Here is the answer of you question. Use following code. This is working code. I used this in my scripts. require 'net/http' require 'uri' def page_status url url = URI.parse(url) http = Net::HTTP.new(url.host, url.port) http.start do http.request_get(url.path.empty? ? / : url.path) do |res| return {:name = res.class, :code = res.code} end end end status = page_status(http://www.yourURL.com;) # Printing response class and status. puts res_class=status[:name] puts stat=status[:code] On Sat, May 21, 2011 at 9:25 PM, Qiannan Zhang qian...@ecitysky.com wrote: Hi, all I need help, i do not know how to get the status of http, is there anyone know how to do? 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 -- Thanks and Regards, Amit -- 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] Where to put user defined class to include it in various scripts
*Dear All:* This is more like a Ruby Question. Could anybody help me? I have written a class and now I require it for some scripts. So instead of copying this class in every script I have to include this class in my scripts. Therefore, please tell me 1. Where to save this class so that I will be able to include it in my scripts? 2. Can I include this class using 'require' ? -- Thanks and Regards, Amit -- 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 generate the test results?
*Dear all:* I am writing automation scripts using watir. I usually run scripts in editor and get output in the same. But when I run scripts by clicking them then scripts doesn't generate any output (i.e. There is no output window.). For this I am generating the text files to save the test results. But it is too tedious to find the text files and refer the results. Therefore, I want to show results just after running the scripts to the user. So my question is- *Is there any way to generate the results easily after running the test without editor? * * * *Please suggest the way to achieve this. * -- Thanks and Regards, Amit -- 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
Re: [wtr-general] How to generate the test results?
Thanks Željko. But running scripts using command prompt is okay for me. But I have to deliver the scripts to somebody and he wants the results by double clicking the rb files. So please send me appropriate solution for the same. Thanks in advance. On Fri, May 20, 2011 at 1:33 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Fri, May 20, 2011 at 8:04 AM, Amit Bobade amit.sr...@gmail.com wrote: But when I run scripts by clicking them then scripts doesn't generate any output (i.e. There is no output window.). You run the script by double clicking rb file? I suggest that you open command prompt and execute the file from there. Please let me know if you do not know how to do that. Ž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 -- Thanks and Regards, Amit -- 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
Re: [wtr-general] Re: How to generate the test results?
Thanks Dani, I think this would be a great option. Could you please provide this in detailed? Thanks in advance. On Fri, May 20, 2011 at 1:39 PM, Danijel danijel.vuko...@gmail.com wrote: Hi, It is possbile. You can can prepare data create XML file and export into some application which will display graph of your execution and history of execution. At first you have to create Global variables such as: testcasename userstoriy idtestcase description, starttime, endtime, .. Every time when test is started, Setup is executed. In Setup you wrote details of for text case such as: starttime, testispassed = false In test case i set values: testcasename userstoriy idtestcase description, mesage -set value Testis passed = true if test is successfully executed, and you also have to use error handle and put error id message if error persist. After test case is finished, Teardown is called. All data you have stored and put into XML and save it. In this way i did report. I Use Accipio for reporting, you can find it in source forge, it's simple tool with historical execution, results are saved in html and have also graphical charts. br, Dani -- 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 -- Thanks and Regards, Amit -- 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
Re: [wtr-general] How to generate the test results?
Thanks buddies.I will try this and will let you know the results. Thanks for your help. :) On Fri, May 20, 2011 at 2:18 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Fri, May 20, 2011 at 10:45 AM, Amit Bobade amit.sr...@gmail.com wrote: But I have to deliver the scripts to somebody and he wants the results by double clicking the rb files. Then create a ruby script that will output results to file. Daniel suggested one way. Ž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 -- Thanks and Regards, Amit -- 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
Re: [wtr-general] How to generate the test results?
Hello everyone. Thanks for your help once again. I decided to generate report in HTML file instead of XML. I found a very good article for the same. Here it is: http://wiki.openqa.org/display/WTR/HTML+report+class @Ranjith, Sorry I haven't created XML file. Please have a look of this : http://wiki.openqa.org/display/WTR/HTML+report+class :) On Fri, May 20, 2011 at 2:54 PM, ranjith kumar ranjith@gmail.comwrote: Hey Amit, Kindly share the XML file once you are done. Thanks in Advance. Regards, Ranjith On Fri, May 20, 2011 at 11:34 AM, Amit Bobade amit.sr...@gmail.comwrote: *Dear all:* I am writing automation scripts using watir. I usually run scripts in editor and get output in the same. But when I run scripts by clicking them then scripts doesn't generate any output (i.e. There is no output window.). For this I am generating the text files to save the test results. But it is too tedious to find the text files and refer the results. Therefore, I want to show results just after running the scripts to the user. So my question is- *Is there any way to generate the results easily after running the test without editor? * * * *Please suggest the way to achieve this. * -- Thanks and Regards, Amit -- 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 -- 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 -- Thanks and Regards, Amit -- 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 deal with HTTP responce
Dear all: I am trying to deal with http response using watir. It is possible with watir? If yes, please tell me how to deal with response (status code), header, etc. -- Thanks and Regards, Amit -- 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
Re: [wtr-general] Re: Can we set text in read only text field using Watir.
Thank you so much Ivan. It worked. :) On Fri, May 13, 2011 at 2:09 PM, Ivan Kabluchkov ikabluch...@gmail.comwrote: use value= method ie.text_field(:class = some_class).value = some value to set in read-only field -- 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 -- 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 select the value of the drop down dyanamically
Hello all: I have a problem in locating a value of the drop down. The scene is as follows: 1. I want to select an option of the drop down dynamically. 2. Option ids and titles are dynamically generated. Code: select id=existingAlbum option selected=selectedSelect Existing Album/option optionProfile:-/option option id=1254542 name=profile title=Nature PicuresNature Picures/option option id=5674845 name=profile title=Test 123Test 123/option option id=5245465 name=profile title=PicturesPictures/option /select So, I have to select one of the options dynamically. Could someone help me? -- 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
Re: [wtr-general] How to select the value of the drop down dyanamically
Thanks for replying mate. I have a drop down having some values. Now I want to select one of the values at random (Not dynamically. sorry and thanks). Please suggest. Thanks, Amit * * On Thu, May 12, 2011 at 1:48 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Thu, May 12, 2011 at 9:27 AM, Amit Bobade amit.sr...@gmail.com wrote: So, I have to select one of the options dynamically. What do you mean by dynamically? How do you know what to select when you are doing it manually? Ž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 -- 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
Re: [wtr-general] How to select the value of the drop down dyanamically
Yes you are right. But my problem is ids and names are dynamically generated in the drop down. I want to select one of them. Please tell me how to select one of the options among- Nature Picures, Test 123 adn Pictures. And these are dynamically generated. option id=1254542 name=profile title=Nature PicuresNature Picures/option option id=5674845 name=profile title=Test 123Test 123/option option id=5245465 name=profile title=PicturesPictures/option Or is there any method or way to get the contents of the drop down? Thanks, Amit On Thu, May 12, 2011 at 2:05 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Thu, May 12, 2011 at 10:29 AM, Amit Bobade amit.sr...@gmail.com wrote: Now I want to select one of the values at random Random is another story. :) Getting a random number is Ruby feature, does not have anything to do with Watir, for example: http://stackoverflow.com/questions/198460/how-to-get-a-random-number-in-ruby When you have a random number then you can select a value. Ž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 -- 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
Re: [wtr-general] How to select the value of the drop down dyanamically
Thanks for your help mate. :) On Thu, May 12, 2011 at 2:18 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Thu, May 12, 2011 at 10:43 AM, Amit Bobade amit.sr...@gmail.com wrote: Or is there any method or way to get the contents of the drop down? Sure. browser.select_list(how, what).getAllContents http://rdoc.info/gems/watir/1.8.1/Watir/SelectList#getAllContents-instance_method Ž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 -- 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
Re: [wtr-general] Opening new browser window from existing one
Hi Vishavdeep, I got my problem solved.yes my app does not have the code to open in new window. Actually i totaly misunderstood the attach method. Now got the concept and problem is solved Thanks a lot for notifying me. On Wed, Dec 1, 2010 at 1:20 PM, Sharma Vishav sharma.vis...@gmail.comwrote: Hi Amit, does your application code has code to open a new window when you click on the link. e.g. use target attribute of href tag. When you click link manually do you get a new window opened ? why do you want to open a new window from your watir script ? cheers Vishavdeep On Tue, Nov 30, 2010 at 5:13 AM, Amit Kulkarni amitkkulkarni...@gmail.com wrote: Hello all, Can we open a new browser window from the existing one using Firewatir for Linux and for Watir for windows: Following are my gem versions: firewatir (1.6.7, 1.6.5) Following is my code: require 'rubygems' require 'firewatir' Watir::Browser.default = 'firefox' Browser = Watir::Browser.new Browser.goto(http://localhost:3000/users;) sleep 5 *Browser.attach(:title, '/test123/')* #Browser.link(:href, /users/new).click Browser.text_field(:name, user[name]).set(amit) Browser.text_field(:name, user[description]).set(Qa Engineer) Browser.select_list(:name, user[role]).select(Hr) Browser.radio(:id, user_category_hr).set Browser.button(:value, Create).click Browser.link(:href, /users).click The line which is bold is what i am doing for opening the link in new window.Actually this is a link which you can see in the next line which is commented. Now if i click on the link then it opens in the same window.What i want is when i click on the link it should open in new window. I have added the *title property* for the link as well In the Firefox-Edit-Preferences-tab i have unchecked the tab Open new windows in new tab instead But when i run the script it error is displayed as /usr/lib/ruby/gems/1.8/gems/firewatir-1.6.7/lib/firewatir/firefox.rb:272:in `attach': Unable to locate window, using title and /test123/(Watir::Exception::NoMatchingWindowFoundException) from user_create.rb:9 When i inspect the link following code is displayed a title=test123 href=/users/newNew user/a -- 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.comwatir-general%2bunsubscr...@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.comwatir-general%2bunsubscr...@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
Re: [wtr-general] Opening new browser window from existing one
Hi, This is my code: require 'rubygems' require 'firewatir' Watir::Browser.default = 'firefox' Browser = Watir::Browser.new Browser.goto(http://localhost:3000/users;) This goes to the application B = Browser.title.each { |d| puts d.to_s } here i am checking if that page(above) contains any title.The ans is true and i am getting Users: a = Browser.link(:title, Users:).exist? puts a sleep 5 Browser.attach(:title, '/Users:/') On this i get an error i.e. `attach': Unable to locate window, using title and /Users:/ (Watir::Exception::NoMatchingWindowFoundException) Now if i try Browser.attach(:title, Users:) --- No error is displayed and link is not clicked. -- Now the title on clicking the link is Users: which is same which i have mentioned I hope now the confusion is clear :) Please let me know if you require any more info. 2010/11/30 Željko Filipin zeljko.fili...@wa-research.ch On Tue, Nov 30, 2010 at 7:24 AM, Amit Kulkarni amitkkulkarni...@gmail.com wrote: titleUsers: new/title titleUsers: index/title on the top Browser.attach(:title, '/Users: new/') I am now completely confused what is the title of the page that you want to attach to. One of these could work: Browser.attach(:title = Users: new/) Browser.attach(:title = Users: index/) Browser.attach(:title = /Users: new/) Browser.attach(:title = /Users: index/) Browser.attach(:title = /Users/) More information: http://wiki.openqa.org/display/WTR/New+Browser+Windows Ž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.comwatir-general%2bunsubscr...@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
Re: [wtr-general] Re: Opening new browser window from existing one
Hi Chandu, I checked the attach code i have written is when the application is opened.And if i try Browser.attach(:title, '/Users: new/') then it gives me error. On Tue, Nov 30, 2010 at 7:00 PM, chandu.tennety chandu.tenn...@gmail.comwrote: From the original post, it looked like you were trying to attach the new window *before* clicking on the link that would open the window. Try clicking on the link first, then attach to the new window: Browser.link(:href, /users/new).click# = new window opens Browser.attach(:title, '/Users: new/') # = attach to the new window Chandu On Nov 30, 4:08 am, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Tue, Nov 30, 2010 at 7:24 AM, Amit Kulkarni amitkkulkarni...@gmail.com wrote: titleUsers: new/title titleUsers: index/title on the top Browser.attach(:title, '/Users: new/') I am now completely confused what is the title of the page that you want to attach to. One of these could work: Browser.attach(:title = Users: new/) Browser.attach(:title = Users: index/) Browser.attach(:title = /Users: new/) Browser.attach(:title = /Users: index/) Browser.attach(:title = /Users/) More information: http://wiki.openqa.org/display/WTR/New+Browser+Windows Ž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.comhttp://groups.google.com/group/watir-general%0awatir-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] Opening new browser window from existing one
Hello all, Can we open a new browser window from the existing one using Firewatir for Linux and for Watir for windows: Following are my gem versions: firewatir (1.6.7, 1.6.5) Following is my code: require 'rubygems' require 'firewatir' Watir::Browser.default = 'firefox' Browser = Watir::Browser.new Browser.goto(http://localhost:3000/users;) sleep 5 *Browser.attach(:title, '/test123/')* #Browser.link(:href, /users/new).click Browser.text_field(:name, user[name]).set(amit) Browser.text_field(:name, user[description]).set(Qa Engineer) Browser.select_list(:name, user[role]).select(Hr) Browser.radio(:id, user_category_hr).set Browser.button(:value, Create).click Browser.link(:href, /users).click The line which is bold is what i am doing for opening the link in new window.Actually this is a link which you can see in the next line which is commented. Now if i click on the link then it opens in the same window.What i want is when i click on the link it should open in new window. I have added the *title property* for the link as well In the Firefox-Edit-Preferences-tab i have unchecked the tab Open new windows in new tab instead But when i run the script it error is displayed as /usr/lib/ruby/gems/1.8/gems/firewatir-1.6.7/lib/firewatir/firefox.rb:272:in `attach': Unable to locate window, using title and /test123/(Watir::Exception::NoMatchingWindowFoundException) from user_create.rb:9 When i inspect the link following code is displayed a title=test123 href=/users/newNew user/a -- 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
Re: [wtr-general] Opening new browser window from existing one
Hi, Thanks for the reply. I checked page code and this is what is inside the title tag a href=/users/new view-source:http://localhost:3000/users/new title=test123New user/a This is also what i have written in the code. On Mon, Nov 29, 2010 at 9:49 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Mon, Nov 29, 2010 at 5:13 PM, Amit Kulkarni amitkkulkarni...@gmail.com wrote: Browser.attach(:title, '/test123/') a title=test123 href=/users/newNew user/a If a link has title test123, it does not mean that the page that it leads to will have the same title. Inspect the page code and take a look what is inside title tag. Ž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.comwatir-general%2bunsubscr...@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
Re: [wtr-general] Opening new browser window from existing one
Hi, The page which is going to open has the following in the title tag. titleUsers: new/title I changed the title tag which is currently present on the page from where i am going to click. So following is displayed under title tag: titleUsers: index/title on the top AND a href=/users/new view-source:http://localhost:3000/users/new title=Users: newNew user/a --- This is the link which i am going to click.. So in the code i have changed which looks like as follows : *Browser.attach(:title, '/Users: new/')* Even changing the code i am getting the same error. On Mon, Nov 29, 2010 at 10:19 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: This line does not care what is on the current page: Browser.attach(:title, '/test123/') it cares what is on the page that will be opened. So, open the page that will open after clicking the link manually, and take a look what it inside it's title tag (in header). Ž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.comwatir-general%2bunsubscr...@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
Re: [wtr-general] Opening new browser window from existing one
Hi, Currently i am using FireWatir on Linux.So i am just thinking is there any problem in the code running on Linux and running it on windows. On Tue, Nov 30, 2010 at 11:54 AM, Amit Kulkarni amitkkulkarni...@gmail.comwrote: Hi, The page which is going to open has the following in the title tag. titleUsers: new/title I changed the title tag which is currently present on the page from where i am going to click. So following is displayed under title tag: titleUsers: index/title on the top AND a href=/users/new title=Users: newNew user/a --- This is the link which i am going to click.. So in the code i have changed which looks like as follows : *Browser.attach(:title, '/Users: new/')* Even changing the code i am getting the same error. On Mon, Nov 29, 2010 at 10:19 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: This line does not care what is on the current page: Browser.attach(:title, '/test123/') it cares what is on the page that will be opened. So, open the page that will open after clicking the link manually, and take a look what it inside it's title tag (in header). Ž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.comwatir-general%2bunsubscr...@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
Re: [wtr-general] Re: Javascript pop uo using firewatir
Hello, Is there any difference running watir popup scripts for Firewatir and in Watir. This is because i am using Firewatir for ubuntu machine.I am getting an error undefined method `enabled_popup' for nil:NilClass (NoMethodError) Below is my code : require 'rubygems' require 'firewatir' #require 'watir/contrib/enabled_popup' Watir::Browser.default = 'firefox' Browser = Watir::Browser.new Browser.goto(http://localhost:3002/users;) Browser.link(:id, del_2).click_no_wait #popup_clicker(OK, 3) #Browser.button(:id, /someText/).click_no_wait hwnd = $b.enabled_popup(50) if (hwnd) #yeah! a popup popup = WinClicker.new popup.makeWindowActive(hwnd) if browsername == firefox popup.clickWindowsButton(FireFox, OK, 30) else popup.clickWindowsButton(The site at http://www.makemytrip.co.in says: , OK, 30) end end Now if i uncomment the 3rd line i.e. require 'watir/contrib/enabled_popup' then it shows me an error gem_original_require': no such file to load -- firewatir/contrib/enabled_popup (MissingSourceFile) My firewatir versions are firewatir (1.6.7, 1.6.5) 2010/11/25 Jari Bakken jari.bak...@gmail.com With watir-webdriver, instead of calling execute_script yourself you can use the helpers provided by the optional require: https://github.com/jarib/watir-webdriver/blob/master/lib/watir-webdriver/extensions/alerts.rb https://github.com/jarib/watir-webdriver/blob/master/lib/watir-webdriver/extensions/alerts.rb 2010/11/24 Alister Scott alister.sc...@gmail.com I'd try Watir-Webdriver and see if the execute_script code works. Browser.execute_script( window.confirm = function() {return true}) Cheers 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* 2010/11/24 Amit Kulkarni amitkkulkarni...@gmail.com Hi, I tried the code but it gives me error as gem_original_require': no such file to load -- win32ole (MissingSourceFile) I am working on Ubuntu machine so could not install the windows gem. How to solve this? 2010/11/23 Rajiv Nanduani rajivkumarnandv...@gmail.com try this $autoit = WIN32OLE.new(AutoItX3.Control) sleep(5) if @browserType == firefox Thread.start do @browser.link(:href, /page/).click end sleep(5) elsif @browserType == ie Thread.start do @browser.link(:href, /page/).focus end sleep(5) $autoit.Send({ENTER}) else @@log.error(@browserType + is NOT a valid Browser Type!!!) raise Exception.new(@browserType + is NOT a valid Browser Type!) end sleep(5) $autoit.Send({ENTER}) sleep(5) On Mon, Nov 22, 2010 at 8:46 AM, Prajakta Jadhav jadhav.praja...@gmail.com wrote: Why does Browser.link(:href,/users/1).click have double quotes ( ) around :href? That is not required and I am not sure if that will work either. This is the syntax: a href=page.htm ie.link(:href, /page/).click Try removing those double quotes. Hope it works. 2010/11/22 Amit Kulkarni amitkkulkarni...@gmail.com Thanks a lot for the link. But i tried every option but no success. If you see carefully it uses a Ajax call. require 'rubygems' require 'firewatir' Watir::Browser.default = 'firefox' Browser = Watir::Browser.new Browser.goto(http://localhost:3000/users;) Browser.link(:href,/users/1).click --error referring to this line #Browser.execute_script(window.confirm = function() {return true}) def check_for_popups autoit = WIN32OLE.new('AutoItX3.Control') # # Do forever - assumes popups could occur anywhere/anytime in your application. loop do # Look for window with given title. Give up after 1 second. ret = autoit.WinWait('Destroy', '', 1) # # If window found, send appropriate keystroke (e.g. {enter}, {Y}, {N}). if (ret==1) then autoit.Send('{enter}') end # # Take a rest to avoid chewing up cycles and give another thread a go. # Then resume the loop. sleep(3) end end $popup = Thread.new { check_for_popups } # start popup handler at_exit { Thread.kill($popup) } After running i get the following error js_eval': missing ; before statement (JsshSocket::JSSyntaxError) from /var/lib/gems/1.8/gems/firewatir-1.6.7/lib/firewatir/jssh_socket.rb:27:in `js_eval_method' from /var/lib/gems/1.8/gems/firewatir-1.6.7/lib/firewatir/element.rb:936:in `enabled?' from
Re: [wtr-general] Re: Javascript pop uo using firewatir
Hi, I tried the code using without the codes but it is showing an error. syntax error, unexpected tINTEGER, expecting ')' Browser.link(:href, /users/1).click But if i put the codes then error is not displayed but the link is getting clicked. On Mon, Nov 22, 2010 at 7:16 PM, Prajakta Jadhav jadhav.praja...@gmail.comwrote: Why does Browser.link(:href,/users/1).click have double quotes ( ) around :href? That is not required and I am not sure if that will work either. This is the syntax: a href=page.htm ie.link(:href, /page/).click Try removing those double quotes. Hope it works. 2010/11/22 Amit Kulkarni amitkkulkarni...@gmail.com Thanks a lot for the link. But i tried every option but no success. If you see carefully it uses a Ajax call. require 'rubygems' require 'firewatir' Watir::Browser.default = 'firefox' Browser = Watir::Browser.new Browser.goto(http://localhost:3000/users;) Browser.link(:href,/users/1).click --error referring to this line #Browser.execute_script(window.confirm = function() {return true}) def check_for_popups autoit = WIN32OLE.new('AutoItX3.Control') # # Do forever - assumes popups could occur anywhere/anytime in your application. loop do # Look for window with given title. Give up after 1 second. ret = autoit.WinWait('Destroy', '', 1) # # If window found, send appropriate keystroke (e.g. {enter}, {Y}, {N}). if (ret==1) then autoit.Send('{enter}') end # # Take a rest to avoid chewing up cycles and give another thread a go. # Then resume the loop. sleep(3) end end $popup = Thread.new { check_for_popups } # start popup handler at_exit { Thread.kill($popup) } After running i get the following error js_eval': missing ; before statement (JsshSocket::JSSyntaxError) from /var/lib/gems/1.8/gems/firewatir-1.6.7/lib/firewatir/jssh_socket.rb:27:in `js_eval_method' from /var/lib/gems/1.8/gems/firewatir-1.6.7/lib/firewatir/element.rb:936:in `enabled?' from /var/lib/gems/1.8/gems/firewatir-1.6.7/lib/firewatir/element.rb:922:in `assert_enabled' from /var/lib/gems/1.8/gems/firewatir-1.6.7/lib/firewatir/element.rb:1072:in `click' from user_destroy.rb:6 On Thu, Nov 18, 2010 at 2:36 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Thu, Nov 18, 2010 at 8:21 AM, Amit Kulkarni amitkkulkarni...@gmail.com wrote: On delete action popup is there which onclick it shows a pop up box along with two buttons i.e. Ok and Cancel Maybe something from here could help you: http://wiki.openqa.org/display/WTR/Pop+Ups http://wiki.openqa.org/display/WTR/JavaScript+Pop+Ups Ž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.comwatir-general%2bunsubscr...@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.comwatir-general%2bunsubscr...@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.comwatir-general%2bunsubscr...@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
Re: [wtr-general] Re: Javascript pop uo using firewatir
Hi, I tried the code but it gives me error as gem_original_require': no such file to load -- win32ole (MissingSourceFile) I am working on Ubuntu machine so could not install the windows gem. How to solve this? 2010/11/23 Rajiv Nanduani rajivkumarnandv...@gmail.com try this $autoit = WIN32OLE.new(AutoItX3.Control) sleep(5) if @browserType == firefox Thread.start do @browser.link(:href, /page/).click end sleep(5) elsif @browserType == ie Thread.start do @browser.link(:href, /page/).focus end sleep(5) $autoit.Send({ENTER}) else @@log.error(@browserType + is NOT a valid Browser Type!!!) raise Exception.new(@browserType + is NOT a valid Browser Type!) end sleep(5) $autoit.Send({ENTER}) sleep(5) On Mon, Nov 22, 2010 at 8:46 AM, Prajakta Jadhav jadhav.praja...@gmail.com wrote: Why does Browser.link(:href,/users/1).click have double quotes ( ) around :href? That is not required and I am not sure if that will work either. This is the syntax: a href=page.htm ie.link(:href, /page/).click Try removing those double quotes. Hope it works. 2010/11/22 Amit Kulkarni amitkkulkarni...@gmail.com Thanks a lot for the link. But i tried every option but no success. If you see carefully it uses a Ajax call. require 'rubygems' require 'firewatir' Watir::Browser.default = 'firefox' Browser = Watir::Browser.new Browser.goto(http://localhost:3000/users;) Browser.link(:href,/users/1).click --error referring to this line #Browser.execute_script(window.confirm = function() {return true}) def check_for_popups autoit = WIN32OLE.new('AutoItX3.Control') # # Do forever - assumes popups could occur anywhere/anytime in your application. loop do # Look for window with given title. Give up after 1 second. ret = autoit.WinWait('Destroy', '', 1) # # If window found, send appropriate keystroke (e.g. {enter}, {Y}, {N}). if (ret==1) then autoit.Send('{enter}') end # # Take a rest to avoid chewing up cycles and give another thread a go. # Then resume the loop. sleep(3) end end $popup = Thread.new { check_for_popups } # start popup handler at_exit { Thread.kill($popup) } After running i get the following error js_eval': missing ; before statement (JsshSocket::JSSyntaxError) from /var/lib/gems/1.8/gems/firewatir-1.6.7/lib/firewatir/jssh_socket.rb:27:in `js_eval_method' from /var/lib/gems/1.8/gems/firewatir-1.6.7/lib/firewatir/element.rb:936:in `enabled?' from /var/lib/gems/1.8/gems/firewatir-1.6.7/lib/firewatir/element.rb:922:in `assert_enabled' from /var/lib/gems/1.8/gems/firewatir-1.6.7/lib/firewatir/element.rb:1072:in `click' from user_destroy.rb:6 On Thu, Nov 18, 2010 at 2:36 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Thu, Nov 18, 2010 at 8:21 AM, Amit Kulkarni amitkkulkarni...@gmail.com wrote: On delete action popup is there which onclick it shows a pop up box along with two buttons i.e. Ok and Cancel Maybe something from here could help you: http://wiki.openqa.org/display/WTR/Pop+Ups http://wiki.openqa.org/display/WTR/JavaScript+Pop+Ups Ž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.comwatir-general%2bunsubscr...@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.comwatir-general%2bunsubscr...@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.comwatir-general%2bunsubscr...@googlegroups.com -- RAJIV KUMAR http://rajivkumarnandvani.wordpress.com/ http://learnqtphelp.blogspot.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.comwatir-general%2bunsubscr...@googlegroups.com -- Before posting, please read
Re: [wtr-general] Re: Javascript pop uo using firewatir
Thanks a lot for the link. But i tried every option but no success. If you see carefully it uses a Ajax call. require 'rubygems' require 'firewatir' Watir::Browser.default = 'firefox' Browser = Watir::Browser.new Browser.goto(http://localhost:3000/users;) Browser.link(:href,/users/1).click --error referring to this line #Browser.execute_script(window.confirm = function() {return true}) def check_for_popups autoit = WIN32OLE.new('AutoItX3.Control') # # Do forever - assumes popups could occur anywhere/anytime in your application. loop do # Look for window with given title. Give up after 1 second. ret = autoit.WinWait('Destroy', '', 1) # # If window found, send appropriate keystroke (e.g. {enter}, {Y}, {N}). if (ret==1) then autoit.Send('{enter}') end # # Take a rest to avoid chewing up cycles and give another thread a go. # Then resume the loop. sleep(3) end end $popup = Thread.new { check_for_popups } # start popup handler at_exit { Thread.kill($popup) } After running i get the following error js_eval': missing ; before statement (JsshSocket::JSSyntaxError) from /var/lib/gems/1.8/gems/firewatir-1.6.7/lib/firewatir/jssh_socket.rb:27:in `js_eval_method' from /var/lib/gems/1.8/gems/firewatir-1.6.7/lib/firewatir/element.rb:936:in `enabled?' from /var/lib/gems/1.8/gems/firewatir-1.6.7/lib/firewatir/element.rb:922:in `assert_enabled' from /var/lib/gems/1.8/gems/firewatir-1.6.7/lib/firewatir/element.rb:1072:in `click' from user_destroy.rb:6 On Thu, Nov 18, 2010 at 2:36 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Thu, Nov 18, 2010 at 8:21 AM, Amit Kulkarni amitkkulkarni...@gmail.com wrote: On delete action popup is there which onclick it shows a pop up box along with two buttons i.e. Ok and Cancel Maybe something from here could help you: http://wiki.openqa.org/display/WTR/Pop+Ups http://wiki.openqa.org/display/WTR/JavaScript+Pop+Ups Ž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.comwatir-general%2bunsubscr...@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] Javascript pop uo using firewatir
Hello all, I am having a application in which user can be created,updated and deleted. On delete action popup is there which onclick it shows a pop up box along with two buttons i.e. Ok and Cancel My scenario is: User should be able to click on Destroy link and then click on OK in the pop up box But after inspecting the Destroy link following code is getting displayed a onclick=if (confirm('Are you sure?')) { var f = document.createElement('form'); f.style.display = 'none'; this.parentNode.appendChild(f); f.method = 'POST'; f.action = this.href;var m = document.createElement('input'); m.setAttribute('type', 'hidden'); m.setAttribute('name', '_method'); m.setAttribute('value', 'delete'); f.appendChild(m);var s = document.createElement('input'); s.setAttribute('type', 'hidden'); s.setAttribute('name', 'authenticity_token'); s.setAttribute('value', 'TUrgfZQeTtveBgV82E0NTafS1xf4f6g3scwZxeFvX5o='); f.appendChild(s);f.submit(); };return false; href=/users/5Destroy/a Following is the code i am trying but not getting success: require 'rubygems' require 'firewatir' Watir::Browser.default = 'firefox' Browser = Watir::Browser.new Browser.goto(http://localhost:3000/users;) Browser.link(:href,/users/5).click -- *This step should click the Destroy link but it is not.* Browser.execute_script(window.confirm = function() {return true}) #Browser.execute_script window.confirm = function() { return true; } Browser.button(:value = 'OK').click Does anybody knows how to overcome this problem? -- 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] Ruby.exe get crashed after running 15-20 test cases.
Hi Guys I'm running, my scripts on FireWatir. But after running 15-20 scripts in one shot it get crashed. I tried to capture error by using rescue = e. But its not showing any error. I executed that script again for which it got crashed. That scripts ran successfully. My Browser is FF 3.5 Firewatir version is 1.6.5 I'm not able to run my whole suite as it has around 150 scripts. After running every 15-20 scripts my ruby.exe get crashed. Note: My suite run smoothly on IE (WATIR) Any reason or solution of this behavior? Thank You -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] Firewatir attach method doesn't work properly
Hi Ethan, I used VAPIR 1.7.1 for attaching two browsers. Now i'm able to work on two instance on browser simultaneously. Thank you very much.. Btw .. did you fixed that problem recently? Thank You On Mon, Aug 16, 2010 at 11:19 AM, Ethan notet...@gmail.com wrote: Vapir is currently broken on 3.0.*. A fix is coming, but I have a number of other higher-priority issues to fix first. You can upgrade to 3.5 or 3.6, or wait until I can get 3.0 support working. On Thu, Aug 12, 2010 at 11:50, Amit amit.e...@gmail.com wrote: its 3.06 On Thu, Aug 12, 2010 at 8:56 PM, Ethan notet...@gmail.com wrote: What version of firefox are you using? On Thu, Aug 12, 2010 at 06:17, Amit amit.e...@gmail.com wrote: Hi Ethan, I tried below code: require 'watir-vapir' ff = Vapir::Firefox.new ff.start(www.google.com) After executing above code, A new instance of firefox opened and got following error. Could you please tell me why i'm getting this error? C:/Ruby/lib/ruby/gems/1.8/gems/vapir-firefox-1.7.0/lib/vapir-firefox/jssh_socket.rb:118:in `initialize': Something went wrong loading Prototype - message SyntaxError: unterminated comment\n SyntaxError: return not in function\n TypeError: this.getUTCMonth is not a function\n SyntaxError: syntax error\n SyntaxError: return not in function\n SyntaxError: syntax error\n SyntaxError: syntax error\n \n SyntaxError: syntax error\n \n SyntaxError: syntax error\n \n SyntaxError: syntax error\n \n function () {\nif (!this.currentlyExecuting) {\ntry {\n this.currentlyExecuting = true;\nthis.execute();\n} catch (e) {\n} finally {\nthis.currentlyExecuting = false;\n}\n}\n}\n SyntaxError: syntax error\n SyntaxError: syntax error\n SyntaxError: invalid label\n SyntaxError: invalid label\n SyntaxError: invalid label\n SyntaxError: invalid label\n SyntaxError: invalid label\n SyntaxError: invalid label\n SyntaxError: syntax error\n SyntaxError: syntax error\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n SyntaxError: unterminated comment\n ReferenceError: document is not defined\n TypeError: this.replace is not a function\n SyntaxError: return not in function\n SyntaxError: invalid label\n SyntaxError: missing ; before statement\n SyntaxError: syntax error\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n SyntaxError: unterminated comment\n SyntaxError: return not in function\n SyntaxError: syntax error\n \n \n \n \n \n ReferenceError: reference to undefined XML name *::*\n \n \n \n \n \n \n \n \n \n \n \n SyntaxError: return not in function\n SyntaxError: invalid label\n SyntaxError: invalid label\n SyntaxError: invalid label\n SyntaxError: invalid label\n SyntaxError: invalid label\n \n SyntaxError: invalid label\n SyntaxError: invalid label\n SyntaxError: invalid label\n SyntaxError: invalid label\n SyntaxError: invalid label\n \n \n \n \n SyntaxError: invalid label\n SyntaxError: invalid label\n SyntaxError: invalid label\n SyntaxError: syntax error\n SyntaxError: syntax error\n SyntaxError: return not in function\n SyntaxError: syntax error\n SyntaxError: return not in function\n SyntaxError: syntax error\n SyntaxError: syntax error\n \n function (object) {\nif (object Object.isFunction(object.toTemplateReplacements)) {\nobject = object.toTemplateReplacements();\n}\nreturn this.template.gsub(this.pattern, function (match) {if (object == null) {return match[1] + \\;}var before = match[1] || \\;if (before == \\) {return match[2];}var ctx = object, expr = match[3];var pattern = /^([^.[]+|\\[((?:.*?[^])?)\\])(\\.|\\[|$)/;match = pattern.exec(expr);if (match == null) {return before;}while (match != null) {var comp = match[1].startsWith(\[\) ? match[2].gsub(\]\, \]\) : match[1];ctx = ctx[comp];if (null == ctx || \\ == match[3]) {break;}expr = expr.substring(\[\ == match[3] ? match[1].length : match[0].length);match = pattern.exec(expr);}return before + String.interpret(ctx);});\n}\n SyntaxError: syntax error\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n SyntaxError: return not in function\n SyntaxError: invalid label\n SyntaxError: invalid label\n SyntaxError: invalid label\n SyntaxError: invalid label\n SyntaxError: invalid label\n SyntaxError: invalid label\n SyntaxError: invalid label\n SyntaxError: invalid label\n SyntaxError: invalid label\n SyntaxError: invalid label\n SyntaxError: invalid label\n SyntaxError: invalid label\n SyntaxError: invalid label\n SyntaxError: invalid label\n SyntaxError: invalid label\n SyntaxError: syntax error\n SyntaxError: syntax error\n SyntaxError: return not in function\n SyntaxError: return not in function\n ReferenceError: iterable is not defined\n \n SyntaxError: return not in function\n SyntaxError: syntax error\n SyntaxError
Re: [wtr-general] Where does watir stores object properties
Does firewatir saves things in broswer_var ?? Can't we use multiple objects so we don't lose refrence of previous window? 2010/8/12 Ethan notet...@gmail.com Firewatir saves things in javascript variables, and reuses the same variables, so when you attach to a new window, it reuses the same variables as it does for the old window and you lose references to that window. On Thu, Aug 12, 2010 at 10:36, Amit amit.e...@gmail.com wrote: Hi Željko, Actually, i was checking behavior of attach function in firewatir. Currently, In firewatir, if we attach 2 windows then it loose control over first one. So, thats why i wanted to know wether it saves object properties or not... and if yes then where.. Thank You Amit On 8/12/10, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Thu, Aug 12, 2010 at 2:42 PM, Amit amit.e...@gmail.com wrote: I want to know where WATIR is storing this information so it can access objects for both window. Why do you need that information? To be precise, Watir is not storing it, but Ruby is (as far as I understand it). The most general answer would be in RAM. :) Željko -- watir.com - community manager watirpodcast.com - host testingpodcast.com - audio podcasts on software testing. all of them vidipodkast.com - pričamo o hardveru, softveru i časopisu Vidi -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com
[wtr-general] Where does watir stores object properties
Hi! I want to know where does WATIR stores object properties. For example, if i attach two windows ie1 = Watir.IE.attach(:title,/sometext/) ie2 = Watir.IE.attach(:title,/sometext/) Now, we can do some action on both ie1 ie2. I want to know where WATIR is storing this information so it can access objects for both window. Thank You Amit -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] Where does watir stores object properties
Hi Željko, Actually, i was checking behavior of attach function in firewatir. Currently, In firewatir, if we attach 2 windows then it loose control over first one. So, thats why i wanted to know wether it saves object properties or not... and if yes then where.. Thank You Amit On 8/12/10, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Thu, Aug 12, 2010 at 2:42 PM, Amit amit.e...@gmail.com wrote: I want to know where WATIR is storing this information so it can access objects for both window. Why do you need that information? To be precise, Watir is not storing it, but Ruby is (as far as I understand it). The most general answer would be in RAM. :) Željko -- watir.com - community manager watirpodcast.com - host testingpodcast.com - audio podcasts on software testing. all of them vidipodkast.com - pričamo o hardveru, softveru i časopisu Vidi -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] Firewatir attach method doesn't work properly
its 3.06 On Thu, Aug 12, 2010 at 8:56 PM, Ethan notet...@gmail.com wrote: What version of firefox are you using? On Thu, Aug 12, 2010 at 06:17, Amit amit.e...@gmail.com wrote: Hi Ethan, I tried below code: require 'watir-vapir' ff = Vapir::Firefox.new ff.start(www.google.com) After executing above code, A new instance of firefox opened and got following error. Could you please tell me why i'm getting this error? C:/Ruby/lib/ruby/gems/1.8/gems/vapir-firefox-1.7.0/lib/vapir-firefox/jssh_socket.rb:118:in `initialize': Something went wrong loading Prototype - message SyntaxError: unterminated comment\n SyntaxError: return not in function\n TypeError: this.getUTCMonth is not a function\n SyntaxError: syntax error\n SyntaxError: return not in function\n SyntaxError: syntax error\n SyntaxError: syntax error\n \n SyntaxError: syntax error\n \n SyntaxError: syntax error\n \n SyntaxError: syntax error\n \n function () {\nif (!this.currentlyExecuting) {\ntry {\n this.currentlyExecuting = true;\nthis.execute();\n} catch (e) {\n} finally {\nthis.currentlyExecuting = false;\n}\n}\n}\n SyntaxError: syntax error\n SyntaxError: syntax error\n SyntaxError: invalid label\n SyntaxError: invalid label\n SyntaxError: invalid label\n SyntaxError: invalid label\n SyntaxError: invalid label\n SyntaxError: invalid label\n SyntaxError: syntax error\n SyntaxError: syntax error\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n SyntaxError: unterminated comment\n ReferenceError: document is not defined\n TypeError: this.replace is not a function\n SyntaxError: return not in function\n SyntaxError: invalid label\n SyntaxError: missing ; before statement\n SyntaxError: syntax error\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n SyntaxError: unterminated comment\n SyntaxError: return not in function\n SyntaxError: syntax error\n \n \n \n \n \n ReferenceError: reference to undefined XML name *::*\n \n \n \n \n \n \n \n \n \n \n \n SyntaxError: return not in function\n SyntaxError: invalid label\n SyntaxError: invalid label\n SyntaxError: invalid label\n SyntaxError: invalid label\n SyntaxError: invalid label\n \n SyntaxError: invalid label\n SyntaxError: invalid label\n SyntaxError: invalid label\n SyntaxError: invalid label\n SyntaxError: invalid label\n \n \n \n \n SyntaxError: invalid label\n SyntaxError: invalid label\n SyntaxError: invalid label\n SyntaxError: syntax error\n SyntaxError: syntax error\n SyntaxError: return not in function\n SyntaxError: syntax error\n SyntaxError: return not in function\n SyntaxError: syntax error\n SyntaxError: syntax error\n \n function (object) {\nif (object Object.isFunction(object.toTemplateReplacements)) {\nobject = object.toTemplateReplacements();\n}\nreturn this.template.gsub(this.pattern, function (match) {if (object == null) {return match[1] + \\;}var before = match[1] || \\;if (before == \\) {return match[2];}var ctx = object, expr = match[3];var pattern = /^([^.[]+|\\[((?:.*?[^])?)\\])(\\.|\\[|$)/;match = pattern.exec(expr);if (match == null) {return before;}while (match != null) {var comp = match[1].startsWith(\[\) ? match[2].gsub(\]\, \]\) : match[1];ctx = ctx[comp];if (null == ctx || \\ == match[3]) {break;}expr = expr.substring(\[\ == match[3] ? match[1].length : match[0].length);match = pattern.exec(expr);}return before + String.interpret(ctx);});\n}\n SyntaxError: syntax error\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n SyntaxError: return not in function\n SyntaxError: invalid label\n SyntaxError: invalid label\n SyntaxError: invalid label\n SyntaxError: invalid label\n SyntaxError: invalid label\n SyntaxError: invalid label\n SyntaxError: invalid label\n SyntaxError: invalid label\n SyntaxError: invalid label\n SyntaxError: invalid label\n SyntaxError: invalid label\n SyntaxError: invalid label\n SyntaxError: invalid label\n SyntaxError: invalid label\n SyntaxError: invalid label\n SyntaxError: syntax error\n SyntaxError: syntax error\n SyntaxError: return not in function\n SyntaxError: return not in function\n ReferenceError: iterable is not defined\n \n SyntaxError: return not in function\n SyntaxError: syntax error\n SyntaxError: return not in function\n ReferenceError: string is not defined\n SyntaxError: return not in function\n SyntaxError: syntax error\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n SyntaxError: unterminated comment\n \n \n SyntaxError: return not in function\n SyntaxError: syntax error\n \n \n \n \n \n \n \n ReferenceError: Enumerable is not defined\n \n function reverse() {\n[native code]\n}\n \n TypeError: Object.extend is not a function\n \n \n \n \n \n \n \n SyntaxError: syntax error\n SyntaxError
Re: [wtr-general] Re: Watir Support for li tag
Hi Cyril, You can use xpath also.. it'll definitely work val1 = browser.element_by_xpath(//d...@id='ires']/l...@class='g']).text Thank you Amit On Wed, Aug 11, 2010 at 3:42 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Wed, Aug 11, 2010 at 12:07 PM, cyril.gonsal...@mastek.com cyril.gonsal...@mastek.com wrote: i get 1.4.1 are the versions of the s/w i am using are up to date? No, you have old version. Watir version should be 1.6.5. You should uninstall Watir 1.4.1 (if I remember correctly there was installer then) and install the newest version. Maybe the simplest solution is to uninstall Ruby, and then install it again (with new watir). http://watir.com/installation/ Željko -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] Firewatir attach method doesn't work properly
Hi Ethan, Can you please explain how can i integrate Vapir in my Watir framework? I just want to use attach method from vapir. Can you show me sample command for attaching a window in Vapir? Thank you On Tue, Aug 3, 2010 at 5:13 AM, Ethan notet...@gmail.com wrote: Vapir should be almost entirely compatible with Watir, so a framework written for Watir should not require much change, if any, to work with Vapir. see http://wiki.github.com/vapir/vapir/coming-from-watir and http://wiki.github.com/vapir/vapir/differences-from-watir-api On Wed, Jul 28, 2010 at 02:06, Amit Kumar amit.e...@gmail.com wrote: Hi Ethan, My whole framework has been written in Watir.. So, at this point i can't use Vapir. Guys, is there any other solution to attach multiple browser at a time? Thank You On Mon, Jul 26, 2010 at 10:58 PM, Ethan notet...@gmail.com wrote: I'd recommend Vapir-Firefox, which is a fork of FireWatir which I have updated and improved a lot. See the site for Vapir at http://vapir.org/ -Ethan On Mon, Jul 26, 2010 at 07:07, Amit Kumar amit.e...@gmail.com wrote: Hi All! I'm using Firewatir 1.6.5 I want to test an web application which open a pop up window. I want to attach this pop up window with firewatir. So, i have written below code: require 'firewatir' ff =FireWatir::Firefox.new ff.goto(www.example.com) ff.link(:text,Pop_up).click ff2= FireWatir::Firefox.attach(:title,New Pop Up Window) Now, the problem is... After attaching new pop up window, firewatir loose control over parent window. It remember only pop up window which have attached recently and forget parent window. So, i can't access parent application anymore. eg: puts ff.title == New Pop Up Window puts ff2.title == New Pop Up Window It doesn't return window title of parent window. Any comments or solution?? Thank You -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] Watir script editor
Hi Madhu, For example, you have written abc.rb saved it on Desktop. Try below code for above scenario: require 'watir' require 'C:\\Documents and Settings\\user\\Desktop\\abc.rb' or 'C:\\Documents and Settings\\user\\Desktop\\abc.rb' use double backslash (\\) in path. If this also gives error then provide your code error message Thank You Amit On Wed, Aug 11, 2010 at 2:01 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Wed, Aug 11, 2010 at 8:32 AM, madhu kumar madhu@gmail.com wrote: Please can anyone tell me how to run this watir script without storing in ruby bin directory. Please provide your code and error message. Željko -- watir.com - community manager watirpodcast.com - host testingpodcast.com - audio podcasts on software testing. all of them vidipodkast.com - pričamo o hardveru, softveru i časopisu Vidi -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] Firewatir attach method doesn't work properly
Hi Ethan, My whole framework has been written in Watir.. So, at this point i can't use Vapir. Guys, is there any other solution to attach multiple browser at a time? Thank You On Mon, Jul 26, 2010 at 10:58 PM, Ethan notet...@gmail.com wrote: I'd recommend Vapir-Firefox, which is a fork of FireWatir which I have updated and improved a lot. See the site for Vapir at http://vapir.org/ -Ethan On Mon, Jul 26, 2010 at 07:07, Amit Kumar amit.e...@gmail.com wrote: Hi All! I'm using Firewatir 1.6.5 I want to test an web application which open a pop up window. I want to attach this pop up window with firewatir. So, i have written below code: require 'firewatir' ff =FireWatir::Firefox.new ff.goto(www.example.com) ff.link(:text,Pop_up).click ff2= FireWatir::Firefox.attach(:title,New Pop Up Window) Now, the problem is... After attaching new pop up window, firewatir loose control over parent window. It remember only pop up window which have attached recently and forget parent window. So, i can't access parent application anymore. eg: puts ff.title == New Pop Up Window puts ff2.title == New Pop Up Window It doesn't return window title of parent window. Any comments or solution?? Thank You -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com
[wtr-general] Firewatir attach method doesn't work properly
Hi All! I'm using Firewatir 1.6.5 I want to test an web application which open a pop up window. I want to attach this pop up window with firewatir. So, i have written below code: require 'firewatir' ff =FireWatir::Firefox.new ff.goto(www.example.com) ff.link(:text,Pop_up).click ff2= FireWatir::Firefox.attach(:title,New Pop Up Window) Now, the problem is... After attaching new pop up window, firewatir loose control over parent window. It remember only pop up window which have attached recently and forget parent window. So, i can't access parent application anymore. eg: puts ff.title == New Pop Up Window puts ff2.title == New Pop Up Window It doesn't return window title of parent window. Any comments or solution?? Thank You -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com
[wtr-general] Re: A stupid question ... how do I apply patches to Watir? :-(
could you please let me know how to apply the patch to watir? Amit On Apr 15, 1:16 am, Rats crapats...@yahoo.com.au wrote: On Apr 14, 4:30 pm, Michael Hwee michael_h...@yahoo.com wrote: Can you use click! Click! just launches the popup just like click by itself would do. So performance wise it is no different from click. -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com
[wtr-general] Re: Help required regarding link method
Thanks for the help. Following is the page source. body div class=main !-- main -- div class=header-container !-- header -- div class=header div class=actions welcome a href=/profile/nikeman alt=nikeman class=underline onclick=window.open(this.href);return false; title=nikemannikeman/a nbsp;nbsp;nbsp; /div /div /div !-- header close -- div class=content-container !-- content -- div class=content h2 class=titleNikes Active features/h2 div class=tab-layout li class=selectedspan class=Photogallery/span/li /ul div class=tab-content strong class=alert/strong form action=/Nikes/photo_gallery/attachments/delete_multiple method=post div class=dark-underlined-cont h3Photogallery/h3 /div div class=arrow-bar borded div input type=submit class=submit ar-normal title=Delete selected value=Delete selected onclick=if(!validate_delete('input')) { alert('Please select a photo'); return false;} / a href=/Nikes/photo_gallery/attachments/new?media=print class=ar-normal title=Add new photoAdd new photo/a/li /div /div div class=gallery *div style=width:150px;height:150px; input id=attachment[218] name=attachment[218] type=checkbox value=1 / img alt=Photogallerysanity1 src=http://s3.amazonaws.com/staging-brandpotion-prints/images/63/large_thumb.jpg; title=Photogallerysanity1 / * * a href=/Nikes/photo_gallery/attachments/218/edit?media=print class=underlineEdit/a * /div!-- just for hidden the margin of the last element -- /div /form !-- end form -- /div div class=clear/div !-- clearing content floats important! -- /div /div !-- content close -- /div !-- main close -- /body /html 2009/10/23 Wesley Chen cjq@gmail.com Your this question has taken so much time. I think you still have not described your question clearly enough. For the html code you provided, of course it is easy for us to help you to locate. Please give us the whole page source you failed to locate, and show the error message you got. Thanks. Wesley Chen. For life, the easier, the better. 2009/10/22 Amit Kulkarni amitkkulkarni...@gmail.com Hi Angrez, I tried with the link you provided but it shows below error Unable to locate element, using :xpath, //i...@title='Photogallerysanity']/ (Watir::Exception::UnknownObjectException) Same error appears when i use .click or .flash On Thu, Oct 22, 2009 at 5:14 PM, Angrez Singh ang...@gmail.com wrote: can you try this? Browser.link(:xpath,//i...@title='Photogallerysanity']/a).flash() or click() - Angrez On Thu, Oct 22, 2009 at 5:03 PM, Amit Kulkarni amitkkulkarni...@gmail.com wrote: I also tried to use using Xpath. i.e. Browser.link(:xpath,//a...@href='/Nikes/photo_gallery/attachments/218/edit?media=print']/).text # = Edit Still no success.Is there something wrong with the above code? On Thu, Oct 22, 2009 at 4:55 PM, Amit Kulkarni amitkkulkarni...@gmail.com wrote: Sorry again, Yes i read the tutorial. I tried some stunts but no success.So posted my queries here. On Thu, Oct 22, 2009 at 4:48 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Thu, Oct 22, 2009 at 12:47 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: Have you read the tutorial? http://wiki.openqa.org/display/WTR/Tutorial You did not answer this. Željko --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Help required regarding link method
Thanks Wesley, I will try it out and let you know. Thanks for thee help. :-) 2009/10/23 Wesley Chen cjq@gmail.com I tried all the methods below, they work: 1. $ie.link(:after?, $ie.image(:title, Photogallerysanity1)).click 2. $ie.link(:after?, $ie.image(:alt, Photogallerysanity1)).click 3. $ie.link(:after?, $ie.image(:src, /s3.amazonaws.com \/staging-brandpotion-prints/)).click 4. $ie.image(:alt, Photogallerysanity1).parent.link(:index, 1).click 5. $ie.image(:alt, Photogallerysanity1).parent.link(:text, Edit).click 6. $ie.image(:alt, Photogallerysanity1).parent.link(:class = underline, :index =1).click We don't need use Xpth here. Thanks. Wesley Chen. For life, the easier, the better. 2009/10/23 Amit Kulkarni amitkkulkarni...@gmail.com Thanks for the help. Following is the page source. body div class=main !-- main -- div class=header-container !-- header -- div class=header div class=actions welcome a href=/profile/nikeman alt=nikeman class=underline onclick=window.open(this.href);return false; title=nikemannikeman/a nbsp;nbsp;nbsp; /div /div /div !-- header close -- div class=content-container !-- content -- div class=content h2 class=titleNikes Active features/h2 div class=tab-layout li class=selectedspan class=Photogallery/span/li /ul div class=tab-content strong class=alert/strong form action=/Nikes/photo_gallery/attachments/delete_multiple method=post div class=dark-underlined-cont h3Photogallery/h3 /div div class=arrow-bar borded div input type=submit class=submit ar-normal title=Delete selected value=Delete selected onclick=if(!validate_delete('input')) { alert('Please select a photo'); return false;} / a href=/Nikes/photo_gallery/attachments/new?media=print class=ar-normal title=Add new photoAdd new photo/a/li /div /div div class=gallery * div style=width:150px;height:150px; input id=attachment[218] name=attachment[218] type=checkbox value=1 / img alt=Photogallerysanity1 src=http://s3.amazonaws.com/staging-brandpotion-prints/images/63/large_thumb.jpg; title=Photogallerysanity1 / * * a href=/Nikes/photo_gallery/attachments/218/edit?media=print class=underlineEdit/a * /div!-- just for hidden the margin of the last element -- /div /form !-- end form -- /div div class=clear/div !-- clearing content floats important! -- /div /div !-- content close -- /div !-- main close -- /body /html 2009/10/23 Wesley Chen cjq@gmail.com Your this question has taken so much time. I think you still have not described your question clearly enough. For the html code you provided, of course it is easy for us to help you to locate. Please give us the whole page source you failed to locate, and show the error message you got. Thanks. Wesley Chen. For life, the easier, the better. 2009/10/22 Amit Kulkarni amitkkulkarni...@gmail.com Hi Angrez, I tried with the link you provided but it shows below error Unable to locate element, using :xpath, //i...@title='Photogallerysanity']/ (Watir::Exception::UnknownObjectException) Same error appears when i use .click or .flash On Thu, Oct 22, 2009 at 5:14 PM, Angrez Singh ang...@gmail.com wrote: can you try this? Browser.link(:xpath,//i...@title='Photogallerysanity']/a).flash() or click() - Angrez On Thu, Oct 22, 2009 at 5:03 PM, Amit Kulkarni amitkkulkarni...@gmail.com wrote: I also tried to use using Xpath. i.e. Browser.link(:xpath,//a...@href='/Nikes/photo_gallery/attachments/218/edit?media=print']/).text # = Edit Still no success.Is there something wrong with the above code? On Thu, Oct 22, 2009 at 4:55 PM, Amit Kulkarni amitkkulkarni...@gmail.com wrote: Sorry again, Yes i read the tutorial. I tried some stunts but no success.So posted my queries here. On Thu, Oct 22, 2009 at 4:48 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Thu, Oct 22, 2009 at 12:47 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: Have you read the tutorial? http
[wtr-general] Re: Problem with radio button
Hi Super, I tried with using your code. It didnt give me any error but it did not click on the desired button. Also it did not print any value. Also tell me one thing For this we have to run scripts compulsary in I.E or is it ok to run in FireFox? On Thu, Oct 22, 2009 at 8:31 PM, Super Kevy kpe...@scholarshipamerica.orgwrote: Interesting... I'm assuming table matching is the ticket and dynamic variables being the pain... Try this snippet and modify to suit for page require 'watir' require 'watir/ie' require 'watir/dialog' require 'Win32API' ie = Watir::IE.new sURL='http://www.google.com' sURL='C:\Documents and Settings\kpetry\Desktop\t.html' ie.goto(sURL) ie.bring_to_front() myTable=ie.table(:index,1) # loop through the table by indexing the first variable if needed until a match pollText=myTable[1][1].text.upcase #Obvious Text matching here Then invoke this code stream theParse=myTable[1][3].attribute_value(InnerHTML) puts theParse iStart = theParse.rindex('id=')+3 iEnd = theParse.rindex('type=radio')-1 theId= theParse.slice!(iStart..iEnd).strip! puts iStart.to_s puts iEnd.to_s puts theId+'..' ie.radio(:id, theId ).flash ie.radio(:id, theId ).set On Oct 22, 8:31 am, Amit Kulkarni amitkkulkarni...@gmail.com wrote: Thanks a lot.But the name act2[165] is not going to be same all the time. I have my poll title as Test.So i want to set my focus on delete radio button whose title is Test. Is it possible to do this? This is my html script tr tdTest/td tdUnpublished/td td class=actions label for=Update input id=act2_165_update type=radio value=update name=act2 [165]/ Update /label label for=del2 input id=act2_165_delete type=radio value=delete name=act2 [165]/ Delete /label /td Now here tdTest/td is the title of the poll. So i want to click on delete radio button which has a title named Test :-) On Thu, Oct 22, 2009 at 6:51 PM, Super Kevy kpe...@scholarshipamerica.orgwrote: Try something like this where value=delete or update ie.radio(:name,'act2[165]',value).focus ie.radio(:name,'act2[165]'',value).set- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Problem with radio button
Hey all, What i have done is: I got all the elements by my_array = Browser.table(:class , 'admin-monochrome').to_a Under my_array i got the string Test. Now how should i click on Delete button? Please help? On Fri, Oct 23, 2009 at 1:55 PM, Amit Kulkarni amitkkulkarni...@gmail.comwrote: Hi Super, I tried with using your code. It didnt give me any error but it did not click on the desired button. Also it did not print any value. Also tell me one thing For this we have to run scripts compulsary in I.E or is it ok to run in FireFox? On Thu, Oct 22, 2009 at 8:31 PM, Super Kevy kpe...@scholarshipamerica.org wrote: Interesting... I'm assuming table matching is the ticket and dynamic variables being the pain... Try this snippet and modify to suit for page require 'watir' require 'watir/ie' require 'watir/dialog' require 'Win32API' ie = Watir::IE.new sURL='http://www.google.com' sURL='C:\Documents and Settings\kpetry\Desktop\t.html' ie.goto(sURL) ie.bring_to_front() myTable=ie.table(:index,1) # loop through the table by indexing the first variable if needed until a match pollText=myTable[1][1].text.upcase #Obvious Text matching here Then invoke this code stream theParse=myTable[1][3].attribute_value(InnerHTML) puts theParse iStart = theParse.rindex('id=')+3 iEnd = theParse.rindex('type=radio')-1 theId= theParse.slice!(iStart..iEnd).strip! puts iStart.to_s puts iEnd.to_s puts theId+'..' ie.radio(:id, theId ).flash ie.radio(:id, theId ).set On Oct 22, 8:31 am, Amit Kulkarni amitkkulkarni...@gmail.com wrote: Thanks a lot.But the name act2[165] is not going to be same all the time. I have my poll title as Test.So i want to set my focus on delete radio button whose title is Test. Is it possible to do this? This is my html script tr tdTest/td tdUnpublished/td td class=actions label for=Update input id=act2_165_update type=radio value=update name=act2 [165]/ Update /label label for=del2 input id=act2_165_delete type=radio value=delete name=act2 [165]/ Delete /label /td Now here tdTest/td is the title of the poll. So i want to click on delete radio button which has a title named Test :-) On Thu, Oct 22, 2009 at 6:51 PM, Super Kevy kpe...@scholarshipamerica.orgwrote: Try something like this where value=delete or update ie.radio(:name,'act2[165]',value).focus ie.radio(:name,'act2[165]'',value).set- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Problem with Checkbox
Any suggestions on the above issue? Please help On Wed, Oct 21, 2009 at 5:49 PM, Amit Kulkarni amitkkulkarni...@gmail.comwrote: No,it does not flash up anything. It also does not display any error and goes to next step On Wed, Oct 21, 2009 at 5:39 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: Does this flash what you want? Browser.span(:text, Ratingsanity1).flash Željko --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Problem with radio button
Help required on above issue :-) 2009/10/21 Amit Kulkarni amitkkulkarni...@gmail.com -- Forwarded message -- From: Amit Kulkarni amitkkulkarni...@gmail.com Date: Wed, Oct 21, 2009 at 4:40 PM Subject: Re: [wtr-general] Re: Problem with radio button To: watir-general@googlegroups.com No it does not flashed the radio button but again it is popping the window. I dont know why it is getting popped up. Any suggestions?? On Wed, Oct 21, 2009 at 4:25 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Wed, Oct 21, 2009 at 12:51 PM, Amit Kulkarni amitkkulkarni...@gmail.com wrote: It pops up a small window saying Please select an operation along with OK button. Is the correct radio button flashed if you do this? browser.radio(:after?, browser.cell(:text, Test)).flash Maybe you have to fire some javascript event. Željko --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Browse an Image
Thanks a lot Željko . On Wed, Oct 21, 2009 at 1:43 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Wed, Oct 21, 2009 at 9:06 AM, Amit Kulkarni amitkkulkarni...@gmail.com wrote: Browser.file_field(:name, photo).set(path name i.e. C:\\abc\\abc.jpg) Please dont forget to enter double slash. If you use single quotes, I think you do not need double slash: browser.file_field(:name, photo).set('C:\abc.jpg') Željko --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Help required regarding link method
Hello all, Following is my scenario: I have a list of images and below that image contains Edit link. Now i want to click on that Edit so that i can Edit the Title and Description. Following is the html code: div style=width: 150px; height: 150px;input id=attachment[218] type= checkbox value=1 name=attachment[218]/ img title=Photogallerysanity src= http://s3.amazonaws.com/staging-brandpotion-prints/images/63/large_thumb.jpg alt=Photogallerysanity/ a class=underline href= /Nikes/photo_gallery/attachments/218/edit?media=printEdit/a /div From the above script my image title is Photogallerysanity.And below is Edit link. Now i can click on that Edit link using :href method but it will contain the link /Nikes/photo_gallery/attachments/218/edit?media=print Now the above link uses a no. to recognize.But i want to recognize this Edit link using the image title. Is it possible to do? Please help...! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Help required regarding link method
Hi Željko, I tried browser.link(:after?, browser.image(:title, Photogallerysanity)).click but no success I also tried using .flash method but it does not flash anything. Can you please tell me what is going wrong? On Thu, Oct 22, 2009 at 1:40 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Thu, Oct 22, 2009 at 10:05 AM, Amit Kulkarni amitkkulkarni...@gmail.com wrote: i want to recognize this Edit link using the image title. browser.link(:after?, browser.image(:title, Photogallerysanity)).click Željko -- http://watirpodcast.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Help required regarding link method
Sorry for the trouble. I got it that my queries are similar. But i dont know why is it not working on my side. No my application does not use frames. Even i try to flash any object it does not. Can you tell me what is the problem? On Thu, Oct 22, 2009 at 4:17 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Thu, Oct 22, 2009 at 12:36 PM, Amit Kulkarni amitkkulkarni...@gmail.com wrote: I tried browser.link(:after?, browser.image(:title, Photogallerysanity)).click but no success Amit, You have posted a few very similar questions in the last two days. Have you read the tutorial? http://wiki.openqa.org/display/WTR/Tutorial Does your application use frames? I tested the code I posted with html that you have provided, and it worked. Željko --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Help required regarding link method
Sorry again, Yes i read the tutorial. I tried some stunts but no success.So posted my queries here. On Thu, Oct 22, 2009 at 4:48 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Thu, Oct 22, 2009 at 12:47 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: Have you read the tutorial? http://wiki.openqa.org/display/WTR/Tutorial You did not answer this. Željko --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Help required regarding link method
I also tried to use using Xpath. i.e. Browser.link(:xpath,//a...@href='/Nikes/photo_gallery/attachments/218/edit?media=print']/).text # = Edit Still no success.Is there something wrong with the above code? On Thu, Oct 22, 2009 at 4:55 PM, Amit Kulkarni amitkkulkarni...@gmail.comwrote: Sorry again, Yes i read the tutorial. I tried some stunts but no success.So posted my queries here. On Thu, Oct 22, 2009 at 4:48 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Thu, Oct 22, 2009 at 12:47 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: Have you read the tutorial? http://wiki.openqa.org/display/WTR/Tutorial You did not answer this. Željko --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Help required regarding link method
Hi Angrez, I tried with the link you provided but it shows below error Unable to locate element, using :xpath, //i...@title='Photogallerysanity']/ (Watir::Exception::UnknownObjectException) Same error appears when i use .click or .flash On Thu, Oct 22, 2009 at 5:14 PM, Angrez Singh ang...@gmail.com wrote: can you try this? Browser.link(:xpath,//i...@title='Photogallerysanity']/a).flash() or click() - Angrez On Thu, Oct 22, 2009 at 5:03 PM, Amit Kulkarni amitkkulkarni...@gmail.com wrote: I also tried to use using Xpath. i.e. Browser.link(:xpath,//a...@href='/Nikes/photo_gallery/attachments/218/edit?media=print']/).text # = Edit Still no success.Is there something wrong with the above code? On Thu, Oct 22, 2009 at 4:55 PM, Amit Kulkarni amitkkulkarni...@gmail.com wrote: Sorry again, Yes i read the tutorial. I tried some stunts but no success.So posted my queries here. On Thu, Oct 22, 2009 at 4:48 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Thu, Oct 22, 2009 at 12:47 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: Have you read the tutorial? http://wiki.openqa.org/display/WTR/Tutorial You did not answer this. Željko --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Problem with radio button
Thanks a lot.But the name act2[165] is not going to be same all the time. I have my poll title as Test.So i want to set my focus on delete radio button whose title is Test. Is it possible to do this? This is my html script tr tdTest/td tdUnpublished/td td class=actions label for=Update input id=act2_165_update type=radio value=update name=act2 [165]/ Update /label label for=del2 input id=act2_165_delete type=radio value=delete name=act2 [165]/ Delete /label /td Now here tdTest/td is the title of the poll. So i want to click on delete radio button which has a title named Test :-) On Thu, Oct 22, 2009 at 6:51 PM, Super Kevy kpe...@scholarshipamerica.orgwrote: Try something like this where value=delete or update ie.radio(:name,'act2[165]',value).focus ie.radio(:name,'act2[165]'',value).set --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Browse an Image
Thanks a lot for the link. Now i can upload an image by using the following command Browser.file_field(:name, photo).set(path name i.e. C:\\abc\\abc.jpg) Please dont forget to enter double slash. :-) On Thu, Oct 15, 2009 at 1:40 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Thu, Oct 15, 2009 at 10:07 AM, Amit amitkkulkarni...@gmail.com wrote: input id=product_photo class=file type=file size=20 name=product[photo]/ http://wiki.openqa.org/display/WTR/File+Uploads Željko -- http://watirpodcast.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Problem with radio button
Hello, I need some help regarding radio button. In my application i created a poll named Test along with other polls There are two radio buttons beside each poll namely Update and Delete Now here i want to click on Delete radio button beside Test poll. How do i access? This is its html. input id=act2_165_delete type=radio value=delete name=act2 [165]/ Now while testing i dont know when a new poll is created what id it will have. I know one thing that the title is Test and i want to click on that delete radio having title Test. How do i access that particular radio button? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Problem with radio button
tr tdTest/td tdUnpublished/td td class=actions label for=Update input id=act2_165_update type=radio value=update name=act2 [165]/ Update /label label for=del2 input id=act2_165_delete type=radio value=delete name=act2 [165]/ Delete /label /td This is html which contains the string Test. Yes i can access through an id.But it is not going to be same all the time.It is always going to be changed. But one thing i know is that my poll title i.e. Test.So i want to access the radio button which contains the title Test. GUI appearance is as follows: POLLStatus Actions TestUnpublished Here contains 2 radio buttons i.e. Update and Delete On Oct 21, 1:19 pm, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Wed, Oct 21, 2009 at 9:26 AM, Amit amitkkulkarni...@gmail.com wrote: Now here i want to click on Delete radio button beside Test poll. Can you post html that includes radio button and Test text? We could help more if we had that. input id=act2_165_delete type=radio value=delete name=act2 [165]/ I think you said you do not know id, but if you know it, this should work: browser.radio(:id, act2_165_delete).set More information: http://wiki.openqa.org/display/WTR/Radio+Buttons Željko --http://watirpodcast.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---