Discussion:
[wtr-general] Issue with watir index or Am I doing something wrong
NaviHan
2018-11-23 02:06:07 UTC
Permalink
Having trouble using index.

I have a section of a page as below.
<div class="gc-list">
<div class="row cards-list-titles" style="display: flex;">
<div class="small-6 large-5">Card</div>
<div class="small-5">Amount Taken</div>
</div>
<div class="row gift-cards-list" data-gcid="2790030163867647149" style="
display: flex;">
<div class="small-6 large-5">...163867647149</div>
<div class="small-5 large-6">$20.00</div>
<div class="small-1 large-1 small-text-right">
<button type="button" class="remove-gift-cert pointer" data-gcid
="2790030163867647149">
<span class="icon icon-cross-standard-small-black"></span>
</button>
</div>
</div>
<hr class="gc-separator" style="display: block;">
<div class="row gift-cards-list" data-gcid="2790030169169063156"
style="display: flex;">
<div class="small-6 large-5">...169169063156</div>
<div class="small-5 large-6">$25.90
<br class="hide-for-large">
<span class="gc-amount-left">($74.10 left on card)
</span>
</div>
<div class="small-1 large-1 small-text-right">
<button type="button" class="remove-gift-cert pointer"
data-gcid="2790030169169063156">
<span class="icon icon-cross-standard-small-black"
</span>
</button>
</div>
</div>
<hr class="gc-separator" style="display: block;">
</div>


The pageobject is defined as

div(:applied_gift_cards, :class => 'gc-list')




And Im trying to access "...163867647149 " and "$20.00" as which gave error

return applied_gift_cards_element.div_element(:index => 1).div_element(:index =>0).text

return applied_gift_cards_element.div_element(:index => 1).div_element(:index =>0).text

Watir::Exception::UnknownObjectException: timed out after 30 seconds,
waiting for #<Watir::Div: located: false; {:class=>"gc-list",
:tag_name=>"div"} --> {:index=>1, :tag_name=>"div"} --> {:index=>0,
:tag_name=>"div"}> to be located

When printing the same element actually prints the Pageobect
puts applied_gift_cards_element.div_element(:index => 1).div_element(:index
=>0)
#<PageObject::Elements::Div:0x0000000003b66388>


A puts of the following printed as below which is again confusing

puts applied_gift_cards_element.div_element(:index => 0).inner_html
puts applied_gift_cards_element.div_element(:index => 1).inner_html
puts applied_gift_cards_element.div_element(:index => 2).inner_html
puts applied_gift_cards_element.div_element(:index => 3).inner_html

<div class="small-6 large-5">Card</div>
<div class="small-5">Amount Taken</div>
Card
Amount Taken
<div class="small-6 large-5">...163867647149</div><div class="small-5 large-6">$20.00</div><div class="small-1 large-1 small-text-right"><button type="button" class="remove-gift-cert pointer" data-gcid="2790030163867647149"><span class="icon icon-cross-standard-small-black"></span></button></div>




Am I doing something wrong here?
--
--
Before posting, please read https://github.com/watir/watir_meta/wiki/Guidelines-for-Posting-to-Watir-General-Google-Group.
In short: search before you ask, be nice.

watir-***@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+***@googlegroups.com
---
You received this message because you are subscribed to the Google Groups "Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email to watir-general+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Titus Fortner
2018-11-23 02:34:22 UTC
Permalink
This code looks for all nested divs, not just divs that are direct
children. This is the 2nd div: <div class="small-6 large-5">Card</div>

