Re: [wtr-general] Re: Watir-webdriver - Screenshots - Browser is minimised before screeshot is taken and only part of the page is saved
I have the same proble, did anyone fix it? Best Regards El jueves, 17 de enero de 2013 19:52:33 UTC+1, johnssn escribió: Awesome! Thanks... -- *From:* Dan dfr...@gmail.com javascript: *To:* watir-...@googlegroups.com javascript: *Cc:* John Fitisoff jfit...@yahoo.com javascript: *Sent:* Thursday, January 17, 2013 10:47 AM *Subject:* Re: [wtr-general] Re: Watir-webdriver - Screenshots - Browser is minimised before screeshot is taken and only part of the page is saved It works on all. On Thursday, January 17, 2013 1:33:28 PM UTC-5, johnssn wrote: One question about the screenshot capability: Is it specific to a certain OS or will it work on Windows, OSX, Linux? -- *From:* Evgeny Shavkunov dmoroz...@gmail.com *To:* watir-...@googlegroups.com *Sent:* Thursday, January 17, 2013 2:07 AM *Subject:* [wtr-general] Re: Watir-webdriver - Screenshots - Browser is minimised before screeshot is taken and only part of the page is saved Ok, I managed to get better results and I have more details on the issue I'm having. I noticed that when screenshot method does minimize-maximize operation, minimized window goes partly off the screen. So I used browser.window.move_to 0,0 and it worked much better: page on screenshot now is much less cropped but still cropped (especially at the bottom). So I started to play with browser.window.resize_to method and found that the best results I get when I set browser size slightly bigger then screen resolution (e.g. with 1366x768 resolution the best screenshot I managed to make was with browser size 1374x816). Better but not perfect: e.g. I can see scrollbars on the sides of screenshot (application I'm testing is scaled depending on window size and when this size is changed from higher to lower there is a moment when scrollbars are shown). But as I understand screenshot method should automatically scroll the page anyway, right? Any idea where can be a problem? Is there a way how to make screenshots without resizing (even if page is not fully rendered still possibly results can be better)? Or may be there is alternative method of making a screenshot on IE? -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-...@googlegroups.com http://groups.google.com/group/watir-general watir-genera...@ googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-...@googlegroups.com javascript: http://groups.google.com/group/watir-general watir-genera...@googlegroups.com javascript: -- -- 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] Re: Watir-webdriver - Screenshots - Browser is minimised before screeshot is taken and only part of the page is saved
Hi Not sure if this is something to get a screen shot.. but I tried adding a screen shot folder to the UI test folder where I put in all the tests and then adding this line to the places where I would like to get the screen shotsolves my problem broswer.driver.save_screenshot(uitest/screenshot/File Name_#{Time.now.strftime('%Y-%m-%d-%H-%M-%S')}.png) Ankita Gupta Senior Test Analyst http:www.adslot.com p +61 3 8695 9199 m +61 433 617 627 Adslot.com Follow Us @adslot http://www.twitter.com/adslot Melbourne • London • San Francisco The information transmitted may be confidential, is intended only for the person to which it is addressed, and may not be reviewed, retransmitted, disseminated or relied upon by any other persons. If you received this message in error, please contact the sender and destroy any paper or electronic copies of this message. Any views expressed in this email communication are those of the individual sender, except where the sender specifically states otherwise. Adslot Pty Ltd does not represent, warrant or guarantee that the communication is free of errors, virus or interference. On Thu, May 9, 2013 at 4:28 PM, LuisE luises...@gmail.com wrote: I have the same proble, did anyone fix it? Best Regards El jueves, 17 de enero de 2013 19:52:33 UTC+1, johnssn escribió: Awesome! Thanks... -- *From:* Dan dfr...@gmail.com *To:* watir-...@googlegroups.com *Cc:* John Fitisoff jfit...@yahoo.com *Sent:* Thursday, January 17, 2013 10:47 AM *Subject:* Re: [wtr-general] Re: Watir-webdriver - Screenshots - Browser is minimised before screeshot is taken and only part of the page is saved It works on all. On Thursday, January 17, 2013 1:33:28 PM UTC-5, johnssn wrote: One question about the screenshot capability: Is it specific to a certain OS or will it work on Windows, OSX, Linux? -- *From:* Evgeny Shavkunov dmoroz...@gmail.com *To:* watir-...@googlegroups.com *Sent:* Thursday, January 17, 2013 2:07 AM *Subject:* [wtr-general] Re: Watir-webdriver - Screenshots - Browser is minimised before screeshot is taken and only part of the page is saved Ok, I managed to get better results and I have more details on the issue I'm having. I noticed that when screenshot method does minimize-maximize operation, minimized window goes partly off the screen. So I used browser.window.move_to 0,0 and it worked much better: page on screenshot now is much less cropped but still cropped (especially at the bottom). So I started to play with browser.window.resize_to method and found that the best results I get when I set browser size slightly bigger then screen resolution (e.g. with 1366x768 resolution the best screenshot I managed to make was with browser size 1374x816). Better but not perfect: e.g. I can see scrollbars on the sides of screenshot (application I'm testing is scaled depending on window size and when this size is changed from higher to lower there is a moment when scrollbars are shown). But as I understand screenshot method should automatically scroll the page anyway, right? Any idea where can be a problem? Is there a way how to make screenshots without resizing (even if page is not fully rendered still possibly results can be better)? Or may be there is alternative method of making a screenshot on IE? -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-...@googlegroups.com http://groups.google.com/**group/watir-generalhttp://groups.google.com/group/watir-general watir-genera...@ googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-...@googlegroups.com http://groups.google.com/**group/watir-generalhttp://groups.google.com/group/watir-general watir-genera...@**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 --- 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] Re: Watir-webdriver - Screenshots - Browser is minimised before screeshot is taken and only part of the page is saved
Hi Not sure if this is something to get a screen shot.. but I tried adding a screen shot folder to the UI test folder where I put in all the tests and then adding this line to the places where I would like to get the screen shotsolves my problem broswer.driver.save_screenshot(uitest/screenshot/File Name_#{Time.now.strftime('%Y-%m-%d-%H-%M-%S')}.png) On Thu, May 9, 2013 at 4:28 PM, LuisE luises...@gmail.com wrote: I have the same proble, did anyone fix it? Best Regards El jueves, 17 de enero de 2013 19:52:33 UTC+1, johnssn escribió: Awesome! Thanks... -- *From:* Dan dfr...@gmail.com *To:* watir-...@googlegroups.com *Cc:* John Fitisoff jfit...@yahoo.com *Sent:* Thursday, January 17, 2013 10:47 AM *Subject:* Re: [wtr-general] Re: Watir-webdriver - Screenshots - Browser is minimised before screeshot is taken and only part of the page is saved It works on all. On Thursday, January 17, 2013 1:33:28 PM UTC-5, johnssn wrote: One question about the screenshot capability: Is it specific to a certain OS or will it work on Windows, OSX, Linux? -- *From:* Evgeny Shavkunov dmoroz...@gmail.com *To:* watir-...@googlegroups.com *Sent:* Thursday, January 17, 2013 2:07 AM *Subject:* [wtr-general] Re: Watir-webdriver - Screenshots - Browser is minimised before screeshot is taken and only part of the page is saved Ok, I managed to get better results and I have more details on the issue I'm having. I noticed that when screenshot method does minimize-maximize operation, minimized window goes partly off the screen. So I used browser.window.move_to 0,0 and it worked much better: page on screenshot now is much less cropped but still cropped (especially at the bottom). So I started to play with browser.window.resize_to method and found that the best results I get when I set browser size slightly bigger then screen resolution (e.g. with 1366x768 resolution the best screenshot I managed to make was with browser size 1374x816). Better but not perfect: e.g. I can see scrollbars on the sides of screenshot (application I'm testing is scaled depending on window size and when this size is changed from higher to lower there is a moment when scrollbars are shown). But as I understand screenshot method should automatically scroll the page anyway, right? Any idea where can be a problem? Is there a way how to make screenshots without resizing (even if page is not fully rendered still possibly results can be better)? Or may be there is alternative method of making a screenshot on IE? -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-...@googlegroups.com http://groups.google.com/**group/watir-generalhttp://groups.google.com/group/watir-general watir-genera...@ googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-...@googlegroups.com http://groups.google.com/**group/watir-generalhttp://groups.google.com/group/watir-general watir-genera...@**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 --- 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] Problem: Unable to validate HTML Report using Watir
Hi Filipin, I am having problem while captuirng data from HTML Report. I have used the method relationship_in_report = get_element_text(popup, :td, :class, 'A06df9158c527411db1b8fef473271b9a12896') which is giving me the error Unable to Return text in td class='A06df9158c527411db1b8fef473271b9a12896': 'Unable to locate element, using :class, A06df9158c527411db1b8fef473271b9a12896 I think i should use table methods to capture the data from this reoport but I am not sure which method to use. I am unable to attach screen shot of the HTML report source here also. On Tuesday, 7 May 2013 15:40:08 UTC+5:30, Željko Filipin wrote: On Tue, May 7, 2013 at 6:13 AM, v b baba kanchustambham vbb...@gmail.comjavascript: wrote: Can anyone please let us know the possibility of capturing the report elements and comparing them with the application data As I said in stack overflow question[1], what is exactly the problem? Željko -- 1: http://stackoverflow.com/q/16411154/17469 -- -- 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.
[wtr-general] Tabs, PDFs, focus, and Chrome
Short version: new tabs in Chromeprevent old tabs from being used, fixing that means that opened tabs with PDFs in them get reused before a human can examine the PDFs. Originally it worked like this: 1. open new Chrome window to main page of the app (tab #1) 2. [do process A and then] click the button and a new tab (tab #2) opens with PDF A in it. 3. Go back to tab #1 [do process B and then] click the button and a new tab (tab #3) opens with PDF B in it. 4. Go back to tab #1 [do process C and then] click the button and a new tab (tab #4) opens and Word document C document gets downloaded. 6. Go back to tab #1 [do process D and then] click the button and a new tab (tab #5) opens and Word document D document gets downloaded. All tabs stay open and PDFs can be viewed. Not perfect, but workable. But then things changed. I pulled frequently used stuff out, put them in methods in another file so all of the various tests could use them, which seemed like a good idea. But that seems to have caused problems with losing focus on the original window. (I may be wrong) now I'm stuck with: 1. open new Chrome window to main page of the app (tab #1) 2. [do process A and then] click the button and a new tab (tab #2) opens with PDF A in it. 3. Stay in tab #2 [do process B and then] click the button and a new tab (tab #3) opens with PDF B in it. PDF A is now lost 4. Stay in tab #3 [do process C and then] click the button and a new tab (tab #4) opens and Word document C document gets downloaded. PDF B is now lost 6. Stay in tab #4 [do process D and then] click the button and a new tab (tab #5) opens and Word document D document gets downloaded. This was caused by using b.windows.last.use So I tried using b.windows.first.use But that fails, because focus isn't going back to tab #1, and watir can't find the object in the modal that it needs to click. (in `assert_ok': Element is not clickable at point (737.5, -373) (Selenium::WebDriver::Error::UnknownError)) So far as I can tell, I would be fine if I could do any one of the following 1) get PDFs to download. I cannot. This pagehttps://groups.google.com/forum/?fromgroups=#!topic/watir-general/gItPeAaWZWYseemed promising, but the code didn't work and I couldn't fix it. 2) get watir to go back to the first page, for realsies, and find the buttons it needs 3) perhaps open a new tab for every section of the test (I'm going to look into this one, but I'm not overly hopeful) Any ideas? I updated Watir and Ruby both within the last two months. I'm using Chrome on OSX. Moving to Windows or IE are not viable options. Here is a section of the code. No, I'm not a programmer first and foremost. # print Inventory Report .PDF b.goto currenturl b.div(:id, 'page').a(:text, 'Inventory Report').click sleep 1 b.div(:id, 'printInventoryReportModal').a(:text, 'A4').click b.link(:id = submitBTNprint-inventory-report).fire_event onclick status = page_status(currenturl) # these are the methods that I pulled out passtest = section_results(currenturl,b) # and put in a shared file # print General List .PDF b.goto [main page URL] b.div(:id, 'page').a(:text, 'General List').click sleep 1 b.div(:id, 'printGeneralInventoryListModal').a(:text, 'A4').click b.link(:id = submitBTNprint-general-list).fire_event onclick status = page_status(currenturl) passtest = section_results(currenturl,b) # print General List .DOC b.goto [main page URL] b.div(:id, 'page').a(:text, 'General List').click sleep 1 b.div(:id, 'printGeneralInventoryListModal').a(:text, '.DOC').click b.div(:id, 'printGeneralInventoryListModal').a(:text, 'A4').click b.link(:id = submitBTNprint-general-list).fire_event onclick status = page_status(currenturl) passtest = section_results(currenturl,b) # print Inventory Report .XLS b.goto [main page URL] b.div(:id, 'page').a(:text, 'Inventory Report').click sleep 1 b.div(:id, 'printInventoryReportModal').a(:text, 'A4').click b.div(:id, 'printInventoryReportModal').a(:text, '.XLS').click b.link(:id = submitBTNprint-inventory-report).fire_event onclick status = page_status(currenturl) passtest = section_results(currenturl,b) -- -- 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.
[wtr-general] Re: Watir-Webdriver Installation Issue
Zelijko, noted your suggestion. Now i am getting the following error * * *irb(main):002:0 require watir-webdriver* = true *irb(main):003:0 browser=Watir::Browser.new:chrome* Started ChromeDriver port=9515 version=0.8 log=C:\devkit\chromedriver.log You are using an old or stdlib version of json gem Please upgrade to the recent version by adding this to your Gemfile: gem 'json', '~ 1.7.7' = #Watir::Browser:0x..f9d78e6aa url={message=no such session: url\n (Driv er info: chromedriver=0.8,platform=Windows NT 6.1 x86_64)} title={message=n o such session: title\n (Driver info: chromedriver=0.8,platform=Windows NT 6.1 x86_64)} irb(main):004:0 On Thu, May 9, 2013 at 12:47 PM, Sohail Mirza mrz...@gmail.com wrote: Hi, I am trying to install Watir-Webdriver and try to work on it but getting the following error :( [image: Inline image 1] Any comments please. -- -- 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. image.png
Re: [wtr-general] Re: Watir-Webdriver Installation Issue
On Thu, May 9, 2013 at 12:05 PM, Sohail Mirza mrz...@gmail.com wrote: Now i am getting the following error Do you understand the error message? It says what you have to do. Ž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.
Re: [wtr-general] Problem: Unable to validate HTML Report using Watir
On Thu, May 9, 2013 at 9:06 AM, v b baba kanchustambham vbb...@gmail.comwrote: I am unable to attach screen shot of the HTML report source here also. Do not attach screen shot, but copy/paste relevant HTML. Ž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.
[wtr-general] Re: Problems selecting an item in a list
Have found a solution. I firstly need to fire_event(onmouseover) which selects the item then fire_event(onclick). Thank you all for your comments. On Wednesday, May 8, 2013 10:39:16 AM UTC+1, Marc Westwood wrote: Yes it works in terms of its clicks on the item in the select list because I can see the item in the list go yellow when it clicks but while is clicks it does not actually select the item. I can't see anything about a onclick mentioned. I've tried .click fire_event('onclick') mousedown mouseup onchange nothing seems to work. I have the same issue with other drop down lists in our application as well but the other drop down lists have different HTML they are options tag in the html. Sorry I'm new to all this. On Friday, May 3, 2013 6:00:11 PM UTC+1, Super Kevy wrote: Did this work? browser.div(:class, selectable_list).li(:id, _item_2).click Against this code sample lia id=_item_1 window=[object] . Text = DEF - 100 DEF I think you confirmed to zeljko browser.link(:text,DEF - 100 DEF).click worked Your sample code fragment is somewhat inadequate to answer your issue I assume the html really looks like this: lia id=_item1 ...other anchor attributes. DEF - 100 DEF/a/ li Do you see any onchange, onclick events in the div selectable_list, in the anchor, or list item? On May 2, 6:56 am, Marc Westwood marcawestw...@gmail.com wrote: I have tried. .div(:class, selectable_list).li(:id, _item_2).click .div(:class, selectable_list).select 'DEF - 100 DEF' .select_list(:id, selectable_list).select 'DEF - 100 DEF' I would like to click on using the text. On Thursday, May 2, 2013 7:57:55 AM UTC+1, Željko Filipin wrote: On Wed, May 1, 2013 at 3:52 PM, Marc Westwood marcaw...@gmail.comjavascript: wrote: I am having problems selecting items from a drop down list, I can get the drop down list to open but am unable to select an item within the list. You are not dealing with select list (select tag), but with unordered list (ul tag). What do you want to click? What have you tried so far? Ž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.
[wtr-general] Re: Watir-Webdriver Installation Issue
I do understand the error message hopefully in correct way. but when i run gem update command it says me that Nothing to update. All gems are updated. I have ruby 1.9.3. 3p392 what i am missing here On Thu, May 9, 2013 at 2:05 PM, Sohail Mirza mrz...@gmail.com wrote: Zelijko, noted your suggestion. Now i am getting the following error * * *irb(main):002:0 require watir-webdriver* = true *irb(main):003:0 browser=Watir::Browser.new:chrome* Started ChromeDriver port=9515 version=0.8 log=C:\devkit\chromedriver.log You are using an old or stdlib version of json gem Please upgrade to the recent version by adding this to your Gemfile: gem 'json', '~ 1.7.7' = #Watir::Browser:0x..f9d78e6aa url={message=no such session: url\n (Driv er info: chromedriver=0.8,platform=Windows NT 6.1 x86_64)} title={message=n o such session: title\n (Driver info: chromedriver=0.8,platform=Windows NT 6.1 x86_64)} irb(main):004:0 On Thu, May 9, 2013 at 12:47 PM, Sohail Mirza mrz...@gmail.com wrote: Hi, I am trying to install Watir-Webdriver and try to work on it but getting the following error :( [image: Inline image 1] Any comments please. -- -- 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. image.png
Re: [wtr-general] Re: Watir-Webdriver Installation Issue
On Thu, May 9, 2013 at 12:05 PM, Sohail Mirza mrz...@gmail.com wrote: You are using an old or stdlib version of json gem Please upgrade to the recent version by adding this to your Gemfile: gem 'json', '~ 1.7.7' I think you should explicitly install json gem: gem install json Ž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.
Re: [wtr-general] Re: Watir-Webdriver Installation Issue
even this is not working. i just learnt from chromdriver download page that Chrome Driver is not available for WIN 64 bit operating system. :( is it true? i think my OS is 64 bit and that is causing problem since chrome driver is 32 bit compatible On Thu, May 9, 2013 at 3:33 PM, Željko Filipin zeljko.fili...@gmail.comwrote: On Thu, May 9, 2013 at 12:05 PM, Sohail Mirza mrz...@gmail.com wrote: You are using an old or stdlib version of json gem Please upgrade to the recent version by adding this to your Gemfile: gem 'json', '~ 1.7.7' I think you should explicitly install json gem: gem install json Ž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. -- -- 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.
[wtr-general] Re: Tabs, PDFs, focus, and Chrome
Seems like the best thing to do would be to disable the chrome pfd viewer so it downloads it instead of trying to open it. I think technically you should be able to pass a switch to chrome to disable the viewer programmatically, but I tried and it didn't work for me, but maybe this will lead you in the right direction. http://watirwebdriver.com/chrome/ profile = Selenium::WebDriver::Chrome::Profile.new b = Watir::Browser.new :chrome, :profile = profile b.goto(http://www.aisb.org.uk/convention/aisb08/AISB08.pdf;) Although, if you're not validating anything in the file, it might not even be worth the trouble to download it. See below for some thoughts on that. The examples there are in java, but the concept is much the same in ruby. http://ardesco.lazerycode.com/index.php/2012/07/how-to-download-files-with-selenium-and-why-you-shouldnt/ On Wednesday, May 8, 2013 5:45:53 PM UTC-4, Dan Meltz wrote: Short version: new tabs in Chromeprevent old tabs from being used, fixing that means that opened tabs with PDFs in them get reused before a human can examine the PDFs. Originally it worked like this: 1. open new Chrome window to main page of the app (tab #1) 2. [do process A and then] click the button and a new tab (tab #2) opens with PDF A in it. 3. Go back to tab #1 [do process B and then] click the button and a new tab (tab #3) opens with PDF B in it. 4. Go back to tab #1 [do process C and then] click the button and a new tab (tab #4) opens and Word document C document gets downloaded. 6. Go back to tab #1 [do process D and then] click the button and a new tab (tab #5) opens and Word document D document gets downloaded. All tabs stay open and PDFs can be viewed. Not perfect, but workable. But then things changed. I pulled frequently used stuff out, put them in methods in another file so all of the various tests could use them, which seemed like a good idea. But that seems to have caused problems with losing focus on the original window. (I may be wrong) now I'm stuck with: 1. open new Chrome window to main page of the app (tab #1) 2. [do process A and then] click the button and a new tab (tab #2) opens with PDF A in it. 3. Stay in tab #2 [do process B and then] click the button and a new tab (tab #3) opens with PDF B in it. PDF A is now lost 4. Stay in tab #3 [do process C and then] click the button and a new tab (tab #4) opens and Word document C document gets downloaded. PDF B is now lost 6. Stay in tab #4 [do process D and then] click the button and a new tab (tab #5) opens and Word document D document gets downloaded. This was caused by using b.windows.last.use So I tried using b.windows.first.use But that fails, because focus isn't going back to tab #1, and watir can't find the object in the modal that it needs to click. (in `assert_ok': Element is not clickable at point (737.5, -373) (Selenium::WebDriver::Error::UnknownError)) So far as I can tell, I would be fine if I could do any one of the following 1) get PDFs to download. I cannot. This pagehttps://groups.google.com/forum/?fromgroups=#!topic/watir-general/gItPeAaWZWYseemed promising, but the code didn't work and I couldn't fix it. 2) get watir to go back to the first page, for realsies, and find the buttons it needs 3) perhaps open a new tab for every section of the test (I'm going to look into this one, but I'm not overly hopeful) Any ideas? I updated Watir and Ruby both within the last two months. I'm using Chrome on OSX. Moving to Windows or IE are not viable options. Here is a section of the code. No, I'm not a programmer first and foremost. # print Inventory Report .PDF b.goto currenturl b.div(:id, 'page').a(:text, 'Inventory Report').click sleep 1 b.div(:id, 'printInventoryReportModal').a(:text, 'A4').click b.link(:id = submitBTNprint-inventory-report).fire_event onclick status = page_status(currenturl) # these are the methods that I pulled out passtest = section_results(currenturl,b) # and put in a shared file # print General List .PDF b.goto [main page URL] b.div(:id, 'page').a(:text, 'General List').click sleep 1 b.div(:id, 'printGeneralInventoryListModal').a(:text, 'A4').click b.link(:id = submitBTNprint-general-list).fire_event onclick status = page_status(currenturl) passtest = section_results(currenturl,b) # print General List .DOC b.goto [main page URL] b.div(:id, 'page').a(:text, 'General List').click sleep 1 b.div(:id, 'printGeneralInventoryListModal').a(:text, '.DOC').click b.div(:id, 'printGeneralInventoryListModal').a(:text, 'A4').click b.link(:id = submitBTNprint-general-list).fire_event onclick status = page_status(currenturl) passtest = section_results(currenturl,b) # print Inventory Report .XLS b.goto [main page URL] b.div(:id, 'page').a(:text, 'Inventory Report').click sleep 1 b.div(:id, 'printInventoryReportModal').a(:text, 'A4').click b.div(:id, 'printInventoryReportModal').a(:text,
[wtr-general] Re: Tabs, PDFs, focus, and Chrome
Can't seem to edit my post, but the example should be profile = Selenium::WebDriver::Chrome::Profile.new profile['plugins.enabled_internal_pdf3'] = false b = Watir::Browser.new :chrome, :profile = profile b.goto(http://www.aisb.org.uk/convention/aisb08/AISB08.pdf;) On Thursday, May 9, 2013 9:06:56 AM UTC-4, Dan wrote: Seems like the best thing to do would be to disable the chrome pfd viewer so it downloads it instead of trying to open it. I think technically you should be able to pass a switch to chrome to disable the viewer programmatically, but I tried and it didn't work for me, but maybe this will lead you in the right direction. http://watirwebdriver.com/chrome/ profile = Selenium::WebDriver::Chrome::Profile.new b = Watir::Browser.new :chrome, :profile = profile b.goto(http://www.aisb.org.uk/convention/aisb08/AISB08.pdf;) Although, if you're not validating anything in the file, it might not even be worth the trouble to download it. See below for some thoughts on that. The examples there are in java, but the concept is much the same in ruby. http://ardesco.lazerycode.com/index.php/2012/07/how-to-download-files-with-selenium-and-why-you-shouldnt/ On Wednesday, May 8, 2013 5:45:53 PM UTC-4, Dan Meltz wrote: Short version: new tabs in Chromeprevent old tabs from being used, fixing that means that opened tabs with PDFs in them get reused before a human can examine the PDFs. Originally it worked like this: 1. open new Chrome window to main page of the app (tab #1) 2. [do process A and then] click the button and a new tab (tab #2) opens with PDF A in it. 3. Go back to tab #1 [do process B and then] click the button and a new tab (tab #3) opens with PDF B in it. 4. Go back to tab #1 [do process C and then] click the button and a new tab (tab #4) opens and Word document C document gets downloaded. 6. Go back to tab #1 [do process D and then] click the button and a new tab (tab #5) opens and Word document D document gets downloaded. All tabs stay open and PDFs can be viewed. Not perfect, but workable. But then things changed. I pulled frequently used stuff out, put them in methods in another file so all of the various tests could use them, which seemed like a good idea. But that seems to have caused problems with losing focus on the original window. (I may be wrong) now I'm stuck with: 1. open new Chrome window to main page of the app (tab #1) 2. [do process A and then] click the button and a new tab (tab #2) opens with PDF A in it. 3. Stay in tab #2 [do process B and then] click the button and a new tab (tab #3) opens with PDF B in it. PDF A is now lost 4. Stay in tab #3 [do process C and then] click the button and a new tab (tab #4) opens and Word document C document gets downloaded. PDF B is now lost 6. Stay in tab #4 [do process D and then] click the button and a new tab (tab #5) opens and Word document D document gets downloaded. This was caused by using b.windows.last.use So I tried using b.windows.first.use But that fails, because focus isn't going back to tab #1, and watir can't find the object in the modal that it needs to click. (in `assert_ok': Element is not clickable at point (737.5, -373) (Selenium::WebDriver::Error::UnknownError)) So far as I can tell, I would be fine if I could do any one of the following 1) get PDFs to download. I cannot. This pagehttps://groups.google.com/forum/?fromgroups=#!topic/watir-general/gItPeAaWZWYseemed promising, but the code didn't work and I couldn't fix it. 2) get watir to go back to the first page, for realsies, and find the buttons it needs 3) perhaps open a new tab for every section of the test (I'm going to look into this one, but I'm not overly hopeful) Any ideas? I updated Watir and Ruby both within the last two months. I'm using Chrome on OSX. Moving to Windows or IE are not viable options. Here is a section of the code. No, I'm not a programmer first and foremost. # print Inventory Report .PDF b.goto currenturl b.div(:id, 'page').a(:text, 'Inventory Report').click sleep 1 b.div(:id, 'printInventoryReportModal').a(:text, 'A4').click b.link(:id = submitBTNprint-inventory-report).fire_event onclick status = page_status(currenturl) # these are the methods that I pulled out passtest = section_results(currenturl,b) # and put in a shared file # print General List .PDF b.goto [main page URL] b.div(:id, 'page').a(:text, 'General List').click sleep 1 b.div(:id, 'printGeneralInventoryListModal').a(:text, 'A4').click b.link(:id = submitBTNprint-general-list).fire_event onclick status = page_status(currenturl) passtest = section_results(currenturl,b) # print General List .DOC b.goto [main page URL] b.div(:id, 'page').a(:text, 'General List').click sleep 1 b.div(:id, 'printGeneralInventoryListModal').a(:text, '.DOC').click b.div(:id, 'printGeneralInventoryListModal').a(:text, 'A4').click b.link(:id =
Re: [wtr-general] Re: Watir-Webdriver Installation Issue
You downloaded the wrong chromedriver. Chromedriver2 isn't quite ready. Get the chromedriver_win_26.0.1383.0.ziphttps://chromedriver.googlecode.com/files/chromedriver_win_26.0.1383.0.zip . On Thursday, May 9, 2013 7:35:37 AM UTC-4, mc060200778 wrote: even this is not working. i just learnt from chromdriver download page that Chrome Driver is not available for WIN 64 bit operating system. :( is it true? i think my OS is 64 bit and that is causing problem since chrome driver is 32 bit compatible On Thu, May 9, 2013 at 3:33 PM, Željko Filipin zeljko@gmail.comjavascript: wrote: On Thu, May 9, 2013 at 12:05 PM, Sohail Mirza mrz...@gmail.comjavascript: wrote: You are using an old or stdlib version of json gem Please upgrade to the recent version by adding this to your Gemfile: gem 'json', '~ 1.7.7' I think you should explicitly install json gem: gem install json Željko -- -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-...@googlegroups.com javascript: http://groups.google.com/group/watir-general watir-genera...@googlegroups.com javascript: --- 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-genera...@googlegroups.com javascript:. 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.
[wtr-general] Re: Problems selecting an item in a list
Congratulations.Stacking the fire_events. . On May 9, 5:24 am, Marc Westwood marcawestw...@gmail.com wrote: Have found a solution. I firstly need to fire_event(onmouseover) which selects the item then fire_event(onclick). Thank you all for your comments. On Wednesday, May 8, 2013 10:39:16 AM UTC+1, Marc Westwood wrote: Yes it works in terms of its clicks on the item in the select list because I can see the item in the list go yellow when it clicks but while is clicks it does not actually select the item. I can't see anything about a onclick mentioned. I've tried .click fire_event('onclick') mousedown mouseup onchange nothing seems to work. I have the same issue with other drop down lists in our application as well but the other drop down lists have different HTML they are options tag in the html. Sorry I'm new to all this. On Friday, May 3, 2013 6:00:11 PM UTC+1, Super Kevy wrote: Did this work? browser.div(:class, selectable_list).li(:id, _item_2).click Against this code sample lia id=_item_1 window=[object] . Text = DEF - 100 DEF I think you confirmed to zeljko browser.link(:text,DEF - 100 DEF).click worked Your sample code fragment is somewhat inadequate to answer your issue I assume the html really looks like this: lia id=_item1 ...other anchor attributes. DEF - 100 DEF/a/ li Do you see any onchange, onclick events in the div selectable_list, in the anchor, or list item? On May 2, 6:56 am, Marc Westwood marcawestw...@gmail.com wrote: I have tried. .div(:class, selectable_list).li(:id, _item_2).click .div(:class, selectable_list).select 'DEF - 100 DEF' .select_list(:id, selectable_list).select 'DEF - 100 DEF' I would like to click on using the text. On Thursday, May 2, 2013 7:57:55 AM UTC+1, Željko Filipin wrote: On Wed, May 1, 2013 at 3:52 PM, Marc Westwood marcaw...@gmail.comjavascript: wrote: I am having problems selecting items from a drop down list, I can get the drop down list to open but am unable to select an item within the list. You are not dealing with select list (select tag), but with unordered list (ul tag). What do you want to click? What have you tried so far? Ž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.
[wtr-general] Re: Tabs, PDFs, focus, and Chrome
Dan, Thanks for the help, but I wasn't able to make that work, either. I also tried exploring using something like b = Watir::Browser.new :chrome, :switches = ['--disable-plugins'] but I had no luck with that, either. The point of the test is for a human to look at the PDFs, so I don't really care if they are downloaded or left open in the browser, I just need to get *one* of those options to work. I hate to even consider it, but it's starting to look like I'll just have to open a new browser for every freakin' test, because there doesn't seem to be any way to get chrome to *actually* download PDFs, nor any way to use watir to *actually* go back to a previously opened (and still open) tab. Yes, I tried browser.window(:title = tab_name).use do. No, it doesn't work, because there is a modal there, so I need focus to go back there so it will see the modal. At least that's what it seems like. Back to the drawing board. -- -- 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.
[wtr-general] Looking for click_no_wait functionality/solution for Browser.alert
I'm testing a home-grown shopping cart application which has scenarios where adding an item to the cart results in an alert pop-up appearing. Scenarios that have just a single alert pop-up can be handled with Browser.alert.ok. I have run into a couple of scenarios where adding an item to the cart results in multiple consecutive alert pop-ups that need to be cleared. The first alert can be cleared just fine with Browser.alert.ok. I am then unable to clear the second alert pop-up. Working this scenario in irb, I see that after issuing the first Browser.alert.ok command, the irb prompt is not returned. It seems like the second alert pop-up is blocking progress similar to when an alert pop-up is triggered by clicking a button with just .click instead of .click_no_wait. So, I'm wondering if anyone has run into a similar situation and has a solution. It looks like there is no .click_no_wait method defined for the alert pop-ups. For reference, my successful scenarios look like this: browser.button(:value,Add To Cart).click_no_wait # This triggers the alert pop-up. ($browser.wait_until(10) { $browser.alert.exists? }) ? ($browser.alert.ok) : () # Wait a bit and if alert pop-up exists, click OK. No additional alert pop-up appears. My unsuccessful scenarios are when an additional alert pop-up appears after clicking OK on the first alert pop-up. Thanks. Johnathan -- -- 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.
[wtr-general] Re: Watir webdriver - How to click on last td in table ?
If the number of rows is static, would make sense to use xpath and locate the last row with it and then click on image of the last row. something like b.element(:xpath,//table[@class='rctable']/tbody/tr[15]/td[2]/img[@src=' /tracker/images/skin2/bolean.png']).click On Wednesday, May 1, 2013 12:44:18 AM UTC+10, watir webdriver wrote: Sorry Filipin...ignore my previous comment...its not working and still its clicking on the first td in the table. Any one can help me in this ? On Thursday, April 25, 2013 5:34:21 PM UTC+1, watir webdriver wrote: Hi there, In my application,I've to select the last td (which is an img) in table.Can anyone help me with this ? *HTML :* table class=rctable thead tbody tr td a href=edit.page?id=6Shirts main/a /td td a onclick=return confirm('Delete creative?') href=delete.page?cid=6 a href=edit.page?id=6 a href=?duplicateId=6 /td /tr tr td a href=edit.page?id=7Suits main/a /td td a onclick=return confirm('Delete creative?') href=delete.page?cid=7 a href=edit.page?id=7 a href=?duplicateId=7 /td /tr tr td a href=edit.page?id=8Shoes main/a /td td a onclick=return confirm('Delete creative?') href=delete.page?cid=8 a href=edit.page?id=8 a href=?duplicateId=8 /td /tr tr td a href=edit.page?id=10Womens main/a /td td a onclick=return confirm('Delete creative?') href=delete.page?cid=10 a href=edit.page?id=10 a href=?duplicateId=10 /td /tr tr td a href=edit.page?id=11Coats side/a /td td a onclick=return confirm('Delete creative?') href=delete.page?cid=11 a href=edit.page?id=11 a href=?duplicateId=11 /td /tr tr td a href=edit.page?id=12Knitwear side/a /td td a onclick=return confirm('Delete creative?') href=delete.page?cid=12 a href=edit.page?id=12 a href=?duplicateId=12 /td /tr tr td a href=edit.page?id=13New side/a /td td a onclick=return confirm('Delete creative?') href=delete.page?cid=13 a href=edit.page?id=13 a href=?duplicateId=13 /td /tr tr td a href=edit.page?id=14Shoes side/a /td td a onclick=return confirm('Delete creative?') href=delete.page?cid=14 a href=edit.page?id=14 a href=?duplicateId=14 /td /tr tr td a href=edit.page?id=15Ties side/a /td td a onclick=return confirm('Delete creative?') href=delete.page?cid=15 a href=edit.page?id=15 a href=?duplicateId=15 /td /tr tr td a href=edit.page?id=16Womens side/a /td td a onclick=return confirm('Delete creative?') href=delete.page?cid=16 a href=edit.page?id=16 a href=?duplicateId=16 /td /tr tr td a href=edit.page?id=19Home page spring/a /td td a onclick=return confirm('Delete creative?') href=delete.page?cid=19 a href=edit.page?id=19 a href=?duplicateId=19 /td /tr tr td a href=edit.page?id=34fhg/a /td td a onclick=return confirm('Delete creative?') href=delete.page?cid=34 a href=edit.page?id=34 a href=?duplicateId=34 /td /tr tr td a href=edit.page?id=36AutoTestCreative/a /td td a onclick=return confirm('Delete creative?') href=delete.page?cid=36 a href=edit.page?id=36 a href=?duplicateId=36 /td /tr tr td a href=edit.page?id=37AutoTestCreative/a /td td a onclick=return confirm('Delete creative?') href=delete.page?cid=37 a href=edit.page?id=37 a href=?duplicateId=37 /td /tr tr td a href=edit.page?id=38AutoTestCreative/a /td td a onclick=return confirm('Delete creative?') href=delete.page?cid=38 a href=edit.page?id=38 a href=?duplicateId=38 *img title=Duplicate src=/tracker/images/skin2/bolean.png* /a /td /tr /tbody /table Implemenetd as below : @browser.img(:src = /tracker/images/skin2/bolean.png).click which is clicking on the first image. Help is much more appreciated. 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/groups/opt_out.
[wtr-general] Re: Waitir: Ignoring modal wait dialogs during ajax call
what if you add browser.text_field(:id, subscriber_id).wait_until_present(timeout = 100) before browser.text_field(:id, subscriber_id).set(1) On Saturday, April 20, 2013 7:56:08 PM UTC+10, Christian Scheid wrote: Hi, I'm just starting to use Waitir and have the following issue: The Waitir script is supposed to execute a search on a KendoUI Grid element which in turn displays a modal spinner when performing an ajax call to retrieve the search results. (script below). Waitir throws an UnhandledAlertError because a modal dialog is present (below). I've seen Waitir code to handle javascript pop ups but I haven't found a solution how to handle a modal pop-up without any buttons like a spinner. Any ideas? Thanks! *Error*: nsCommandProcessor.prototype.execute': Modal dialog present (Selenium::WebDriver::Error::UnhandledAlertError) *Script:* require 'watir' require 'watir-webdriver' browser = Watir::Browser.start http://localhost:8080/admin/index.php/login; browser.link(:text, Manage Members).wait_until_present browser.link(:text, Manage Members).click browser.text_field(:id, subscriber_id).set(1) browser.button(:value,Search).click -- -- 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.
[wtr-general] Re: Waitir: Ignoring modal wait dialogs during ajax call
There's a few funny things about your script. You really only need to require watir or watir-webdriver. If you're using the watir gem it'll either load the watir-classic gem, if you ask it for ie, or watir-webdriver gem if you ask it for chrome or firefox. Secondly, your syntax for starting a browser is incorrect. It should be .new not .start. browser = Watir::Browser.new :chrome As far as handling the alert, you can do something like this after you click on whatever element that causes the spinner to popup. This below will just wait until the dialog goes away. browser.alert.wait_while_present It's nice to see that you're using the wait methods. It seems lots of people who are just starting out end up using sleeps which is bad practice. You can actually collapse two lines into one like below as well. browser.link(:text, Manage Members).when_present.click On Saturday, April 20, 2013 5:56:08 AM UTC-4, Christian Scheid wrote: Hi, I'm just starting to use Waitir and have the following issue: The Waitir script is supposed to execute a search on a KendoUI Grid element which in turn displays a modal spinner when performing an ajax call to retrieve the search results. (script below). Waitir throws an UnhandledAlertError because a modal dialog is present (below). I've seen Waitir code to handle javascript pop ups but I haven't found a solution how to handle a modal pop-up without any buttons like a spinner. Any ideas? Thanks! *Error*: nsCommandProcessor.prototype.execute': Modal dialog present (Selenium::WebDriver::Error::UnhandledAlertError) *Script:* require 'watir' require 'watir-webdriver' browser = Watir::Browser.start http://localhost:8080/admin/index.php/login; browser.link(:text, Manage Members).wait_until_present browser.link(:text, Manage Members).click browser.text_field(:id, subscriber_id).set(1) browser.button(:value,Search).click -- -- 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.
[wtr-general] Re: Looking for click_no_wait functionality/solution for Browser.alert
How about using browser.alert.wait_while_present this will wait for the next line of code to execute until alert goes away On Friday, May 10, 2013 5:42:54 AM UTC+10, dubsbox wrote: I'm testing a home-grown shopping cart application which has scenarios where adding an item to the cart results in an alert pop-up appearing. Scenarios that have just a single alert pop-up can be handled with Browser.alert.ok. I have run into a couple of scenarios where adding an item to the cart results in multiple consecutive alert pop-ups that need to be cleared. The first alert can be cleared just fine with Browser.alert.ok. I am then unable to clear the second alert pop-up. Working this scenario in irb, I see that after issuing the first Browser.alert.ok command, the irb prompt is not returned. It seems like the second alert pop-up is blocking progress similar to when an alert pop-up is triggered by clicking a button with just .click instead of .click_no_wait. So, I'm wondering if anyone has run into a similar situation and has a solution. It looks like there is no .click_no_wait method defined for the alert pop-ups. For reference, my successful scenarios look like this: browser.button(:value,Add To Cart).click_no_wait # This triggers the alert pop-up. ($browser.wait_until(10) { $browser.alert.exists? }) ? ($browser.alert.ok) : () # Wait a bit and if alert pop-up exists, click OK. No additional alert pop-up appears. My unsuccessful scenarios are when an additional alert pop-up appears after clicking OK on the first alert pop-up. Thanks. Johnathan -- -- 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] Problem: Unable to validate HTML Report using Watir
Hi Zeilko, Below is the portion of HTML source code of the HTML Report from which i want to capture the value POC_Reports_test and store it in a varibale so that i can compare this value with the data in my application TD ROWSPAN=2 COLSPAN=3/TDTD COLSPAN=17DIV growRect=true style=WIDTH:204.21mm;min-width:204.21mm;HEIGHT:33.43mm; class= Abcc5464c1acc4c48b277f0e6d02ce75e12951TABLE CELLSPACING=0 CELLPADDING= 0 BORDER=0 COLS=25 LANG=en-US class= P9c6206ae5b8642a285ee60c6c4ec8c6b_1_r10TRTD style= HEIGHT:0.51mm;WIDTH:0.00mm/TDTD style=WIDTH:1.27mm;min-width:1.27mm /TDTD style=WIDTH:0.00mm;min-width:0.00mm/TDTD style= WIDTH:30.85mm;min-width:30.85mm/TDTD style= WIDTH:0.35mm;min-width:0.35mm/TDTD style= WIDTH:2.57mm;min-width:2.57mm/TDTD style= WIDTH:0.92mm;min-width:0.92mm/TDTD style= WIDTH:38.71mm;min-width:38.71mm/TDTD style= WIDTH:8.25mm;min-width:8.25mm/TDTD style= WIDTH:0.89mm;min-width:0.89mm/TDTD style= WIDTH:18.18mm;min-width:18.18mm/TDTD style= WIDTH:1.06mm;min-width:1.06mm/TDTD style= WIDTH:1.97mm;min-width:1.97mm/TDTD style= WIDTH:0.60mm;min-width:0.60mm/TDTD style= WIDTH:7.16mm;min-width:7.16mm/TDTD style= WIDTH:25.65mm;min-width:25.65mm/TDTD style= WIDTH:4.93mm;min-width:4.93mm/TDTD style= WIDTH:0.25mm;min-width:0.25mm/TDTD style= WIDTH:0.81mm;min-width:0.81mm/TDTD style= WIDTH:9.88mm;min-width:9.88mm/TDTD style= WIDTH:0.95mm;min-width:0.95mm/TDTD style= WIDTH:2.57mm;min-width:2.57mm/TDTD style= WIDTH:1.63mm;min-width:1.63mm/TDTD style= WIDTH:41.67mm;min-width:41.67mm/TDTD style= WIDTH:2.90mm;min-width:2.90mm/TD/TRTR VALIGN=topTD style= HEIGHT:0.16mm;WIDTH:0.00mm/TDTD COLSPAN=11/TDTD ROWSPAN=2 COLSPAN=2TABLE CELLSPACING=0 CELLPADDING=0 LANG=en-US style=TR TD style=WIDTH:2.57mm;min-width:2.57mm;HEIGHT:4.76mm; class= Abcc5464c1acc4c48b277f0e6d02ce75e12818:/TD/TR/TABLE/TDTD COLSPAN =11/TD/TRTR VALIGN=topTD style=HEIGHT:4.61mm;WIDTH:0.00mm/TD TD/TDTD COLSPAN=2TABLE CELLSPACING=0 CELLPADDING=0 LANG= en-US style=TRTD style= WIDTH:30.85mm;min-width:30.85mm;HEIGHT:4.76mm; class= Abcc5464c1acc4c48b277f0e6d02ce75e12821Relationship/TD/TR/TABLE/TD TD/TDTDTABLE CELLSPACING=0 CELLPADDING=0 LANG=en-US style= TRTD style=WIDTH:2.57mm;min-width:2.57mm;HEIGHT:4.76mm; class= Abcc5464c1acc4c48b277f0e6d02ce75e12824:/TD/TR/TABLE/TDTD/TD TD COLSPAN=2TABLE CELLSPACING=0 CELLPADDING=0 LANG=en-US style= TRTD style=WIDTH:46.96mm;min-width:46.96mm;HEIGHT:4.76mm; class= Abcc5464c1acc4c48b277f0e6d02ce75e12896POC_Reports_test/TD/TR/TABLE /TDTD Can you please let me know which method i should use to capture the value POC_Reports_test In similar way we want to capture all the values from HTML report and compare them against the values in application to ensure that values displayed in report are matching with the data in application. Thanks, Veera. On Thursday, 9 May 2013 15:48:46 UTC+5:30, Željko Filipin wrote: On Thu, May 9, 2013 at 9:06 AM, v b baba kanchustambham vbb...@gmail.comjavascript: wrote: I am unable to attach screen shot of the HTML report source here also. Do not attach screen shot, but copy/paste relevant HTML. Ž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.
Re: [wtr-general] Problem: Unable to validate HTML Report using Watir
Hi The report we are trying to generate from out web application is an SSRS Report, just want to add this Veera On Friday, 10 May 2013 08:45:13 UTC+5:30, v b baba kanchustambham wrote: Hi Zeilko, Below is the portion of HTML source code of the HTML Report from which i want to capture the value POC_Reports_test and store it in a varibale so that i can compare this value with the data in my application TD ROWSPAN=2 COLSPAN=3/TDTD COLSPAN=17DIV growRect=true style=WIDTH:204.21mm;min-width:204.21mm;HEIGHT:33.43mm; class= Abcc5464c1acc4c48b277f0e6d02ce75e12951TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0 COLS=25 LANG=en-US class= P9c6206ae5b8642a285ee60c6c4ec8c6b_1_r10TRTD style= HEIGHT:0.51mm;WIDTH:0.00mm/TDTD style= WIDTH:1.27mm;min-width:1.27mm/TDTD style= WIDTH:0.00mm;min-width:0.00mm/TDTD style= WIDTH:30.85mm;min-width:30.85mm/TDTD style= WIDTH:0.35mm;min-width:0.35mm/TDTD style= WIDTH:2.57mm;min-width:2.57mm/TDTD style= WIDTH:0.92mm;min-width:0.92mm/TDTD style= WIDTH:38.71mm;min-width:38.71mm/TDTD style= WIDTH:8.25mm;min-width:8.25mm/TDTD style= WIDTH:0.89mm;min-width:0.89mm/TDTD style= WIDTH:18.18mm;min-width:18.18mm/TDTD style= WIDTH:1.06mm;min-width:1.06mm/TDTD style= WIDTH:1.97mm;min-width:1.97mm/TDTD style= WIDTH:0.60mm;min-width:0.60mm/TDTD style= WIDTH:7.16mm;min-width:7.16mm/TDTD style= WIDTH:25.65mm;min-width:25.65mm/TDTD style= WIDTH:4.93mm;min-width:4.93mm/TDTD style= WIDTH:0.25mm;min-width:0.25mm/TDTD style= WIDTH:0.81mm;min-width:0.81mm/TDTD style= WIDTH:9.88mm;min-width:9.88mm/TDTD style= WIDTH:0.95mm;min-width:0.95mm/TDTD style= WIDTH:2.57mm;min-width:2.57mm/TDTD style= WIDTH:1.63mm;min-width:1.63mm/TDTD style= WIDTH:41.67mm;min-width:41.67mm/TDTD style= WIDTH:2.90mm;min-width:2.90mm/TD/TRTR VALIGN=topTD style= HEIGHT:0.16mm;WIDTH:0.00mm/TDTD COLSPAN=11/TDTD ROWSPAN=2 COLSPAN=2TABLE CELLSPACING=0 CELLPADDING=0 LANG=en-US style= TRTD style=WIDTH:2.57mm;min-width:2.57mm;HEIGHT:4.76mm; class= Abcc5464c1acc4c48b277f0e6d02ce75e12818:/TD/TR/TABLE/TDTD COLSPAN=11/TD/TRTR VALIGN=topTD style= HEIGHT:4.61mm;WIDTH:0.00mm/TDTD/TDTD COLSPAN=2TABLE CELLSPACING=0 CELLPADDING=0 LANG=en-US style=TRTD style= WIDTH:30.85mm;min-width:30.85mm;HEIGHT:4.76mm; class= Abcc5464c1acc4c48b277f0e6d02ce75e12821Relationship/TD/TR/TABLE/ TDTD/TDTDTABLE CELLSPACING=0 CELLPADDING=0 LANG=en-US style= TRTD style=WIDTH:2.57mm;min-width:2.57mm;HEIGHT:4.76mm; class= Abcc5464c1acc4c48b277f0e6d02ce75e12824:/TD/TR/TABLE/TDTD/TD TD COLSPAN=2TABLE CELLSPACING=0 CELLPADDING=0 LANG=en-US style =TRTD style=WIDTH:46.96mm;min-width:46.96mm;HEIGHT:4.76mm; class= Abcc5464c1acc4c48b277f0e6d02ce75e12896POC_Reports_test/TD/TR/TABLE /TDTD Can you please let me know which method i should use to capture the value POC_Reports_test In similar way we want to capture all the values from HTML report and compare them against the values in application to ensure that values displayed in report are matching with the data in application. Thanks, Veera. On Thursday, 9 May 2013 15:48:46 UTC+5:30, Željko Filipin wrote: On Thu, May 9, 2013 at 9:06 AM, v b baba kanchustambham vbb...@gmail.com wrote: I am unable to attach screen shot of the HTML report source here also. Do not attach screen shot, but copy/paste relevant HTML. Ž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.