[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 at 2:57 AM, Usha Loutongbam usharan...@gmail.comwrote:

 Hi,
 The truncated version of the HTML source code I have looks something like
 this:

 tbody
 tr   /tr
  tr
   div
   tddivspan class=logo style=background-image:
 url(/images/logos/ab.gif);/span
   span class=pc_nameApple/span/div/td
   td   /td
   td   /td.
   tddivinput type=image class=book-btn title=Book this
 alt=Book this src=/images/buttons/book.gif tripid=7/
 ...
 tbody
 tr...

 I'm looking for the first instance of the text Apple or the image file
 ab.gif which could be in multiple tbody. I then want to click on a book
 button (book-btn) on the same row as this text found. The text is always on
 first cell and the book button is always on the 7th cell.

 So far, I haven't been able to do so using xpath on FireWatir 1.6.2. Tried
 some examples given by Angrez and others, but it still is not working:

 ff.button(:xpath, //sp...@text='Apple']/../td[7]/div/input).click()
 ff.button(:xpath, //[contains(text(),'Apple')]/../td[7]/input).click()

 Both give an error saying Unable to locate element, using :xpath Am I
 doing something wrong here?

 Any help appreciated!


 Thanks,
 Usha

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[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
   IdentifierTest_Field1/Identifier
   LocatorTextBox1/Locator
   ObjTypeTextField/ObjType
   /TestObject
 - TestObject
   Identifier2/Identifier
   Locatorid=2/Locator
   ObjTypeTextField/ObjType
   /TestObject
   /ObjectMap

 And I have written the following code--

 xml = Document.new File.new(xmlFilePath)
 xml.elements.each(//TestObject) { |c| puts str }

 Here, I am abl to read the contents of each TestObject tag. But I
 want to read Locator and Identifier tags as well. How to do this?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[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)
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'




If any help regarding this could be appreciated.

Thanks in Advance,


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[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

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[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 passing the
 value of the Identifier and I want to return the value of the
 Locator. e.g. --

  TestObject
    IdentifierTest_Field1/Identifier
   LocatorTextBox1/Locator
   ObjTypeTextField/ObjType

 Here, I want to pass Test_Field1 and method should  return
 TextBox1.

 So is ther any method for this?

 Thanks
 Vikas

 On Mar 30, 12:10 pm, LFIdnl ikabluch...@gmail.com wrote:

  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
     IdentifierTest_Field1/Identifier
     LocatorTextBox1/Locator
     ObjTypeTextField/ObjType
     /TestObject
   - TestObject
     Identifier2/Identifier
     Locatorid=2/Locator
     ObjTypeTextField/ObjType
     /TestObject
     /ObjectMap

   And I have written the following code--

   xml = Document.new File.new(xmlFilePath)
   xml.elements.each(//TestObject) { |c| puts str }

   Here, I am abl to read the contents of each TestObject tag. But I
   want to read Locator and Identifier tags as well. How to do this?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[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'
require 'watir'

xlFile = XLS.new(Dir.pwd + '/test_XLS_data.xls') #grab the data file
in the same dirrectory
myData = xlFile.getRowRecords('Google Search Data','Example')  #pull
data records  from excel
xlFile.close
myData.each do |record|
  ie = Watir::IE.start('google.com')
  ie.text_field(:name,'q').set(record['SearchString'])
  ie.button(:value,/Search/i).click
  if ie.contains_text(record['ContainsText'])
puts Results of search: '#{record['SearchString']}' contains '#
{record['ContainsText']}'
  else
puts Error: could not find text: '#{record['ContainsText']}' in
results of search: '#{record['SearchString']}'
  end
  sleep 3
  ie.close
end
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[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 AM, Angrez Singh ang...@gmail.com wrote:

 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 at 2:57 AM, Usha Loutongbam usharan...@gmail.comwrote:

 Hi,
 The truncated version of the HTML source code I have looks something like
 this:

 tbody
 tr   /tr
  tr
   div
   tddivspan class=logo style=background-image:
 url(/images/logos/ab.gif);/span
   span class=pc_nameApple/span/div/td
   td   /td
   td   /td.
   tddivinput type=image class=book-btn title=Book this
 alt=Book this src=/images/buttons/book.gif tripid=7/
 ...
 tbody
 tr...

 I'm looking for the first instance of the text Apple or the image file
 ab.gif which could be in multiple tbody. I then want to click on a book
 button (book-btn) on the same row as this text found. The text is always on
 first cell and the book button is always on the 7th cell.

 So far, I haven't been able to do so using xpath on FireWatir 1.6.2. Tried
 some examples given by Angrez and others, but it still is not working:

 ff.button(:xpath, //sp...@text='Apple']/../td[7]/div/input).click()
 ff.button(:xpath, //[contains(text(),'Apple')]/../td[7]/input).click()

 Both give an error saying Unable to locate element, using :xpath Am
 I doing something wrong here?

 Any help appreciated!


 Thanks,
 Usha




 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[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 Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[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 successfully using
watir?

- Angrez

On Mon, Mar 30, 2009 at 7:20 PM, Angrez Singh ang...@gmail.com wrote:

 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 Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[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,
 //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 AM, Angrez Singh ang...@gmail.com wrote:

 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 at 2:57 AM, Usha Loutongbam usharan...@gmail.comwrote:

 Hi,
 The truncated version of the HTML source code I have looks something like
 this:

 tbody
 tr   /tr
  tr
   div
   tddivspan class=logo style=background-image:
 url(/images/logos/ab.gif);/span
   span class=pc_nameApple/span/div/td
   td   /td
   td   /td.
   tddivinput type=image class=book-btn title=Book this
 alt=Book this src=/images/buttons/book.gif tripid=7/
 ...
 tbody
 tr...

 I'm looking for the first instance of the text Apple or the image file
 ab.gif which could be in multiple tbody. I then want to click on a book
 button (book-btn) on the same row as this text found. The text is always on
 first cell and the book button is always on the 7th cell.

 So far, I haven't been able to do so using xpath on FireWatir 1.6.2.
 Tried some examples given by Angrez and others, but it still is not working:

 ff.button(:xpath, //sp...@text='Apple']/../td[7]/div/input).click()
 ff.button(:xpath, //[contains(text(),'Apple')]/../td[7]/input).click()

 Both give an error saying Unable to locate element, using :xpath Am
 I doing something wrong here?

 Any help appreciated!


 Thanks,
 Usha







 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[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 and use it
whenever required.


Thanks
Vikas
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[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 portion of the URL 
 with Watir::IE.find(:url, //)

 Thanks to everyone that has commented thus far.

 Thanks,

 Bobby Washington



 Date: Sun, 29 Mar 2009 20:10:45 +0800
 Subject: [wtr-general] Re: Attach to changing URL
 From: cjq@gmail.com
 To: watir-general@googlegroups.com

 Are the URL the same?
 You may try: Watir::IE.find(:url, //)

 Thanks.
 Wesley Chen.


 On Sun, Mar 29, 2009 at 8:05 PM, Bobby Washington 
 bobwashing...@hotmail.com mailto:bobwashing...@hotmail.com wrote:

 I thought about that, however the title is the same.  Sorry for
 not mentioning this before.

 Thanks,

 Bobby Washington



 Date: Sat, 28 Mar 2009 08:05:29 -0400
 Subject: [wtr-general] Re: Attach to changing URL
 From: leighisle...@gmail.com mailto:leighisle...@gmail.com
 To: watir-general@googlegroups.com
 mailto:watir-general@googlegroups.com


 Anyway you can use the title to attach vs. the url?
 Watir::IE.attach(title:, 'title of browser window')

 On Fri, Mar 27, 2009 at 9:32 PM, bobwashing...@hotmail.com
 mailto:bobwashing...@hotmail.com wrote:


 I'm still some what of a n00b with regards to Watir.  I have a
 web app
 that displays new browser windows.  I know that I can use
 Watir::IE.attach(url:, 'enter url') to attach to a window.
  However
 the snippet of the url below keeps changing.  Also hwnd keeps
 changing.  Is this because the site is https?

 TOKEN=5937dfd955519a57-4AA53C6C-1143-EBE5-767BAE115006BD65





 Hotmail® is up to 70% faster. Now good news travels really fast.
 Find out more.
 
 http://windowslive.com/online/hotmail?ocid=TXT_TAGLM_WL_HM_70faster_032009






 Hotmail® is up to 70% faster. Now good news travels really fast. Find 
 out more. 
 http://windowslive.com/online/hotmail?ocid=TXT_TAGLM_WL_HM_70faster_032009
 


-- 
Bret Pettichord
CTO, WatirCraft LLC, www.watircraft.com
Lead Developer, Watir, www.watir.com
Blog, www.io.com/~wazmo/blog
Twitter, www.twitter.com/bpettichord

Watir Training: Portland/Beaverton April 16-17
www.watircraft.com/training


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[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

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[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

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[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 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)
         from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
 `require'

 If any help regarding this could be appreciated.

 Thanks in Advance,
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[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 email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[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 Windows::API::Error 
 (NameError)
 From: ideler.den...@gmail.com
 To: watir-general@googlegroups.com
 
 
 Some more details:
 
 ruby -v
  ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32]
 
 gem list -l watir
  watir (1.6.2)
  

_
Windows Live™ SkyDrive: Get 25 GB of free online storage.
http://windowslive.com/online/skydrive?ocid=TXT_TAGLM_WL_skydrive_032009
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[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 group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/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', 'QueryDisplayTemplate');/

My xpath statements:

With a * before //

browser.checkbox(:xpath, *//input
[...@onclick='javascript:toggleOutputField(\'data://Demographic/Gender\',
\'QueryDisplayTemplate\');']).set

With just //input

browser.checkbox(:xpath, //input
[...@onclick='javascript:toggleOutputField(\'data://Demographic/Gender\',
\'QueryDisplayTemplate\');']).set

Something wrong?  Any suggestions?
Thanks!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[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 ).click

No complaint, but the button Apply is not clicked.

I also tried:
$ie.file_field( :name, document ).set( c:\\Watir Testware\\Data\
\vb.txt )
$ie.form(:name, ApplyAddDocument).submit
got the same result.

Please, help.
Thanks,
Vladimir Belorusets
SQA Manager, Xerox
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[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
wrote:
 On Fri, Mar 27, 2009 at 05:05, Alister Scott alister.sc...@gmail.com
 wrote:

  What do you suggest to do with the browser in between checking the
  various URLs?

 Could you give more detail about what are you doing?

 Something like this?

 browser.goto url
 do_something
 do_something_else
 browser.goto url
 do_something
 do_something_else
 ...

 Why can't you use the same browser all the time?

 Željko
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[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 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 ).click

 No complaint, but the button Apply is not clicked.

 I also tried:
     $ie.file_field( :name, document ).set( c:\\Watir Testware\\Data\
 \vb.txt )
     $ie.form(:name, ApplyAddDocument).submit
 got the same result.

 Please, help.
 Thanks,
 Vladimir Belorusets
 SQA Manager, Xerox
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[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 XLS.

My script is like this:


ie.link(:href, record4['url']).click
ie.textField(:name, targetnumber).set(record4['targetnumber'])

Previous url was like this: https://abcd.com/test.in?cmd=p2p

now it is like this : 
https://abcd.com/test.in;jsessionid=JRvbP1CyCY5tMd153lZJ9mzp5Rv7tNWQ4n232VL1GZFT1sppsTQ5!878380993

I want to capture the jsessionid generated.

Please help me it is very urgent

thanks,
vasu
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---