The code is looking for a div nested under that, which isn't there.
Post by NaviHan
Having trouble using index.
I have a section of a page as below.
<div class="gc-list">
<div class="row cards-list-titles" style="display: flex;">
<div class="small-6 large-5">Card</div>
<div class="small-5">Amount Taken</div>
</div>
<div class="row gift-cards-list" data-gcid="2790030163867647149" style
="display: flex;">
<div class="small-6 large-5">...163867647149</div>
<div class="small-5 large-6">$20.00</div>
<div class="small-1 large-1 small-text-right">
<button type="button" class="remove-gift-cert pointer"
data-gcid="2790030163867647149">
<span class="icon icon-cross-standard-small-black"></span>
</button>
</div>
</div>
<hr class="gc-separator" style="display: block;">
<div class="row gift-cards-list" data-gcid="2790030169169063156"
style="display: flex;">
<div class="small-6 large-5">...169169063156</div>
<div class="small-5 large-6">$25.90
<br class="hide-for-large">
<span class="gc-amount-left">($74.10 left on card)
</span>
</div>
<div class="small-1 large-1 small-text-right">
<button type="button" class="remove-gift-cert pointer"
data-gcid="2790030169169063156">
<span class="icon icon-cross-standard-small-black"
Post by NaviHan
</span>
</button>
</div>
</div>
<hr class="gc-separator" style="display: block;">
</div>
The pageobject is defined as
div(:applied_gift_cards, :class => 'gc-list')
And Im trying to access "...163867647149 " and "$20.00" as which gave error
return applied_gift_cards_element.div_element(:index => 1).div_element(:index =>0).text
return applied_gift_cards_element.div_element(:index => 1).div_element(:index =>0).text
Watir::Exception::UnknownObjectException: timed out after 30 seconds,
waiting for #<Watir::Div: located: false; {:class=>"gc-list",
:tag_name=>"div"} --> {:index=>1, :tag_name=>"div"} --> {:index=>0,
:tag_name=>"div"}> to be located
When printing the same element actually prints the Pageobect
puts applied_gift_cards_element.div_element(:index => 1).div_element(:index
=>0)
#<PageObject::Elements::Div:0x0000000003b66388>
A puts of the following printed as below which is again confusing
puts applied_gift_cards_element.div_element(:index => 0).inner_html
puts applied_gift_cards_element.div_element(:index => 1).inner_html
puts applied_gift_cards_element.div_element(:index => 2).inner_html
puts applied_gift_cards_element.div_element(:index => 3).inner_html
<div class="small-6 large-5">Card</div>
<div class="small-5">Amount Taken</div>
Card
Amount Taken
<div class="small-6 large-5">...163867647149</div><div class="small-5 large-6">$20.00</div><div class="small-1 large-1 small-text-right"><button type="button" class="remove-gift-cert pointer" data-gcid="2790030163867647149"><span class="icon icon-cross-standard-small-black"></span></button></div>
Am I doing something wrong here?
--
--
Before posting, please read https://github.com/watir/watir_meta/wiki/Guidelines-for-Posting-to-Watir-General-Google-Group.
In short: search before you ask, be nice.

watir-***@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+***@googlegroups.com
---
You received this message because you are subscribed to the Google Groups "Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email to watir-general+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
NaviHan
2018-11-23 04:44:34 UTC
Permalink
Oops my understanding was wrong here :-(

I can achieve this by using

return applied_gift_cards_element.children[index.to_i].children[0].text

Is there a a better way?
Post by NaviHan
Having trouble using index.
I have a section of a page as below.
<div class="gc-list">
<div class="row cards-list-titles" style="display: flex;">
<div class="small-6 large-5">Card</div>
<div class="small-5">Amount Taken</div>
</div>
<div class="row gift-cards-list" data-gcid="2790030163867647149" style
="display: flex;">
<div class="small-6 large-5">...163867647149</div>
<div class="small-5 large-6">$20.00</div>
<div class="small-1 large-1 small-text-right">
<button type="button" class="remove-gift-cert pointer"
data-gcid="2790030163867647149">
<span class="icon icon-cross-standard-small-black"></span>
</button>
</div>
</div>
<hr class="gc-separator" style="display: block;">
<div class="row gift-cards-list" data-gcid="2790030169169063156"
style="display: flex;">
<div class="small-6 large-5">...169169063156</div>
<div class="small-5 large-6">$25.90
<br class="hide-for-large">
<span class="gc-amount-left">($74.10 left on card)
</span>
</div>
<div class="small-1 large-1 small-text-right">
<button type="button" class="remove-gift-cert pointer"
data-gcid="2790030169169063156">
<span class="icon icon-cross-standard-small-black"
Post by NaviHan
</span>
</button>
</div>
</div>
<hr class="gc-separator" style="display: block;">
</div>
The pageobject is defined as
div(:applied_gift_cards, :class => 'gc-list')
And Im trying to access "...163867647149 " and "$20.00" as which gave error
return applied_gift_cards_element.div_element(:index => 1).div_element(:index =>0).text
return applied_gift_cards_element.div_element(:index => 1).div_element(:index =>0).text
Watir::Exception::UnknownObjectException: timed out after 30 seconds,
waiting for #<Watir::Div: located: false; {:class=>"gc-list",
:tag_name=>"div"} --> {:index=>1, :tag_name=>"div"} --> {:index=>0,
:tag_name=>"div"}> to be located
When printing the same element actually prints the Pageobect
puts applied_gift_cards_element.div_element(:index => 1).div_element(:index
=>0)
#<PageObject::Elements::Div:0x0000000003b66388>
A puts of the following printed as below which is again confusing
puts applied_gift_cards_element.div_element(:index => 0).inner_html
puts applied_gift_cards_element.div_element(:index => 1).inner_html
puts applied_gift_cards_element.div_element(:index => 2).inner_html
puts applied_gift_cards_element.div_element(:index => 3).inner_html
<div class="small-6 large-5">Card</div>
<div class="small-5">Amount Taken</div>
Card
Amount Taken
<div class="small-6 large-5">...163867647149</div><div class="small-5 large-6">$20.00</div><div class="small-1 large-1 small-text-right"><button type="button" class="remove-gift-cert pointer" data-gcid="2790030163867647149"><span class="icon icon-cross-standard-small-black"></span></button></div>
Am I doing something wrong here?
--
--
Before posting, please read https://github.com/watir/watir_meta/wiki/Guidelines-for-Posting-to-Watir-General-Google-Group.
In short: search before you ask, be nice.

