[wtr-general] Watir and Quibids.com

2012-12-04 Thread TommyW
I've tried for a couple hours trying to find the right combination of:

browser.button(:id, "929940484").click

to click the button on the Quibids.com item-specific page but have had zero 
luck.  It keeps giving Unable to Locate Element error.  I have also tried 
:value of "Bid Now" and a countless other combinations. 

Any help would be appreciated.

-- 
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 and Quibids.com

2012-12-04 Thread Eric Mathiesen
Hi Tommy,

 I need you to be a bit more specific in order to help you,  What "Bid now"
are you trying to click.  On the main entry page there are at least 5 "Bid
Now" buttons, are you trying to click on the first element or what?  IE
Developer tools lists the first "Bid Now" as  try using that identifier.


On Sat, Dec 1, 2012 at 12:30 PM, TommyW  wrote:

> I've tried for a couple hours trying to find the right combination of:
>
> browser.button(:id, "929940484").click
>
> to click the button on the Quibids.com item-specific page but have had
> zero luck.  It keeps giving Unable to Locate Element error.  I have also
> tried :value of "Bid Now" and a countless other combinations.
>
> Any help would be appreciated.
>
> --
> 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] Watir and Quibids.com

2012-12-04 Thread Željko Filipin
On Sat, Dec 1, 2012 at 10:30 PM, TommyW  wrote:
> browser.button(:id, "929940484").click

Looks like relevant HTML is:

Bid Now

You should be able to click it with:

browser.a(:text => "Bid Now").click

By the way, that will click the first link with text "Bid Now".

If you want to click a specific link, find an parent element with an unique
attribute. For example:


...
Bid Now
...

You could click exactly this "Bid Now" link with:

browser.div(:id => "864656507").a(:text => "Bid Now").click

Željko
--
https://leanpub.com/watirbook

-- 
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 and Quibids.com

2012-12-06 Thread TommyW
Thanks for the info, Zeljko. That's going to take some studying to 
understand.
 
one more question and might be a simple answer but after spending a few 
hours looking for code example I found nothing.  How do I simiply examine 
the value of a certain element?  For example, on the quibid home page, how 
do I get the value, programatically, of the "Live Actions" text at the top 
left of the screen?  Or of a link?  I did this some years ago and thought 
it had something to do with a question mark (?)  ?  
 
thanks.
 

On Tuesday, December 4, 2012 4:15:46 AM UTC-6, Željko Filipin wrote:

> On Sat, Dec 1, 2012 at 10:30 PM, TommyW > 
> wrote:
> > browser.button(:id, "929940484").click
>
> Looks like relevant HTML is:
>
> Bid Now
>
> You should be able to click it with:
>
> browser.a(:text => "Bid Now").click
>
> By the way, that will click the first link with text "Bid Now". 
>
> If you want to click a specific link, find an parent element with an 
> unique attribute. For example:
>
> 
> ...
> Bid Now
> ...
>
> You could click exactly this "Bid Now" link with:
>
> browser.div(:id => "864656507").a(:text => "Bid Now").click 
>
> Željko
> --
> https://leanpub.com/watirbook 
>

-- 
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 and Quibids.com

2012-12-06 Thread Željko Filipin
On Thu, Dec 6, 2012 at 9:25 PM, TommyW  wrote:

> How do I simiply examine the value of a certain element?


You need an inspector tool. Most browsers have one build in. Right click an
element and select "inspect element" in context menu that appears.

Ž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] Watir and Quibids.com

2012-12-06 Thread TommyW
yes, I use the IE inspector tool but how do you do that in Watir 
programatically.  I'm thinking it's something like:
 
  b.text_field(:id,"abcedf").value?
 
that's where I'm stuck. :)

On Thursday, December 6, 2012 2:41:10 PM UTC-6, Željko Filipin wrote:

> On Thu, Dec 6, 2012 at 9:25 PM, TommyW  >wrote:
>  
>> How do I simiply examine the value of a certain element?
>
>
> You need an inspector tool. Most browsers have one build in. Right click 
> an element and select "inspect element" in context menu that appears.
>
> Ž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] Watir and Quibids.com

2012-12-06 Thread Željko Filipin
On Thu, Dec 6, 2012 at 9:47 PM, TommyW  wrote:

> b.text_field(:id,"abcedf").value?
>

You were close:

b.text_field(:id,"abcedf").value

Depending on if you use watir-webdriver or watir-classic gems, API
documentation is here:

http://rdoc.info/gems/watir-webdriver/
http://rdoc.info/gems/watir-classic

Ž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] Watir and Quibids.com

2012-12-07 Thread TommyW
Ok, so I'm down to just seeking the answer which, for me at this time, is 
the best teacher.
 
So go to quibids.com, click one of the items on auction.  See the "Bidding 
History" table?  I'm trying to get the value, programatically, of the first 
name in the list.  I used the following:
 
irb(main):020:0> puts b.text_field(:id => 'bhu_1').value
 
and received:

Watir::Exception::UnknownObjectException: Unable to locate element, using 
{:tag_
name=>["text", "password", "textarea"], :id=>"bhu_1"}
from 
C:/Ruby193/lib/ruby/gems/1.9.1/gems/watir-classic-3.3.0/lib/watir-c
lassic/element.rb:66:in `assert_exists'
from (eval):3:in `value'
from (irb):20
from C:/Ruby193/bin/irb:12:in `'
 
Thanks.

On Thursday, December 6, 2012 2:53:52 PM UTC-6, Željko Filipin wrote:

> On Thu, Dec 6, 2012 at 9:47 PM, TommyW  >wrote:
>
>> b.text_field(:id,"abcedf").value?
>>
>
> You were close:
>
> b.text_field(:id,"abcedf").value
>
> Depending on if you use watir-webdriver or watir-classic gems, API 
> documentation is here:
>
> http://rdoc.info/gems/watir-webdriver/
> http://rdoc.info/gems/watir-classic
>
> Ž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