[wtr-general] Re: Using xpath to click a button after text

2009-03-30 Thread Angrez Singh
I think //sp...@text='Apple']/../ points to div tag because div is parent of that span. May be you can try //sp...@text='Apple']/../../../../ it will point to div/td/div/tr and then you can do td[7] Let me know if that works. I guessed this from the HTML you send. - Angrez On Sun, Mar 29, 2009

[wtr-general] Re: xml handling

2009-03-30 Thread LFIdnl
doc.elements.each('//TestObject/Identifier') { |el| puts el.text } doc.elements.each('//TestObject/Locator') { |el| puts el.text } On 30 мар, 10:44, Vikas Tulashyam vtulash...@gmail.com wrote: Hi, I want to read a xml file. Here is the my XML file-- ObjectMap - TestObject  

[wtr-general] Re: Getting no such file to load error when working with excel

2009-03-30 Thread Shweta
Hi When i was trying to parameterize with excel for login page am getting this error.Can anyone pls let me know what might be wrong in this. Error message: c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- xls (LoadError)

[wtr-general] Re: Git and Github on Mac

2009-03-30 Thread Željko Filipin
On Sun, Mar 29, 2009 at 21:21, Bret Pettichord b...@pettichord.com wrote: git reset HEAD~ git push Bret, Thank you for letting me know that. I am not surprised that Git can do such undo magic. :) I will add it to the blog post right now, maybe it helps somebody. Željko

[wtr-general] Re: xml handling