watir-***@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+***@googlegroups.com
---
You received this message because you are subscribed to the Google Groups "Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email to watir-general+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Justin Ko
2018-11-23 14:26:22 UTC
Permalink
Instead of working from the the "gc-list", you could work from the
"gift-cards-list". It would save a level of nesting and eliminate the child
vs descendant difference:

# Page-Object
divs(:applied_gift_card, :class => 'gift-cards-list')

# Usage
p page.applied_gift_card_elements[0].div_element(index: 0).text
#=> "...163867647149"
p page.applied_gift_card_elements[0].div_element(index: 1).text
#=> "$20.00"

For readability, I would suggest taking it a step further and using page
sections:

class MyPage
include PageObject

class AppliedGiftCard
include PageObject

div(:card, index: 0)
div(:amount_taken, index: 1)
end

page_sections(:applied_gift_cards, AppliedGiftCard, class:
'gift-cards-list', tag_name: 'div')
end

page = MyPage.new(browser)
p page.applied_gift_cards[0].card
#=> "...163867647149"
p page.applied_gift_cards[0].amount_taken
#=> "$20.00"
p page.applied_gift_cards[1].card
#=> "...169169063156"
p page.applied_gift_cards[1].amount_taken
#=> "$25.90\n($74.10 left on card)"

Justin
Post by NaviHan
Oops my understanding was wrong here :-(
I can achieve this by using
return applied_gift_cards_element.children[index.to_i].children[0].text
Is there a a better way?
Post by NaviHan
Having trouble using index.
I have a section of a page as below.
<div class="gc-list">
<div class="row cards-list-titles" style="display: flex;">
<div class="small-6 large-5">Card</div>
<div class="small-5">Amount Taken</div>
</div>
<div class="row gift-cards-list" data-gcid="2790030163867647149"
style="display: flex;">
<div class="small-6 large-5">...163867647149</div>
<div class="small-5 large-6">$20.00</div>
<div class="small-1 large-1 small-text-right">
<button type="button" class="remove-gift-cert pointer"
data-gcid="2790030163867647149">
<span class="icon icon-cross-standard-small-black"
Post by NaviHan
</span>
</button>
</div>
</div>
<hr class="gc-separator" style="display: block;">
<div class="row gift-cards-list" data-gcid="2790030169169063156"
style="display: flex;">
<div class="small-6 large-5">...169169063156</div>
<div class="small-5 large-6">$25.90
<br class="hide-for-large">
<span class="gc-amount-left">($74.10 left on card)
</span>
</div>
<div class="small-1 large-1 small-text-right">
<button type="button" class="remove-gift-cert
pointer" data-gcid="2790030169169063156">
<span class="icon
icon-cross-standard-small-black"></span>
</button>
</div>
</div>
<hr class="gc-separator" style="display: block;">
</div>
The pageobject is defined as
div(:applied_gift_cards, :class => 'gc-list')
And Im trying to access "...163867647149 " and "$20.00" as which gave error
return applied_gift_cards_element.div_element(:index => 1).div_element(:index =>0).text
return applied_gift_cards_element.div_element(:index => 1).div_element(:index =>0).text
Watir::Exception::UnknownObjectException: timed out after 30 seconds,
waiting for #<Watir::Div: located: false; {:class=>"gc-list",
:tag_name=>"div"} --> {:index=>1, :tag_name=>"div"} --> {:index=>0,
:tag_name=>"div"}> to be located
When printing the same element actually prints the Pageobect
puts applied_gift_cards_element.div_element(:index => 1).div_element(:index
=>0)
#<PageObject::Elements::Div:0x0000000003b66388>
A puts of the following printed as below which is again confusing
puts applied_gift_cards_element.div_element(:index => 0).inner_html
puts applied_gift_cards_element.div_element(:index => 1).inner_html
puts applied_gift_cards_element.div_element(:index => 2).inner_html
puts applied_gift_cards_element.div_element(:index => 3).inner_html
<div class="small-6 large-5">Card</div>
<div class="small-5">Amount Taken</div>
Card
Amount Taken
<div class="small-6 large-5">...163867647149</div><div class="small-5 large-6">$20.00</div><div class="small-1 large-1 small-text-right"><button type="button" class="remove-gift-cert pointer" data-gcid="2790030163867647149"><span class="icon icon-cross-standard-small-black"></span></button></div>
Am I doing something wrong here?
--
--
Before posting, please read https://github.com/watir/watir_meta/wiki/Guidelines-for-Posting-to-Watir-General-Google-Group.
In short: search before you ask, be nice.

