Re: [wtr-general] Need help on .value method in watir
a javascript event may need to be fired on that field - Original Message From: Bhavesh To: Watir General Sent: Tue, May 3, 2011 4:13:19 PM Subject: [wtr-general] Need help on .value method in watir Hi, Im trying to insert text using ".value" method in watir script. I used like this. $ie.text_field(:id, $1).value=("ChineseData") When script executes, it shows this data in that text filed, but actually it is not inserted in the text filed. When i click submit, it throws error that filed is empty. What is the cause? how can i resolve this? I cannot use .set method as i have utf8 or special characters. Can someone help me out with this. Your help is appreciated. Thanks Bhavesh -- 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] Need help on .value method in watir
Hi, Im trying to insert text using ".value" method in watir script. I used like this. $ie.text_field(:id, $1).value=("ChineseData") When script executes, it shows this data in that text filed, but actually it is not inserted in the text filed. When i click submit, it throws error that filed is empty. What is the cause? how can i resolve this? I cannot use .set method as i have utf8 or special characters. Can someone help me out with this. Your help is appreciated. Thanks Bhavesh -- 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: How to text in a textfield of a dialog box
If you install AutoIT it comes with a finder to identify the controls in dialogs Basic AutoIT sample ie.text_field(:id,'document_name').click # Open the popup myAutoIT = WIN32OLE.new("AutoitX3.Control") myAutoIT.WinWaitActive("File Upload","",15) # Set focus to the popup ##myAutoIT.ControlSetText("File Upload","",1148,sFileName) # 1148 is the id found by the AutoIt Finder/Didnt work myAutoIT.Send("{ALT}n") # Move to the file name field in the popup myAutoIT.Send(sFileName) # Enter the Path and File Name myAutoIT.ControlClick("File Upload","","&Open") On May 2, 4:36 pm, chaand wrote: > Hi, > > I am testing a web application using IE. I am a newbie for watir. > There is an Popup window launched & I need to enter text into a text > field and hit a button in that dialog . The Toolbar is not available > for that popup window. hence not able to identify the elements on that > window. > > Can anyone please share the ways to work on this scenario. > > Thank you. -- 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] relative xpath
I'm trying to get to a table cell that has nothing identifable about it, it's position from the beginning of the page will change, but it's relative position from a table header stays the same. I'm using FireBug to construct my XPath, but whenever I try to make things relative it gives me object not found.. To see an example, go to http://www.earnings.com/company.asp?client=cb&ticker=s scroll down to where you see text "Earnings Releases", from there go down to the next table, 2nd row and get me the the value of the 7th column. @@ie = Watir::IE.start("http://www.earnings.com/company.asp? client=cb&ticker=s") page_html = Nokogiri::HTML.parse(@@ie.html) #puts page_html.xpath("html/body/table/tbody/tr/td/table[7]/tbody/ tr[3]/td[2]/table[4]/tbody/tr[2]/td/b").inner_text #1)Absolute path to "Earnings releases"; works OK #puts page_html.xpath("//*[contains(text(),'Earnings Releases')]").inner_text #2)Relative path to "Earnings releases"; works OK #puts page_html.xpath("html/body/table/tbody/tr/td/table[7]/tbody/ tr[3]/td[2]/table[5]/tbody/tr[2]/td[7]/nobr").inner_text #3)Absolute path to the actual date value "28-Apr-11 7:00 AM"; works OK #puts page_html.xpath("//*[contains(text(),'Earnings Releases')]/ table[1]/tbody/tr[2]/td[7]/nobr").inner_text #4)Relative path to the actual date value "28-Apr-11 7:00 AM"; DOES NOT WORK... -- 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] Integration with HP QTP 11 or Quality center 11
Hi, We have been using Watir for quite sometime now , now we want to integrate the same to either to HP QTP or to HP quality Center v11(ALM). IS the same possible .IF so kindly let us know the steps for the same . -- 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: How to text in a textfield of a dialog box
Chaand, Is this a Win32 windows/ dialog? Have you tried using autoit? On May 3, 2:36 am, chaand wrote: > Hi, > > I am testing a web application using IE. I am a newbie for watir. > There is an Popup window launched & I need to enter text into a text > field and hit a button in that dialog . The Toolbar is not available > for that popup window. hence not able to identify the elements on that > window. > > Can anyone please share the ways to work on this scenario. > > Thank you. -- 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