Re: [wtr-general] Re: Executing a javascript command in firewatir
On Wed, Jan 12, 2011 at 2:50 AM, xguarder shams...@gmail.com wrote: not sure how to do them quickly in a sequence. browser.element(how, what).fire_event onclick browser.element(how, what).fire_event onmousedown ... Ž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
Re: [wtr-general] Re: Recent Stack Overflow Questions Tagged Watir
http://stackoverflow.com/questions/4661400/it-seems-as-though-firewatir-is-not-being-found-when-trying-to-run-my-script http://stackoverflow.com/questions/4664155/how-to-handle-tinymce-when-automating-with-watir-webdriver -- 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 on OK Button + click_no_wait problem
Out of curiosity - why you didn't want to use the Simplest way to stop JavaScript Pop Ups from showing when running your Watir tests? Jarmo On Jan 10, 2:16 pm, Preethi preethi.sivaku...@gmail.com wrote: Thanks a ton for advising me to go for higher version of WATIR. I un-installed my older version and installed WATIR 1.7.1. The above code snippet which i shared above(startclicker) throws some error in my console --- --- ..winclicker.rb:305: [BUG] Segmentation fault ruby 1.8.6 . this application has requested the runtime to terminate it in unusual way. --- --- but I tried withhttp://wiki.openqa.org/display/WTR/JavaScript+Pop+Ups (clickPrompt solution#7) and it is working perfectly for me. Regards Preethi. On Jan 10, 2:36 pm, Jarmo Pertman jarm...@gmail.com wrote: It should be working if you're using newer version of Watir than 1.6.5 or just use the simplest way to avoid popups at all without any need to use #click_no_wait as described athttp://wiki.openqa.org/display/WTR/JavaScript+Pop+Ups Jarmo On Jan 10, 11:16 am, Preethi preethi.sivaku...@gmail.com wrote: There seems to be a tickethttp://jira.openqa.org/browse/WTR-320 where it is mentioned that click_no_wait just flashes the button but doesn't click that! Is that still open? if Yes , what is the alternative for that? I'm desperately looking for some solution so that I can move ahead. Thanks Preethi. On Jan 10, 9:09 am, Preethi preethi.sivaku...@gmail.com wrote: Dave, Thanks for the response. This is the javascript snippet which is called and produces alert function validateFields(){ var sid=document.forms(1).ScheduleID.value; sid=Trim(sid); if(sid==) { alert(scheduleID cant be Empty); document.forms(1).ScheduleID.focus(); return false;} else if(validateID(sid)==false){ alert(Oops! A Schedule with the same name already exists!); document.forms(1).ScheduleID.focus(); return false;} . . ..code continues and I use IE Version 7. Let me know if you can reproduce the issue or you need more info. PS: Somewhere in a forum, it is said that click_no_wait doesn't work with any version of ruby other than ruby 1.8.6-26. Is that true? because I have version 1.8.6-p398. Thanks Preethi On Jan 6, 12:41 pm, Dave McNulla mcnu...@gmail.com wrote: Do you have sample html code (from the web application under test) that people can try out? If you could please treat this like a bug report, you would be sure to put a way for everybody to reproduce the problem. You might also show the version of IE you are using. Thanks, Dave On Jan 5, 9:57 pm, Preethi preethi.sivaku...@gmail.com wrote: Is this problem with Wait time which is less. I've searched everywhere in the group for similar post and didn't find any. Please help. On Jan 6, 10:39 am, Preethi preethi.sivaku...@gmail.com wrote: Hello Watir Experts! I'm experincing some problems following solutions given inhttp://wiki.openqa.org/display/WTR/JavaScript+Pop+Ups When i use Click = the code stops execution there So i usedClick_no_waitso that code proceeds further. But the problem here is that , When i useClick_no_waitmy browser doesn't show a popup at all and the startClicker method waits till wait time and produces exception I dont know where I'm wrong Please help me am struck. Below is code snippet buttonCreateSave.click_no_wait #produces javascript alert box startClicker(OK,7,nil) my startClicker method is as follows == def startClicker( button , waitTime= 9, user_input=nil ) hwnd = $ie.enabled_popup(waitTime) if (hwnd) # yes there is a popup w = WinClicker.new if ( user_input ) w.setTextValueForFileNameField( hwnd, #{user_input} ) end w.clickWindowsButton_hwnd( hwnd, #{button} ) w=nil end end- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text -- 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] button type = submit + Click
Hi Experts I have a button in my page with the html code span id=ADloginWSLSubmitButtoninput type=submit value=I Concur / span I used the code like button(:id, one).click But when i run it is not clicking the button Please help thanks aravind -- 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] button type = submit + Click
On Wed, Jan 12, 2011 at 3:54 PM, Aravind aravindredd...@gmail.com wrote: input type=submit value=I Concur button(:id, one).click Try this: button(:value = I Concur ).click Ž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] button type = submit + Click
Thanks Filipin it worked thanks aravind On Wed, Jan 12, 2011 at 8:24 PM, Aravind aravindredd...@gmail.com wrote: Hi Experts I have a button in my page with the html code span id=ADloginWSLSubmitButtoninput type=submit value=I Concur /span I used the code like button(:id, one).click But when i run it is not clicking the button Please help thanks aravind -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] Watir virtual appliances?
Hi Željko, I'll make VMs available for Linux. The Windows VM can be made available as Amazon EC2 AMIs for those who are willing to run their VMs in the cloud. Emmanuel On 1/11/2011 10:14 AM, Željko Filipin wrote: On Tue, Jan 11, 2011 at 4:06 PM, Emmanuel Cecchet cecc...@gmail.com mailto:cecc...@gmail.com wrote: Does anyone know if there are virtual machines available (Xen, VMWare, AMI, ...) with Watir and version of browsers that are known to work fine together? No as far as I know. If not, is there any plan for the dev team to build such VMs (that could be used for testing) and make them available? No as far as I know. Watir is open source. Feel free to build VMs yourself. The only problem I see it that they will have to be based only on Linux (and similar OSes), because you can not distribute Windows or Mac virtual machines. If you build a VM(s) let us know, maybe we will find a place to host it. Watir VM(s) sound like a good idea to me. Željko -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
[wtr-general] Re: Executing a javascript command in firewatir
Mootools develper comments are: http://www.electricprism.com/aeron/calendar/#features I have tried to make Calendar as semantic as possible–with proper usage of CAPTION, THEAD, TBODY, TH and TD elements–and lots of CSS styling hooks. ... On Jan 12, 3:04 am, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Wed, Jan 12, 2011 at 2:50 AM, xguarder shams...@gmail.com wrote: not sure how to do them quickly in a sequence. browser.element(how, what).fire_event onclick browser.element(how, what).fire_event onmousedown ... Željko -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
[wtr-general] Re: Executing a javascript command in firewatir
Whoops... entered my send too fast Here's the prototype of the form from mootools div class=calendar div table caption a class=prevlt;/a span class=month[Month]/span span class=year[Year]/span a class=nextgt;/a /caption thead tr thS/th thM/th thT/th thW/th thT/th thF/th thS/th /tr /thead tbody tr td30/td td31/td td class=invalid1/td td class=invalid2/td td class=valid3/td td class=inactive4/td td class=active5/td /tr tr ... /tr tr ... /tr tr ... /tr tr ... /tr tr ... /tr /tbody /table /div /div On Jan 12, 10:16 am, Super Kevy kpe...@scholarshipamerica.org wrote: Mootools develper comments are:http://www.electricprism.com/aeron/calendar/#features I have tried to make Calendar as semantic as possible–with proper usage of CAPTION, THEAD, TBODY, TH and TD elements–and lots of CSS styling hooks. ... On Jan 12, 3:04 am, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Wed, Jan 12, 2011 at 2:50 AM, xguarder shams...@gmail.com wrote: not sure how to do them quickly in a sequence. browser.element(how, what).fire_event onclick browser.element(how, what).fire_event onmousedown ... Željko- 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] Automating the object with in TD tag
Hi, I have an object with TD tag with out any object type specified. That is actually a tag in the application. please find the HTML code below TR TD class=styleTabUnSelected id=S3Role #text SCRIPT and goes like this if i spy the tab i am getting the below Attributs, Name Value align left background-image(css) url(../images/AsTabBackMiddle.gif) class styleTabUnSelected= color(css) #00 cursor(css) pointer height 24 id S3Role onclick JavaScript:pushTab('S3Role'); onmouseout JavaScript:mouseOutTab('S3Role') onmouseover JavaScript:mouseOverTab('S3Role') style BACKGROUND-IMAGE: url(../images/ AsTabBackMiddle.gif); CURSOR: pointer; COLOR: #00 I am very new to Ruby kindly provide your ideas. -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
[wtr-general] Problem with firewatir hanging on close
Hi, I've been seeing a very sporadic issue with closing a firefox instance with firewatir 1.6.7. I'm running the following code to attach to an existing window and close it: require rubygems require watir Watir::Browser.default = 'firefox' puts('ruby: attaching to browser') b = Watir::Browser.attach(:title, /.*/); puts('ruby: closing browser') b.close puts('ruby: browser closed') Rarely, maybe 1 in 15 times this hangs and I don't get the ruby: browser closed line printed to standard out. When I hit CTRL-C I get the following trace. C:/Ruby186/lib/gems/1.8/gems/firewatir-1.6.7/lib/firewatir/ jssh_socket.rb:63:in 'recv': Interrupt from C:/Ruby186/lib/gems/1.8/gems/firewatir-1.6.7/lib/firewatir/ jssh_socket.rb:63:in 'read_socket' from C:/Ruby186/lib/gems/1.8/gems/firewatir-1.6.7/lib/firewatir/ jssh_socket.rb:54:in 'each' from C:/Ruby186/lib/gems/1.8/gems/firewatir-1.6.7/lib/firewatir/ jssh_socket.rb:63:in 'read_socket' from C:/Ruby186/lib/gems/1.8/gems/firewatir-1.6.7/lib/firewatir/ jssh_socket.rb:63:in 'js_eval' from C:/Ruby186/lib/gems/1.8/gems/firewatir-1.6.7/lib/firewatir/ firefox.rb:220:in 'close' from ./Ruby/close.rb:8 I've seen this across a number of Windows 7 systems, all 3.6.* versions of Firefox, all systems only had one instance fo Firefox open with one tab open two. Although I say I've seen this happen 1 in 15 times, I've also managed to run 100 tests in a row that do the same thing and have no problem. This is really starting to annoy me now. Anyone have any suggestions? -- 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] Automating the object with in TD tag
I'm not sure what your question is? On Wed, Jan 12, 2011 at 10:28 AM, Sanu ure...@gmail.com wrote: Hi, I have an object with TD tag with out any object type specified. That is actually a tag in the application. please find the HTML code below TR TD class=styleTabUnSelected id=S3Role #text SCRIPT and goes like this if i spy the tab i am getting the below Attributs, Name Value align left background-image(css) url(../images/AsTabBackMiddle.gif) class styleTabUnSelected= color(css) #00 cursor(css) pointer height 24 id S3Role onclick JavaScript:pushTab('S3Role'); onmouseout JavaScript:mouseOutTab('S3Role') onmouseover JavaScript:mouseOverTab('S3Role') style BACKGROUND-IMAGE: url(../images/ AsTabBackMiddle.gif); CURSOR: pointer; COLOR: #00 I am very new to Ruby kindly provide your ideas. -- 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: Automating the object with in TD tag
I'm not sure what your question is? +1. td tags can be accessed via the .cell method: http://wtr.rubyforge.org/rdoc/1.6.5/classes/Watir/Container.html#M000298 orde On Jan 12, 9:24 am, Basim Baassiri ba...@baassiri.ca wrote: I'm not sure what your question is? On Wed, Jan 12, 2011 at 10:28 AM, Sanu ure...@gmail.com wrote: Hi, I have an object with TD tag with out any object type specified. That is actually a tag in the application. please find the HTML code below TR TD class=styleTabUnSelected id=S3Role #text SCRIPT and goes like this if i spy the tab i am getting the below Attributs, Name Value align left background-image(css) url(../images/AsTabBackMiddle.gif) class styleTabUnSelected= color(css) #00 cursor(css) pointer height 24 id S3Role onclick JavaScript:pushTab('S3Role'); onmouseout JavaScript:mouseOutTab('S3Role') onmouseover JavaScript:mouseOverTab('S3Role') style BACKGROUND-IMAGE: url(../images/ AsTabBackMiddle.gif); CURSOR: pointer; COLOR: #00 I am very new to Ruby kindly provide your ideas. -- 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: Automating the object with in TD tag
I think what you're looking for is a way to use Watir to attach to or investigate that TD element. You can find an exact example of that in the Watir Wiki using XPath: http://wiki.openqa.org/display/WTR/XPath puts ie.cell(:xpath, //i...@src='3.jpg']/../).text Adam On Jan 12, 9:28 am, Sanu ure...@gmail.com wrote: Hi, I have an object with TD tag with out any object type specified. That is actually a tag in the application. please find the HTML code below TR TD class=styleTabUnSelected id=S3Role #text SCRIPT and goes like this if i spy the tab i am getting the below Attributs, Name Value align left background-image(css) url(../images/AsTabBackMiddle.gif) class styleTabUnSelected= color(css) #00 cursor(css) pointer height 24 id S3Role onclick JavaScript:pushTab('S3Role'); onmouseout JavaScript:mouseOutTab('S3Role') onmouseover JavaScript:mouseOverTab('S3Role') style BACKGROUND-IMAGE: url(../images/ AsTabBackMiddle.gif); CURSOR: pointer; COLOR: #00 I am very new to Ruby kindly provide your ideas. -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
[wtr-general] Watir 1.7.1 issue
Hello, I'm testing on Win7 (IE8), Ruby 1.8.6 (also tested under 1.8.7) and Watir 1.7.1 Below irb session works fine under all the same environment except Watir 1.6.2 I have a page that pops up a new window. I can attach to it without an error but it just isn't right. irb(main):001:0 require 'watir' = true irb(main):002:0 ie2 = Watir::IE.find(:title, /Agreement/) = #Watir::IE:0x49de500 url=https://mydomain.com/Registration.asp; title=Agreement irb(main):003:0 ie2.status = Waiting for about:blank... When I do a... irb(main):003:0 ie2.close WIN32OLERuntimeError: unknown property or method `hwnd' HRESULT error code:0x80010108 The object invoked has disconnected from its clients. from C:/Programs/Ruby186Watir17/lib/ruby/gems/1.8/gems/ watir-1.7.1/lib/watir/ie-class.rb:403:in `method_missing' from C:/Programs/Ruby186Watir17/lib/ruby/gems/1.8/gems/ watir-1.7.1/lib/watir/ie-class.rb:403:in `close' from (irb):3 it hangs up. If I manualy close the window I get the above error message. Any help would be 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
Re: [wtr-general] Automating the object with in TD tag
Hi, I was able to automate that using the Cell method. I have one more question. I have an object with in IMG tag.. but the properties are not enough to identify the same I have title, class, src and align properties alone. how can i use the image method to identify this? kindly help. By, Sanu. T On Wed, Jan 12, 2011 at 8:58 PM, Sanu ure...@gmail.com wrote: Hi, I have an object with TD tag with out any object type specified. That is actually a tag in the application. please find the HTML code below TR TD class=styleTabUnSelected id=S3Role #text SCRIPT and goes like this if i spy the tab i am getting the below Attributs, Name Value align left background-image(css) url(../images/AsTabBackMiddle.gif) class styleTabUnSelected= color(css) #00 cursor(css) pointer height 24 id S3Role onclick JavaScript:pushTab('S3Role'); onmouseout JavaScript:mouseOutTab('S3Role') onmouseover JavaScript:mouseOverTab('S3Role') style BACKGROUND-IMAGE: url(../images/ AsTabBackMiddle.gif); CURSOR: pointer; COLOR: #00 I am very new to Ruby kindly provide your ideas. -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] Automating the object with in TD tag
you could use src to identify it. browser.image(:src = /gtk-ok/).click Find more info here: http://wtr.rubyforge.org/rdoc/1.6.5/classes/Watir/Container.html#M000324 -Prajakta On Thu, Jan 13, 2011 at 10:43 AM, sweet flower ure...@gmail.com wrote: Hi, I was able to automate that using the Cell method. I have one more question. I have an object with in IMG tag.. but the properties are not enough to identify the same I have title, class, src and align properties alone. how can i use the image method to identify this? kindly help. By, Sanu. T On Wed, Jan 12, 2011 at 8:58 PM, Sanu ure...@gmail.com wrote: Hi, I have an object with TD tag with out any object type specified. That is actually a tag in the application. please find the HTML code below TR TD class=styleTabUnSelected id=S3Role #text SCRIPT and goes like this if i spy the tab i am getting the below Attributs, Name Value align left background-image(css) url(../images/AsTabBackMiddle.gif) class styleTabUnSelected= color(css) #00 cursor(css) pointer height 24 id S3Role onclick JavaScript:pushTab('S3Role'); onmouseout JavaScript:mouseOutTab('S3Role') onmouseover JavaScript:mouseOverTab('S3Role') style BACKGROUND-IMAGE: url(../images/ AsTabBackMiddle.gif); CURSOR: pointer; COLOR: #00 I am very new to Ruby kindly provide your ideas. -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.comhttp://groups.google.com/group/watir-generalwatir-general+unsubscr...@googlegroups.com -- 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