watir-***@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+***@googlegroups.com
---
You received this message because you are subscribed to the Google Groups "Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email to watir-general+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
NaviHan
2018-11-24 05:52:21 UTC
Permalink
Hi Justin

The collection was the first thing I tried. But the issue is when there is
only one gift card applied, meaning only one div with class <div class="row
gift-cards-list"
then applied_gift_card_elements[0] gave me error.

Will the collection work when there is just one div?
Post by NaviHan
Having trouble using index.
I have a section of a page as below.
<div class="gc-list">
<div class="row cards-list-titles" style="display: flex;">
<div class="small-6 large-5">Card</div>
<div class="small-5">Amount Taken</div>
</div>
<div class="row gift-cards-list" data-gcid="2790030163867647149" style
="display: flex;">
<div class="small-6 large-5">...163867647149</div>
<div class="small-5 large-6">$20.00</div>
<div class="small-1 large-1 small-text-right">
<button type="button" class="remove-gift-cert pointer"
data-gcid="2790030163867647149">
<span class="icon icon-cross-standard-small-black"></span>
</button>
</div>
</div>
<hr class="gc-separator" style="display: block;">
<div class="row gift-cards-list" data-gcid="2790030169169063156"
style="display: flex;">
<div class="small-6 large-5">...169169063156</div>
<div class="small-5 large-6">$25.90
<br class="hide-for-large">
<span class="gc-amount-left">($74.10 left on card)
</span>
</div>
<div class="small-1 large-1 small-text-right">
<button type="button" class="remove-gift-cert pointer"
data-gcid="2790030169169063156">
<span class="icon icon-cross-standard-small-black"
Post by NaviHan
</span>
</button>
</div>
</div>
<hr class="gc-separator" style="display: block;">
</div>
The pageobject is defined as
div(:applied_gift_cards, :class => 'gc-list')
And Im trying to access "...163867647149 " and "$20.00" as which gave error
return applied_gift_cards_element.div_element(:index => 1).div_element(:index =>0).text
return applied_gift_cards_element.div_element(:index => 1).div_element(:index =>0).text
Watir::Exception::UnknownObjectException: timed out after 30 seconds,
waiting for #<Watir::Div: located: false; {:class=>"gc-list",
:tag_name=>"div"} --> {:index=>1, :tag_name=>"div"} --> {:index=>0,
:tag_name=>"div"}> to be located
When printing the same element actually prints the Pageobect
puts applied_gift_cards_element.div_element(:index => 1).div_element(:index
=>0)
#<PageObject::Elements::Div:0x0000000003b66388>
A puts of the following printed as below which is again confusing
puts applied_gift_cards_element.div_element(:index => 0).inner_html
puts applied_gift_cards_element.div_element(:index => 1).inner_html
puts applied_gift_cards_element.div_element(:index => 2).inner_html
puts applied_gift_cards_element.div_element(:index => 3).inner_html
<div class="small-6 large-5">Card</div>
<div class="small-5">Amount Taken</div>
Card
Amount Taken
<div class="small-6 large-5">...163867647149</div><div class="small-5 large-6">$20.00</div><div class="small-1 large-1 small-text-right"><button type="button" class="remove-gift-cert pointer" data-gcid="2790030163867647149"><span class="icon icon-cross-standard-small-black"></span></button></div>
Am I doing something wrong here?
--
--
Before posting, please read https://github.com/watir/watir_meta/wiki/Guidelines-for-Posting-to-Watir-General-Google-Group.
In short: search before you ask, be nice.

