[wtr-general] Re: button.Click_No_Wait only highlights the button, does not click

2008-12-16 Thread pramod D
Hi, I worked with your code and it is working fine, Only thing you need to do is introduce sleep(5) just before clicking the button. It will handle the pop up. Thanks, Pramod On Mon, Dec 15, 2008 at 8:57 PM, HAHAHA wrote: > > Thank you for your code. I test it. But Click_no_wait still cannot >

[wtr-general] Re: button.Click_No_Wait only highlights the button, does not click

2008-12-16 Thread HAHAHA
I tried. The click_no_wait still cannot click the button. I think maybe it is really the configure problem. I use XP SP3, ruby186-27, watir1.6.2. Do you think some earlier version will be better? I know some programs cannot run in current version, like rubyscript2exe.rb. On Dec 16, 3:49 am, "pra

[wtr-general] Re: button.Click_No_Wait only highlights the button, does not click

2008-12-16 Thread Michael Hwee
If you find out whether you installed Popup killer app? And, make sure to set your browser security to 'medium'. I really like to know how to disable All popups like that. Not for testing, but for something else. Thanks. - Original Message From: HAHAHA To: Watir General Sent: Tue

[wtr-general] Re: Need help in accessing an element

2008-12-16 Thread Michael Hwee
Use browser.link(:text, 'Chelsea Groves Business Cards').parent.click - Original Message From: Natasha To: Watir General Sent: Tuesday, December 16, 2008 3:56:09 AM Subject: [wtr-general] Need help in accessing an element Hello All, Please could someone help me with a way to acces

[wtr-general] 'matches' method for regexp gives error

2008-12-16 Thread maven999
Hi all, I'm trying to grab a string from a block of span text from my UI. The block has and the block is Connected to: Current Database (db_1229419050) Created: Tue, 16 Dec 2008 09:17:30 GMT Next creation: Tue, 16 Dec 2008 15:17:30 GMT I want to grab the db_* string so I can compare it to the

[wtr-general] Re: Need help in accessing an element

2008-12-16 Thread Richard Lawrence
This ought to get you the link element: @browser.element_by_xpath("//p[contains(text(), 'by Chelsea Groves')]/preceding-sibling::p/a") Richard -- Richard Lawrence Certified Scrum Coach Founder and Principal Consultant, Humanizing Work, LLC 303-895-7688 rich...@humanizingwork.com www.humanizingwo

[wtr-general] Re: 'matches' method for regexp gives error

