[wtr-general] Watir 3.0.rc1 breaks select_value of a select list
A heads up that I created a bug report about an issue we experienced while testing our code with Watir 3.0.rc1. http://jira.openqa.org/browse/WTR-498 -- 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: Ie7 rich text editor issue
Sendkeys is not implemented at the level of the frame object in Watir. See http://rubydoc.info/gems/watir/2.0.4/Watir/IE#send_keys-instance_method On Jan 16, 6:28 pm, Joe Fl joeflec...@gmail.com wrote: Hi, I am working with IE7 and need to add a comment to rich text editor that is kept within a iframe. My current code works with Firefox but when I run the same code against IE i get the following error message: C:/Ruby193/lib/ruby/gems/1.9.1/gems/windows-api-0.4.0/lib/windows/ api.rb:4: Use RbConfig instead of obsolete and deprecated Config. C:/Ruby193/lib/ruby/gems/1.9.1/gems/watir-2.0.4/lib/watir/element.rb: 447:in `method_missing': undefined method `send_keys' for #Watir::Frame:0x12f65b8 (NoMethodError) from test_123.rb:37:in `main' Here is my code: #Add comment to Compose if @browser.frame(:id,roundtable_descriptionWidgIframe).exists? puts Option 1 @browser.frame(:id,roundtable_descriptionWidgIframe).send_keys Comment #{txt_fld_data} else puts Option 2 @browser.frame(:title,/Rich text editor/).send_keys Comment #{txt_fld_data} end Here is the HTML: span class=cke_browser_gecko role=presentation span class=cke_wrapper cke_ltr role=presentation table class=cke_editor cellspacing=0 cellpadding=0 border=0 role=presentation tbody tr role=presentation style=-moz-user-select: none; tr role=presentation td id=cke_contents_roundtable_description class=cke_contents role=presentation style=height:200px iframe frameborder=0 allowtransparency=true tabindex=0 src= title=Rich text editor, roundtable_description, press ALT 0 for help. style=width:100%;height:100% html class=CSS1Compat lang=en dir=ltr /iframe /td /tr tr role=presentation style=-moz-user-select: none; /tbody /table style /span /span Thank you, Joe -- 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: New Rich text editor in our web app
Normally you want the file installed on the filesystem of the virtual machine. Pick something that makes sense to you, most folks use a directory that is 'close-by' to where they have their scripts, or maybe a 'lib' directory off the root. It's up to you. You could do something very similar to what you have on the mac and have a 'common' directory below wherever your are storing the scripts Then create an environment variable on the windows box called RUBYLIB that points to that directory On Jan 17, 6:49 am, Joe Fleck joeflec...@gmail.com wrote: So, my mac is set up with the files on it in this location [user/josephfleck/Sites/with/qa_automation/common]. Would I use relative path because on the Windows VM the path is not the same. On Fri, Jan 13, 2012 at 5:16 PM, Chuck van der Linden sqa...@gmail.com wrote: I would only make a gem if you feel it would be of benefit to others etc. RUBYLIB is a name for an environment variable that tells ruby what directory to search when looking to find something you have a require statement for in the script. If you have your own utility library that you are putting somewhere on the system, you just need to create that environment variable on the system, and point it to that directory and ruby should then find your stuff when you require it in the script. On Jan 12, 5:26 pm, Joe Fleck joeflec...@gmail.com wrote: Hi Chuck, The file and scripts are stored on github for our team to use. I have pulled(clone) then down on to the windows VM. If I make changes to that class and files I need to push them back up to github for the qa team. I still about 3 to 4 months new to Watir and Ruby so I haven't done a RUBYLIB. I wonder if creating a gem with these would be a better alternative. What would I need to do for both? On Thu, Jan 12, 2012 at 5:31 PM, Chuck van der Linden sqa...@gmail.com wrote: Meh just realised you gave me what I needed,, Ignore the other response. Where is common/helpermethods installed? is that your own utility library (and not a gem) You may need to establish a 'RUBYLIB' environment variable in the windows box (let me know if you don't know how to do that) that points to the directory where you have that stuff. I use c:\lib for that kind of thing, but hey whatever works for you. avoid spaces unless you want to have to put stuff in quotes. Remember its windows/ dos and use a backslash and not slash (grin) On Jan 12, 7:54 am, Joe Fl joeflec...@gmail.com wrote: Sorry I setup a windows vm and the error above happens when I try and run the script. On Jan 12, 10:06 am, Joe Fl joeflec...@gmail.com wrote: Hi Chuck, I have set myself up with VMware Fusion and brought down my scripts and folders from github but how do I handle this? C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- common/helper_methods (LoadError) from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb: 36:in `require' from add_multiple_share_members_types.rb:7:in `main' Exit code: 1 Do I need to place the full path in the script? I use a csv file for input data in the app too. Code: # the rubygems require rubygems # the Watir webdriver controller require watir-webdriver require 'common/helper_methods' #require 'discussion/generate_sharing_data' require 'faster_csv' helper = HelperMethods.new($browser) #Call method to delete text from file name_of_file = 'multi_add_discussion_headers.txt' helper.delete_file_text(name_of_file) #Call method to delete text from file name_of_file = 'multi_add_discussion_reusable_data.txt' helper.delete_file_text(name_of_file) #Setting variable name with script name script_name = File.basename(__FILE__,.rb) Thank you, Joe On Jan 6, 7:51 pm, Chuck van der Linden sqa...@gmail.com wrote: well on a PC you can do that with either AutoIt, or Rautomation. Not so sure with the mac (although someone else may be able to help) I'm learning to be a mac user after years with windows systems, but when it comes to running watir I just do it through VM's hosted on the mac for a number of reasons, so while I technically run watir or watir- webdriver on a mac, I'm not actually running it on OSX On Jan 6, 10:57 am, Joe Fleck joeflec...@gmail.com wrote: Chuck, Thank you this was very helpful. I do have VMWare fusion so I will begin using it to run my scripts. I usually have this problem when developing my scripts. I development them in Netbeams (6.0) and run them from there. When you wrote this 'You may need to set focus to the browser window first.' did you mean manually or is there a method that will do this?
[wtr-general] Re: watirgrid and watir-webdriver-performance together?
seems like maybe the watirgrid is not starting up stuff based on watir- webdriver-performance since the method it thinks is missing is from that version of watir, and would be 'missing' in ordinary watir or watir-webdriver but I'm not enough of an expert in watirgrid to help you beyond stating the obvious thing you've probably already figured out. On Jan 17, 7:06 am, Dan dfra...@gmail.com wrote: This is the error I get. GridIt.rb:40: undefined method `peformance' for #Watir::Browser:0x32cf5f8 (NoMethodError) from C:/Users/wise-user-02/My Documents/Aptana Studio 3 Workspace/YaleStockMarket/GridIt.rb:66:in `join' from C:/Users/wise-user-02/My Documents/Aptana Studio 3 Workspace/YaleStockMarket/GridIt.rb:66 from C:/Users/wise-user-02/My Documents/Aptana Studio 3 Workspace/YaleStockMarket/GridIt.rb:66:in `each' from C:/Users/wise-user-02/My Documents/Aptana Studio 3 Workspace/YaleStockMarket/GridIt.rb:66 -- 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: Watir with a remote desktop
I had thought that the current versions of Loadrunner were up on current web tech, but it's been years since I used it. If you are running windows servers, then the loadtest tools that come with the 'ultimate' version of dev studio are generally the way to go. It does most of what loadrunner does (and more to some degree) in that environment and is far more cost effective. Great support too via the msdn forums. It's not practical to generate load using real browsers, it's also generally not necessary since all the server see's are HTTP requests anyway and can't really 'tell' if they are coming from a 'real browser' or not. Load tools also do a lot better job of instrumenting the system under test and can tell you if a disk queue is overloaded, a webserver is running out of memory, or any one out of hundreds of performance counters is out of a 'healthy' zone. In my experience it's that data that is key to figuring out where the constraints are so that the site can be improved to get to the performance levels required. You could use watir to measure the page load time etc when the server was under load, but in general a proper load tool, operating at the protocol level is far superior to trying to simulate a browser client. Even with a headless browser I think I'd have a hard time generating something like say oh 800 vusers worth of load from a single box, which is usually pretty easy with LR or VSTS. If you can see it 'going over the wire' in http format, you can generally simulate it with a good load tool. Usually it's mostly a matter of figuring out how to simulate any processing the client side code might be doing that actually affects what is sent over the wire. (most often it's just UI magic, and the key is knowing what parameters to look for and capture in the 'outbound' traffic from the server, so they can take their proper place in the requests sent back by the 'client' in subsequent requests. Yes you might be able to do some of that using watir-webdriver in a headless mode, but you would need to reinvent a lot of stuff such as how to feed unique parameters to each vuser, how to monitor transaction times and perf data, how to ramp up and ramp down load, etc etc On Jan 17, 9:03 am, Dan dfra...@gmail.com wrote: So, maybe it's not practical with real browsers to do performance testing with watir, but maybe it becomes more practical when you run the browser headless with watir-webdriver? Where I am we use loadrunner, but we're finding it challenging to deal with apps written using gwt. Obviously there's some nice metrics and reporting that come out of loadrunner, but for those cases where it's just not up to the technology like watir is, maybe it's a feasible option. -- 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: Watir-webdriver seeing a null style attribute as display: none;
I would use a developer tool to backtrace the CSS rules for that element. The style could be coming from CSS rules. That is especially common for stuff that is displayed or hidden according to mouse hover where that is controlled via a CSS psuedoclass If that is the case, there was a .hover method recently added to watir- webdriver in an attempt to address this, try firing that against the method first, then see if you can click it. On Jan 17, 1:09 pm, Abe Heward abe.hew...@gmail.com wrote: On a page I'm testing, I have a div that Firebug shows like this: div id=joinrequestbuttons_widget style= That div is a parent of a number of buttons that are displayed or hidden depending on circumstance. When I have watir-webdriver show me the HTML of that div, however, this is what it returns: div id=joinrequestbuttons_widget style=*display: none;* This is not good, because it means that all children of that div are seen as hidden, when they're actually not. I need to be able to click those buttons. Does the style= need to be explicitly made into style=display: block; for watir-webdriver to handle it correctly? -- 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: Not able to select table data inside an table which is having no unique identity.
For the first three things you listed, I see nothing with 'reportType' listed in the HTML you posted, so I have no idea what those are trying to do. For the the next three things you list, There's more than one table row in that table with the class of item which would cause two of those three to fail because they would be looking in the row wrapped around the 'Summary' cell and thus unable to find within that row a cell with text 'Detail' However on the face of things, this one here should have worked. $ie.table(:class, grid-btable).div(:class, comboboxpp).td(:text, 'Detail').click Knowing the exact error given for that one might be useful Looking at the entire HTML are you sure that the 'grid-btable' class is unique? and that within that the class 'comboboxpp' is also unique? by the looks of the HTML you may have a lot of nested tables there (I see two implicit and one inferred in the HTML you presented so it may be that you are having an issue getting the right instance of one of those. an easy way to test for this is to try something like this from an IRB prompt when you are on the right page $ie.tables(:class, grid-btable).size If there is only one, the size will be 1, if there's more than one, then that could be your problem. On Jan 17, 3:42 pm, Bhavesh bhavesh1_sha...@yahoo.com wrote: Hi, I have table, inside it i have table row, which interm have data [text] as Summary and Detail. Source code from IE is : TABLE class=grid-btable cellSpacing=0 cellPadding=0 width=100% border=0 TBODY id=z_f2_rh TR class=grid id=z_f2_sh style=BORDER-RIGHT: white 0px solid; BORDER-TOP: white 0px solid; BACKGROUND: white; BORDER-LEFT: white 0px solid; BORDER-BOTTOM: white 0px solid z.type=Grw z.rid=z_f2_4g z.inited=true TD class=gc id=z_f2_th!chdextr style=BORDER-RIGHT: white 0px solid; BORDER-TOP: white 0px solid; BACKGROUND: white; BORDER-LEFT: white 0px solid; BORDER-BOTTOM: white 0px solid z.type=Gcl DIV class=gc cell-inner id=z_f2_th!cellSPAN id=z_f2_th style=WIDTH: 115pxName:/SPAN/DIV/TD TD class=gc id=z_f2_vh!chdextr style=BORDER-RIGHT: white 0px solid; BORDER-TOP: white 0px solid; BACKGROUND: white; BORDER-LEFT: white 0px solid; BORDER-BOTTOM: white 0px solid z.type=Gcl DIV class=gc cell-inner id=z_f2_vh!cellINPUT class=text id=z_f2_vh style=WIDTH: 450px maxLength=100 z.type=zul.widget.Txbox/DIV/TD TD class=gc id=z_f2_uh!chdextr style=BORDER-RIGHT: white 0px solid; BORDER-TOP: white 0px solid; BACKGROUND: white; BORDER-LEFT: white 0px solid; BORDER-BOTTOM: white 0px solid z.type=Gcl DIV class=gc cell-inner id=z_f2_uh!cellSPAN id=z_f2_uh style=WIDTH: 115px(Limit 100 characters)/SPAN/DIV/TD/TR TR class=grid odd id=z_f2_0i style=BORDER-RIGHT: white 0px solid; BORDER-TOP: white 0px solid; BACKGROUND: white; BORDER-LEFT: white 0px solid; BORDER-BOTTOM: white 0px solid z.type=Grw z.rid=z_f2_4g z.inited=true TD class=gc id=z_f2_1i!chdextr style=BORDER-RIGHT: white 0px solid; BORDER-TOP: white 0px solid; BACKGROUND: white; BORDER-LEFT: white 0px solid; BORDER-BOTTOM: white 0px solid z.type=Gcl DIV class=gc cell-inner id=z_f2_1i!cellSPAN id=z_f2_1i style=WIDTH: 115pxType:/SPAN/DIV/TD TD class=gc id=z_f2_4i!chdextr style=BORDER-RIGHT: white 0px solid; BORDER-TOP: white 0px solid; BACKGROUND: white; BORDER-LEFT: white 0px solid; BORDER-BOTTOM: white 0px solid z.type=Gcl DIV class=gc cell-inner id=z_f2_4i!cellSPAN class=combobox id=z_f2_4i z.type=zul.cb.Cmbox z.combo=trueINPUT class=comboboxinp readonly id=z_f2_4i!real readOnly value=Summary autocomplete=offSPAN class=rbtnbk id=z_f2_4i!btn style=PADDING- BOTTOM: 2px; PADDING-TOP: 3px; POSITION: relative; TOP: 1pxIMG src=https://vm-bhaveshok2.kazeon.local/reports/zkau/web/zul/img/ combobtn.gif/SPAN DIV class=comboboxpp id=z_f2_4i!pp style=DISPLAY: none tabIndex=-1 TABLE id=z_f2_4i!cave cellSpacing=0 cellPadding=0 TBODY TR class=item id=z_f2_2i z.type=Cmit z.disd=false TD/TD TDSummary/TD/TR TR class=item id=z_f2_3i z.type=Cmit z.disd=false TD/TD TDDetail/TD/TR/TBODY/TABLE/DIV/SPAN/DIV/TD/TR Im looking at last 8 lines. There is no name, class for this table. only there is dynamic id generated. I want to select text Detail: out of this combobox. Can someone help how can i do it. Im using watir webdriver. I tried like : $ie.table(:class, grid-btable).cell(:class = item, :text = reportType).click $ie.input(:value, Summary).select(reportType) $ie.input(:value, Summary).select(reportType) $ie.table(:class, grid-btable).div(:class, comboboxpp).tr(:class, item).td(:text, Detail).click $ie.table(:class, grid-btable).div(:class, comboboxpp).td(:text, 'Detail').click $ie.div(:class, comboboxpp).tr(:class, item).td(:text, Detail).click But all failed with some or other error like not able to find element etc. Bhavesh -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com
Re: [wtr-general] Re: Watir-webdriver seeing a null style attribute as display: none;
Is there any documentation about the hover method? i just went looking (its pretty exciting for me) and i could not find it in the docs On Wed, Jan 18, 2012 at 5:17 PM, Chuck van der Linden sqa...@gmail.comwrote: I would use a developer tool to backtrace the CSS rules for that element. The style could be coming from CSS rules. That is especially common for stuff that is displayed or hidden according to mouse hover where that is controlled via a CSS psuedoclass If that is the case, there was a .hover method recently added to watir- webdriver in an attempt to address this, try firing that against the method first, then see if you can click it. On Jan 17, 1:09 pm, Abe Heward abe.hew...@gmail.com wrote: On a page I'm testing, I have a div that Firebug shows like this: div id=joinrequestbuttons_widget style= That div is a parent of a number of buttons that are displayed or hidden depending on circumstance. When I have watir-webdriver show me the HTML of that div, however, this is what it returns: div id=joinrequestbuttons_widget style=*display: none;* This is not good, because it means that all children of that div are seen as hidden, when they're actually not. I need to be able to click those buttons. Does the style= need to be explicitly made into style=display: block; for watir-webdriver to handle it correctly? -- 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] Re: Watir 3.0.rc1 breaks select_value of a select list
I note this change listed which might impact that SelectList code rewritten, causing changes in its API However I don't see much in the way of details. Given that select_value is present in watir-webdriver I'm pretty sure those changes did not include removing that method (nor did your error indicate that is the case) good to have the report. This is why we have RC releases. Seems like we might need some unit tests or rspecs to cover this particular case. On Jan 18, 11:59 am, Michael mmcwill...@gmail.com wrote: A heads up that I created a bug report about an issue we experienced while testing our code with Watir 3.0.rc1. http://jira.openqa.org/browse/WTR-498 -- 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: Watir-webdriver seeing a null style attribute as display: none;
That commit ( https://github.com/watir/watir-webdriver/commit/f9414dd76439fe95e175c81419db9b1376e54488 ) was made after the most recent release, you'd have to pull from github at https://github.com/watir/watir-webdriver and build locally. Or wait for the next release which would include this commit. pay careful attention to the cases listed where it won't work. I expect you'll see it in the rdoc once a new release is out (or if you build locally) On Jan 18, 2:45 pm, bis bis...@gmail.com wrote: Is there any documentation about the hover method? i just went looking (its pretty exciting for me) and i could not find it in the docs On Wed, Jan 18, 2012 at 5:17 PM, Chuck van der Linden sqa...@gmail.comwrote: I would use a developer tool to backtrace the CSS rules for that element. The style could be coming from CSS rules. That is especially common for stuff that is displayed or hidden according to mouse hover where that is controlled via a CSS psuedoclass If that is the case, there was a .hover method recently added to watir- webdriver in an attempt to address this, try firing that against the method first, then see if you can click it. On Jan 17, 1:09 pm, Abe Heward abe.hew...@gmail.com wrote: On a page I'm testing, I have a div that Firebug shows like this: div id=joinrequestbuttons_widget style= That div is a parent of a number of buttons that are displayed or hidden depending on circumstance. When I have watir-webdriver show me the HTML of that div, however, this is what it returns: div id=joinrequestbuttons_widget style=*display: none;* This is not good, because it means that all children of that div are seen as hidden, when they're actually not. I need to be able to click those buttons. Does the style= need to be explicitly made into style=display: block; for watir-webdriver to handle it correctly? -- 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.comhttp://groups.google.com/group/watir-general%0Awatir-general+unsubscr... -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
[wtr-general] Re: Hard to get to link
Thank you, John. I actually fat fingered something.. ie.link(:text, Map).href works just fine. I was thinking that it I had to daisy chain more elements to find what I was looking for, which is the case if there are forms found on a specific page, etc. Have a great day! -- 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