watir-***@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+***@googlegroups.com
---
You received this message because you are subscribed to the Google Groups "Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email to watir-general+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Justin Ko
2018-11-25 02:14:28 UTC
Permalink
Hi Navi,

One element still counts as a collection, so it should work. What error did
you get?

Justin
Post by NaviHan
Hi Justin
The collection was the first thing I tried. But the issue is when there is
only one gift card applied, meaning only one div with class <div class="row
gift-cards-list"
then applied_gift_card_elements[0] gave me error.
Will the collection work when there is just one div?
Post by NaviHan
Having trouble using index.
I have a section of a page as below.
<div class="gc-list">
<div class="row cards-list-titles" style="display: flex;">
<div class="small-6 large-5">Card</div>
<div class="small-5">Amount Taken</div>
</div>
<div class="row gift-cards-list" data-gcid="2790030163867647149"
style="display: flex;">
<div class="small-6 large-5">...163867647149</div>
<div class="small-5 large-6">$20.00</div>
<div class="small-1 large-1 small-text-right">
<button type="button" class="remove-gift-cert pointer"
data-gcid="2790030163867647149">
<span class="icon icon-cross-standard-small-black"
Post by NaviHan
</span>
</button>
</div>
</div>
<hr class="gc-separator" style="display: block;">
<div class="row gift-cards-list" data-gcid="2790030169169063156"
style="display: flex;">
<div class="small-6 large-5">...169169063156</div>
<div class="small-5 large-6">$25.90
<br class="hide-for-large">
<span class="gc-amount-left">($74.10 left on card)
</span>
</div>
<div class="small-1 large-1 small-text-right">
<button type="button" class="remove-gift-cert
pointer" data-gcid="2790030169169063156">
<span class="icon
icon-cross-standard-small-black"></span>
</button>
</div>
</div>
<hr class="gc-separator" style="display: block;">
</div>
The pageobject is defined as
div(:applied_gift_cards, :class => 'gc-list')
And Im trying to access "...163867647149 " and "$20.00" as which gave error
return applied_gift_cards_element.div_element(:index => 1).div_element(:index =>0).text
return applied_gift_cards_element.div_element(:index => 1).div_element(:index =>0).text
Watir::Exception::UnknownObjectException: timed out after 30 seconds,
waiting for #<Watir::Div: located: false; {:class=>"gc-list",
:tag_name=>"div"} --> {:index=>1, :tag_name=>"div"} --> {:index=>0,
:tag_name=>"div"}> to be located
When printing the same element actually prints the Pageobect
puts applied_gift_cards_element.div_element(:index => 1).div_element(:index
=>0)
#<PageObject::Elements::Div:0x0000000003b66388>
A puts of the following printed as below which is again confusing
puts applied_gift_cards_element.div_element(:index => 0).inner_html
puts applied_gift_cards_element.div_element(:index => 1).inner_html
puts applied_gift_cards_element.div_element(:index => 2).inner_html
puts applied_gift_cards_element.div_element(:index => 3).inner_html
<div class="small-6 large-5">Card</div>
<div class="small-5">Amount Taken</div>
Card
Amount Taken
<div class="small-6 large-5">...163867647149</div><div class="small-5 large-6">$20.00</div><div class="small-1 large-1 small-text-right"><button type="button" class="remove-gift-cert pointer" data-gcid="2790030163867647149"><span class="icon icon-cross-standard-small-black"></span></button></div>
Am I doing something wrong here?
--
--
Before posting, please read https://github.com/watir/watir_meta/wiki/Guidelines-for-Posting-to-Watir-General-Google-Group.
In short: search before you ask, be nice.