2008-12-16 Thread Paul Rogers
you need to match on the text of the span, not the span itself. > @mytestvalue = $ie.span(:id, 'db_data').text.matches(/"db_\\[0-9\\]*/) ( i think its the .text method you want, if it gives an undefinedied method error, I got it wrong ;-) ) On Tue, Dec 16, 2008 at 10:28 AM, maven999 wrote: >

[wtr-general] Re: 'matches' method for regexp gives error

2008-12-16 Thread maven999
Hi Paul, Thanks for your quick reply. It doesn't work. And neither does it work when I convert the result into string: @mytestvalue = $ie.span(:id, 'db_data').text.matches(/"db_\\[0-9\\] */) .to_s I think the problem is the datastructure that the $ie.span(:id, 'db_data') returns. If it is an

[wtr-general] Re: 'matches' method for regexp gives error

2008-12-16 Thread Paul Rogers
what does $ie.span(:id, 'db_data').text return - it might be a problem with your regular expression. What are you expecting @mytestvalue = $ie.span(:id, 'db_data').text.matches(/"db_\\[0-9\\]*/) to return ( ie what are you hoping to get back ). he to_s on the end iis unlikely to be needed Pau

[wtr-general] Re: 'matches' method for regexp gives error

2008-12-16 Thread Ravi
I guess this will work: @mytestvalue = $ie.span(:id, 'db_data').text.match(/db_[0-9]*/).to_s On Dec 16, 12:07 pm, "Paul Rogers" wrote: > what does > $ie.span(:id, 'db_data').text > > return - it might be a problem with your regular expression. > What are you expecting > @mytestvalue = $ie.s

[wtr-general] Need help in accessing an element

2008-12-16 Thread Natasha
Hello All, Please could someone help me with a way to access a link element. Following is the HTML snippet: Chelsea Groves Business Cards by Chelsea Groves I need to click on the link with text "Chelsea Groves Business Cards". But following is what I actually want to do. I want to click

[wtr-general] Re: 'matches' method for regexp gives error

2008-12-16 Thread maven999
The problem is that db_data is the id for 2 lines of data. The 'db_1229419050' string itself does not have an exclusive id. When I drill down to the string using IE toolbar, I see the following structure: (idb_1229440654) But clicking on the db_data text in IE toolbar highlights 2 whole lin

[wtr-general] Re: 'matches' method for regexp gives error

2008-12-16 Thread maven999
Sorry, I didn't see the previous message before I posted the above reply. Ravi, it worked! Thanks...so looks like my regexp was wrong all along. Thanks Paul for pointing me to text. Watir forum ROCKS! On Dec 16, 1:16 pm, maven999 wrote: > The problem is that db_data is the id for 2 lines of d

[wtr-general] Re: How to handle file download popups in Firefox?

2008-12-16 Thread Margam
Hello Everyone, Can someone help me with this issue please. I need this working very desperately for my project. Thank you very much. Margam On Dec 15, 2:40 pm, Margam wrote: > Hello Everyone, > I have been trying to handle File Download pops in FF browser. I had > posted a similar question in

[wtr-general] Opening an Excel file with a variable name

2008-12-16 Thread jas . shelton
All, I am attempting to open an Excel file with Ruby, and have run into a problem. If I open the file with single quotes, like inputFile = input.Workbooks.Open('C:\Folder\sheet.xls') everything works fine. My problem now is that the location of the .xls file has a variable name, like inputFile

[wtr-general] Re: Opening an Excel file with a variable name

2008-12-16 Thread Darin Duphorn
Try \\ $drive+"\\"+env+"\\Test_Results\\"+$file_name+"_Results.xls" -Original Message- From: watir-general@googlegroups.com [mailto:watir-gene...@googlegroups.com] On Behalf Of jas.shel...@hotmail.com Sent: Tuesday, December 16, 2008 3:08 PM To: Watir General Subject: [wtr-general] O

[wtr-general] undefined method `length' for 4324536:Fixnum

2008-12-16 Thread winstan
Hi all, In recent days i have made changes to the way i am storing/using test data within my testcases. Previously i was just setting a cell with a hard coded number within the script but found this to not be the most efficient method for conducting my tests. So i started to use YAML. Its great,

[wtr-general] Re: undefined method `length' for 4324536:Fixnum

2008-12-16 Thread John Fitisoff
I think you need to use a string when setting a text field. Either use to_s to convert the value from fixnum to string when setting the field or use a quoted value in the yml file. --- On Tue, 12/16/08, winstan wrote: > From: winstan > Subject: [wtr-general] undefined method `length' for 4

[wtr-general] Re: button.Click_No_Wait only highlights the button, does not click

2008-12-16 Thread Fish
I use the ruby186-26,but still can not handle the popup...Just only block at the commandline. Does someone kindly do me a favor to provide code which can handle the modaldialog?I very appreciate it. I have tried below, but it doestn't work. @ie.button(:value, "New").click_no_wait #pop up a modaldi

[wtr-general] Re: undefined method `length' for 4324536:Fixnum

2008-12-16 Thread winstan
Thanks John. Some thing as simple as that. Well at least i know now for future references. Oh and all I changed was the data in the yml file so that its quoted. Problem solved. Now onto rexml fun for me... im sure i will be back with questions on that too. Thank god every one around here is so h