2009-03-30 Thread LFIdnl
doc.elements.each(//TestObject[Identifier='Test_Field1']) { |el| puts el.elements['Locator'].text } On 30 мар, 11:28, Vikas Tulashyam vtulash...@gmail.com wrote: Hi Thanks for the reply.. I want to get the value of the Locator tag in any matching identifier. I am creating a function and

[wtr-general] Getting no such file to load error

2009-03-30 Thread Shweta
Hi When i am trying to execute this code second time i am getting this error but first time it worked fine.This was a sample code i got from the advanced examples of watir general error: XLS_usage_example.rb:2:in `require': no such file to load -- watir (LoadError) Code: require 'xls'

[wtr-general] Re: Using xpath to click a button after text

2009-03-30 Thread Usha Loutongbam
After making small changes for the path (you suggested) and the attribute, it worked: ff.button(:xpath, //span[text()='Apple']/../../../td[7]/div/input).click() For some reason it is not working with @text. If I replace it with text() it works. Thanks for the help! On Mon, Mar 30, 2009 at 11:45

[wtr-general] Difference between fire_event(click) and element.click

2009-03-30 Thread Angrez Singh
Hi, Can some one explain me the difference? In one of our projects if I do link.click() i get javascript errors if i do link.fire_event(onclick) nothing happens. - Angrez --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[wtr-general] Re: Difference between fire_event(click) and element.click

2009-03-30 Thread Angrez Singh
I am facing a weird problem if I click the link manually then i get the desired results but if I use link.click() then i get javascript errors. Link has href() which points to some javascript method a href=javascript:changeSelection() Any ideas? or suggestions? to fire the javascript event

[wtr-general] Re: Using xpath to click a button after text

2009-03-30 Thread Angrez Singh
This is because text in not attribute of element its a property. - Angrez On Mon, Mar 30, 2009 at 6:26 PM, Usha Loutongbam usharan...@gmail.comwrote: After making small changes for the path (you suggested) and the attribute, it worked: ff.button(:xpath,

[wtr-general] IE instance problem

2009-03-30 Thread Vikas Tulashyam
Hi Friends, I want to create an instance of a browser and want to use it later, but when ever I create a new instance, Watir opens a new browser as -- ie= Watir::IE.new I dont want to do this. Can anyone guide me, if it is possible is Watir. so I can just create a variable instance of browser

[wtr-general] Re: Attach to changing URL

2009-03-30 Thread Bret Pettichord
Have you considered saving your reference to the browser in a variable and using it? Bret Bobby Washington wrote: The url is similar, but only up to a point. The last part 'TOKEN=5937dfd955519a57-4AA53C6C-1143-EBE5-767BAE115006BD65' keeps changing. I will see if Watir can use only a

[wtr-general] Re: Attach to changing URL

2009-03-30 Thread Željko Filipin
On Sun, Mar 29, 2009 at 14:15, Bobby Washington bobwashing...@hotmail.com wrote: The url is similar, but only up to a point. Try: browser = Watir::IE.find(:url, /the_similar_part/) or browser = Watir::IE.attach(:url, /the_similar_part/) Željko

[wtr-general] Re: IE instance problem

2009-03-30 Thread Željko Filipin
On Mon, Mar 30, 2009 at 16:13, Vikas Tulashyam vtulash...@gmail.com wrote: I can just create a variable instance of browser and use it whenever required. You want variable to point to a browser, but not open a new browser? Can you give us some information about what are you doing? Željko

[wtr-general] Re: Getting no such file to load error when working with excel

2009-03-30 Thread Jim Matthews
Shweta, This sounds like the problem where you do not have RUBYOPT defined as - rubygems. Search the site for help on this and if you still have trouble, update with additional information. Jim On Mar 30, 6:40 am, Shweta nagman...@gmail.com wrote: Hi When i was trying to parameterize with

[wtr-general] Re: uninitialized constant Windows::API::Error (NameError)

2009-03-30 Thread IDIEININIIS
Some more details: ruby -v ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32] gem list -l watir watir (1.6.2) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send

[wtr-general] Re: uninitialized constant Windows::API::Error (NameError)

2009-03-30 Thread Al Snow
Check this out: http://groups.google.com/group/watir-general/browse_thread/thread/94b030306ba86225 Thanks, Al Snow Linkedin: http://www.linkedin.com/in/alsnow Google Talk: jasnow1 Twitter: jasnow Date: Mon, 30 Mar 2009 08:25:09 -0700 Subject: [wtr-general] Re: uninitialized constant

[wtr-general] How to use xml element?

2009-03-30 Thread Angrez Singh
Hi, Any way to use xml element in watir scripts? Tried element_by_xpath but not working, need to find the reason though? But any other way? - Angrez --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General

[wtr-general] Illusive xpath

2009-03-30 Thread bert
Hi, Im trying to check a checkbox on the following element using xpath but no matter what I try it doesnt seem to work. I keep getting an error: (Watir::Exception::UnknownObjectException): HTML: input type=checkbox onclick=javascript:toggleOutputField('data:// Demographic/Gender',

[wtr-general] Cannot click Apply button after using file upload dialog box

2009-03-30 Thread vladimir...@hotmail.com
I need to select a document by clicking Browse... button. After selecting the file for download, I need to click Apply butoon. My code is simple # open Choose File Windows dialog box $ie.file_field( :name, document ).set( c:\\Watir Testware\\Data\ \vb.txt ) $ie.button( :id, applyButton

[wtr-general] Re: unknown property or method `navigate' HRESULT error code:0x800706ba The RPC server is unavailable.

2009-03-30 Thread Alister Scott
Željko I am actually running a separate script every minute that opens and closes urls. So the probably isn't using the ie object in a script, but using the same ie object across one script that runs every minute. Cheers, Alister On Mar 27, 6:31 pm, Željko Filipin zeljko.fili...@wa-research.ch

[wtr-general] Re: Cannot click Apply button after using file upload dialog box

2009-03-30 Thread Shweta
try with this $ie.button(:name,ApplyAddDocument).click #try with Value also instead of name property or Watir.autoit.Send('{ENTER}') On Mar 31, 5:16 am, vladimir...@hotmail.com vladimir...@hotmail.com wrote: I need to select a document by clicking Browse... button. After selecting the file

[wtr-general] How to capture unique session ID from URL

2009-03-30 Thread vasu
Dear All, Iam using datadriven framework, and used href to click on a link. It was working fine. Now for security reason unique session ID was also generated and same was updated to the href for each login session. Please let me know how to capture the sessionID from URL and update the same in