watir-***@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+***@googlegroups.com
---
You received this message because you are subscribed to the Google Groups "Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email to watir-general+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
NaviHan
2018-11-26 05:34:00 UTC
Permalink
Hi Justin

I cant remember what I did wrong with the collection, Im pretty sure I used
"

applied_gift_cards_elements[index.to_i].div_element(:index => 0).text"


Anyways this absolutely works fine now.
Thanks a lot :-)
Post by NaviHan
Having trouble using index.
I have a section of a page as below.
<div class="gc-list">
<div class="row cards-list-titles" style="display: flex;">
<div class="small-6 large-5">Card</div>
<div class="small-5">Amount Taken</div>
</div>
<div class="row gift-cards-list" data-gcid="2790030163867647149" style
="display: flex;">
<div class="small-6 large-5">...163867647149</div>
<div class="small-5 large-6">$20.00</div>
<div class="small-1 large-1 small-text-right">
<button type="button" class="remove-gift-cert pointer"
data-gcid="2790030163867647149">
<span class="icon icon-cross-standard-small-black"></span>
</button>
</div>
</div>
<hr class="gc-separator" style="display: block;">
<div class="row gift-cards-list" data-gcid="2790030169169063156"
style="display: flex;">
<div class="small-6 large-5">...169169063156</div>
<div class="small-5 large-6">$25.90
<br class="hide-for-large">
<span class="gc-amount-left">($74.10 left on card)
</span>
</div>
<div class="small-1 large-1 small-text-right">
<button type="button" class="remove-gift-cert pointer"
data-gcid="2790030169169063156">
<span class="icon icon-cross-standard-small-black"
Post by NaviHan
</span>
</button>
</div>
</div>
<hr class="gc-separator" style="display: block;">
</div>
The pageobject is defined as
div(:applied_gift_cards, :class => 'gc-list')
And Im trying to access "...163867647149 " and "$20.00" as which gave error
return applied_gift_cards_element.div_element(:index => 1).div_element(:index =>0).text
return applied_gift_cards_element.div_element(:index => 1).div_element(:index =>0).text
Watir::Exception::UnknownObjectException: timed out after 30 seconds,
waiting for #<Watir::Div: located: false; {:class=>"gc-list",
:tag_name=>"div"} --> {:index=>1, :tag_name=>"div"} --> {:index=>0,
:tag_name=>"div"}> to be located
When printing the same element actually prints the Pageobect
puts applied_gift_cards_element.div_element(:index => 1).div_element(:index
=>0)
#<PageObject::Elements::Div:0x0000000003b66388>
A puts of the following printed as below which is again confusing
puts applied_gift_cards_element.div_element(:index => 0).inner_html
puts applied_gift_cards_element.div_element(:index => 1).inner_html
puts applied_gift_cards_element.div_element(:index => 2).inner_html
puts applied_gift_cards_element.div_element(:index => 3).inner_html
<div class="small-6 large-5">Card</div>
<div class="small-5">Amount Taken</div>
Card
Amount Taken
<div class="small-6 large-5">...163867647149</div><div class="small-5 large-6">$20.00</div><div class="small-1 large-1 small-text-right"><button type="button" class="remove-gift-cert pointer" data-gcid="2790030163867647149"><span class="icon icon-cross-standard-small-black"></span></button></div>
Am I doing something wrong here?
--
--
Before posting, please read https://github.com/watir/watir_meta/wiki/Guidelines-for-Posting-to-Watir-General-Google-Group.
In short: search before you ask, be nice.

watir-***@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+***@googlegroups.com
---
You received this message because you are subscribed to the Google Groups "Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email to watir-general+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...