[wtr-general] Re: Option in select
Please help On Dec 1, 12:22 pm, Shlomit Gazit shlomitpatr...@gmail.com wrote: The thing is for testing I dont want to go through all the select options since it is a lot. I want to have only one from each. I have about 11 select items with variedoptiontitles, and these options are repeating with different texts, so I want to test only the 11 options. Is that clear? On Nov 29, 10:55 am, Chuck van der Linden sqa...@gmail.com wrote: Anotheroptionmight be to use the 'select_item_in_select_list' method but from what I'm seeing that only lets you select it by either the displayed label (:text) or the underlying value (:value) seehttp://rdoc.info/gems/watir/1.6.7/Watir/SelectList#select_item_in_sel... Is there a particular reason you need to use title? How would a normal user know whichoptionitem in the select list they wanted to choose? On Nov 24, 3:35 pm, orde ohil...@gmail.com wrote: I don't ever find myself using xpath, but you could look here:http://wiki.openqa.org/display/WTR/XPath Hope it helps. orde On Nov 24, 3:01 pm, Shlomit Gazit shlomitpatr...@gmail.com wrote: I am not sure I know how. could I get help on that? On Nov 24, 1:16 am, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Tue, Nov 23, 2010 at 8:47 PM, Shlomit Gazit shlomitpatr...@gmail.com wrote: Is there anoptionto use title foroption? This is the html code: optionid=http://semanticweb.databaserepublic.com/c2p/systemData/ searchField#attachmentTargetItself value=341 title=true,Inner Search,^50$|^62$|^56$,attachmentTargetItselfAttachment::/option Did you try? Željko -- watir.com - community manager watirpodcast.com - host testingpodcast.com - audio podcasts on software testing. all of them- Hide quoted text - - Show quoted text - -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
[wtr-general] some more details on CSS
hello guys, can someone give me more tut of how to use CSS. not able to understand the tut available in watir site http://wiki.openqa.org/display/WTR/CSS -- 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: click_no_wait fails for button to open modal dialog (Win XP, Ruby 1.8.6.26, Watir 1.6.7)
Hi all, Thanks for all the posts. I am not really trying to access the button by using unique_number. The click_no_wait function in element class passes the command to spawned_click_no_wait_command which refers to the element using unique_number. I have seen the example on the page: http://wiki.openqa.org/display/WTR/Modal+Dialogs. And, there is not problem of page hanging up after click_no_wait is used to click on button for modal dialog. So, in this case, WATIR is able to access the button using unique_number. However, in my case it is not. Also, I verified that click_no_wait is using the correct hwnd. I have no clue what to do with this. Kushal On Dec 3, 7:03 am, Arto Vuori vuo...@iki.fi wrote: You're right, I don't really need to do that. Thanks for helping out! --A. Vuori On 1 joulu, 10:38, Jarmo Pertman jarm...@gmail.com wrote: Why are you running your tests in $DEBUG mode anyway? There should be a lot of information in your console if $DEBUG is enabled all the time. Do you really need it? It seems to me that you're just doing it wrong if it's enabled for your whole testsuite... You can monkey-patch that if it's really needed: module Watir class Element def spawned_click_no_wait_command(command) command = -e #{command.inspect} start rubyw #{command} end end end end Jarmo Pertman - IT does really matter -http://www.itreallymatters.net On Nov 30, 8:36 am, Arto Vuori vuo...@iki.fi wrote: Ah, there seems to be a design decision between debugging click_no_waitoutput and breaking the method in debug mode. The latter was confusing, the former was on the other hand very helpful initially. Could there be another way of debugging the output of click_no_wait, as now it is not possible to run tests (that are using click_no_wait) in debug mode at all? Therefore, I must leave my change in place. --A. Vuori On 30 marras, 02:27, Jarmo Pertman jarm...@gmail.com wrote: Arto Vuori: #click_no_waitis only blocking intentionally when $DEBUG is true. As soon as you use it normally (e.g. $DEBUG being false) then start rubyw is used to perform the click itself thus the change made by you should not be needed and it should work without that either. Just make sure that $DEBUG is not true :) -- 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't click on a nameless div
I'm running Ruby1.8.7 patchlevel 249 with Watir 1.6.7 on WinXP. I'm trying to click on the text Add Another State on a web page. It looks like a link, but I am having trouble hooking onto it. The structure is: div class=mainModule form name=stateBar id=stateBar action=http://www.website.com/ insert method=post div span id=writeBar/ div style=text-align: right; width a onclick=addState(3); $('a[id ^=dellink]'.show(); return false; href=# Text - Add Another State Text - Empty Text Node I've tried the following unsuccessfully. I tried to use flash also and didn't see anything highlighted either. ie.div(:class=mainModule).div(:text=Add Another State).click ie.div(:class=mainModule).div(:href=#).click ie.span(:text,Add Another State).link(:text,Add Another State).click Maybe there's no way to do what I want, even knowing that would help! -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
[wtr-general] Re: Can't click on a nameless div
Hi! Is this the only instance of the 'Add Another State' text? Maybe you've tried more than the code you listed, but if you haven't, you may be making this harder than you need to. Have you tried just accessing it as a span or link? ie.link(:text, 'Add Another State').click ie.span(:text, 'Add Another State').click Hope this helps! -Tiffany On Dec 7, 3:21 pm, LizLeong elc.le...@gmail.com wrote: I'm running Ruby1.8.7 patchlevel 249 with Watir 1.6.7 on WinXP. I'm trying to click on the text Add Another State on a web page. It looks like a link, but I am having trouble hooking onto it. The structure is: div class=mainModule form name=stateBar id=stateBar action=http://www.website.com/ insert method=post div span id=writeBar/ div style=text-align: right; width a onclick=addState(3); $('a[id ^=dellink]'.show(); return false; href=# Text - Add Another State Text - Empty Text Node I've tried the following unsuccessfully. I tried to use flash also and didn't see anything highlighted either. ie.div(:class=mainModule).div(:text=Add Another State).click ie.div(:class=mainModule).div(:href=#).click ie.span(:text,Add Another State).link(:text,Add Another State).click Maybe there's no way to do what I want, even knowing that would help! -- 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: some more details on CSS
Hi! Can you please provide some detail about the issue you're having? If you're having trouble with the tutorial, can you specify where it's losing you? None of us has the time to create a new tutorial here in Watir General, but if we understand your problem or where the tutorial falls short, we may be able to update it. Thanks! -Tiffany On Dec 7, 11:43 am, Hrishikesh Bose hrishikesh.b...@gmail.com wrote: hello guys, can someone give me more tut of how to use CSS. not able to understand the tut available in watir sitehttp://wiki.openqa.org/display/WTR/CSS -- 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: Data Driven testing
Hi Kay! You may have already found this in your search, but the Ruby on Windows blog has really helped me: http://rubyonwindows.blogspot.com/ Hope this helps! -Tiffany On Dec 6, 9:50 am, Kay karthigaya...@gmail.com wrote: Cheers Dave. @Zelijko: cannot use Roo as I am using Jruby. Cheers, Kay On Dec 6, 2:32 pm, Dave McNulla mcnu...@gmail.com wrote: Kay, I would recommend against validating data unless it's absolutely necessary. You should be able to submit the data that will support the test you are running then you run the test, then you clean up the data. The first and last steps may be done through sql commands, API calls, or web services calls. What does this give you? Knowledge that failures are in the software and not in the a change to the sample data. You also don't have to worry about burned data, which could be quite the problem if you are working in getting your tests right to begin with. Of course that depends on cooperation and trust in the test teams. Good luck, Dave On Dec 6, 6:19 am, Kay karthigaya...@gmail.com wrote: Thanks Zelijko, will look at it. Cheers, Kay On Dec 6, 9:34 am, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Sun, Dec 5, 2010 at 10:58 PM, Kay karthigaya...@gmail.com wrote: The test data is provided by a seperate data team to us in the form of excel spreadsheet Watir just drives browser(s). It does not know anything about Excel. There are other tools that know about it, for example roo[1]. Watir is just a Ruby library (Ruby is programming language). Google for excel ruby (without quotes) and you will probably find something. [1]http://roo.rubyforge.org/ Željko -- watir.com - community manager watirpodcast.com - host testingpodcast.com - audio podcasts on software testing. all of them -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] Can't click on a nameless div
you could try using a fire event statment such as @browswer.link(:text, Add Another State).fire_event(onmousedown) or similar... On Tue, Dec 7, 2010 at 2:21 PM, LizLeong elc.le...@gmail.com wrote: I'm running Ruby1.8.7 patchlevel 249 with Watir 1.6.7 on WinXP. I'm trying to click on the text Add Another State on a web page. It looks like a link, but I am having trouble hooking onto it. The structure is: div class=mainModule form name=stateBar id=stateBar action=http://www.website.com/ insert method=post div span id=writeBar/ div style=text-align: right; width a onclick=addState(3); $('a[id ^=dellink]'.show(); return false; href=# Text - Add Another State Text - Empty Text Node I've tried the following unsuccessfully. I tried to use flash also and didn't see anything highlighted either. ie.div(:class=mainModule).div(:text=Add Another State).click ie.div(:class=mainModule).div(:href=#).click ie.span(:text,Add Another State).link(:text,Add Another State).click Maybe there's no way to do what I want, even knowing that would help! -- 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: Can't click on a nameless div
If browser.link(:text,Add Another State).click does't work, try browser.link(:text, /Add Another State/).click. If neither of those work, you may need to use the fire_event method (see http://wtr.rubyforge.org/rdoc/1.6.5/classes/Watir/Element.html#M000557). Example: browser.link(:text, /Add Another State/).fire_event(onclick) Hope it helps. orde On Dec 7, 2:21 pm, LizLeong elc.le...@gmail.com wrote: I'm running Ruby1.8.7 patchlevel 249 with Watir 1.6.7 on WinXP. I'm trying to click on the text Add Another State on a web page. It looks like a link, but I am having trouble hooking onto it. The structure is: div class=mainModule form name=stateBar id=stateBar action=http://www.website.com/ insert method=post div span id=writeBar/ div style=text-align: right; width a onclick=addState(3); $('a[id ^=dellink]'.show(); return false; href=# Text - Add Another State Text - Empty Text Node I've tried the following unsuccessfully. I tried to use flash also and didn't see anything highlighted either. ie.div(:class=mainModule).div(:text=Add Another State).click ie.div(:class=mainModule).div(:href=#).click ie.span(:text,Add Another State).link(:text,Add Another State).click Maybe there's no way to do what I want, even knowing that would help! -- 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: click_no_wait fails for button to open modal dialog (Win XP, Ruby 1.8.6.26, Watir 1.6.7)
Hi, I had a similiar problem that began when I started using IE8. I found (and could be wrong) that WinClicker didn't seem to handle the popup, so, I am now using the method clickprompt which I borrowed from http://wiki.openqa.org/display/WTR/JavaScript+Pop+Ups It works for IE8 and IE7. -- 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 object error
Hi, The page I am testing, gets loaded after the login page. I have written Watir script for logging in also which works fine. The problem is Watir scxript is not able to locate any of the elements on the page even if I have tried to access them using different parameters like :name,:id,:text etc. Is there any specific reasons for this? Initially I thought my Ruby installation got corrupted, but surprsingly it works fine for other applications. Please advise. Thanks in advance. Regards, Sudeep On Mon, Dec 6, 2010 at 7:38 PM, sudeep pattnaik sudeeppattn...@gmail.comwrote: Hi Željko, You are right. when the page is loaded, the select is there and the value in it is none and by default it gets set to Operational Control in a span of 2 secs. So I think I have to make the control wait for the time till the value gets changed to Operational Control and then set it to Audits. Sudeep. On Mon, Dec 6, 2010 at 7:22 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Mon, Dec 6, 2010 at 2:42 PM, Sudeep sudeeppattn...@gmail.com wrote: browser.select_list(:name,ModuleID).set(Audits) option value=13nbsp;nbsp;nbsp;Audits Maybe one of these would work: browser.select_list(:name,ModuleID).set( Audits) browser.select_list(:name,ModuleID).set(/Audits/) Does this flash the select list? browser.select_list(:name,ModuleID).flash Is the select list on the page? Maybe it appears later, or it is hidden. Ž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: some more details on CSS
understand that Tiffany. Neither i am asking anyone to invest there precious time in creating a new tut. what i wanted to know if someone has used CSS so that can share there exp, if they want to. Since in watir, we have different methods for recognize the object with xpath, regex, index, i worked with them and was not able to use them properly so was thinking of utilizing the CSS. my bad, the webportal i am trying to automate is not that testable :( On Wed, Dec 8, 2010 at 4:22 AM, Tiffany Fodor tcfo...@comcast.net wrote: Hi! Can you please provide some detail about the issue you're having? If you're having trouble with the tutorial, can you specify where it's losing you? None of us has the time to create a new tutorial here in Watir General, but if we understand your problem or where the tutorial falls short, we may be able to update it. Thanks! -Tiffany On Dec 7, 11:43 am, Hrishikesh Bose hrishikesh.b...@gmail.com wrote: hello guys, can someone give me more tut of how to use CSS. not able to understand the tut available in watir sitehttp:// wiki.openqa.org/display/WTR/CSS -- 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