Hi Titus
Job done. used "elements" instead of "element" as below.
nav_divs_elements[index].span_element
Thanks a million
On Tuesday, 3 July 2018 21:48:19 UTC+10, NaviHan wrote:
>
> This is my first post here. Apologies if there is a mistake.
>
> I have a section of a page as attached in the
Hi Titus
I have declared the element as
divs(:nav_divs, class: "row applied-voucers-list")
and accessing span as
nav_divs_element[index].span_element
index = 0
Error is
NoMethodError: undefined method `nav_divs_element' for
#
On Tuesday, 3 July 2018 21:48:19 UTC+10, NaviHan wrote:
>
Yeah, wow, your code is kind of all over the place. What are you actually
trying to do?
Notes:
1. Don't use multiple classes as a string value in a class locator
2. innerText isn't an attribute
3. did you include PageObject module?
4. Did you define `nav_divs`?
5. Using `Watir::Wait` directly is
Hi Titus
Tried this
Enter code here...divs(:nav_divs, class: "row applied-voucers-list")
and
Enter code here...@voucher_val = Watir::Wait.until {nav_divs_element[index].
span_element}.attribute_value("innerText")
index = 0 as passed by the caller
However Im getting the error
Enter code
Yes, how Page Object provides for the ability to manage dynamic references
is one of my major frustrations with the gem's API.
Firstly, Watir (and Page Object) allow you to pass in multiple parameters
in a hash format:
div(:nav_div, {class: 'applied-vouchers-list', index: 1})
nav_div_element
Kindly wait for sometime there is an another guy here named JustinKo, he
will come here soon he knows page object. If he doesn't come here please
post your question on stackoverflow he will surely answer. Sorry to say I
am not using Page object .
On Tue 3 Jul, 2018, 6:20 PM NaviHan, wrote:
>
Here is a reference to where Im coming from
https://github.com/cheezy/page-object/wiki/Nested-Elements
On Tuesday, 3 July 2018 22:38:58 UTC+10, NaviHan wrote:
>
> Will try that.
>
> But how to use the index parameter. To explain further
>
> Im defining the div element as
>
> div(:nav_div, class:
Will try that.
But how to use the index parameter. To explain further
Im defining the div element as
div(:nav_div, class: "row applied-voucers-list")
And the span element as
span (:applied_voucher) do |page|
page.nav_div_element.span_element
end
This gives the span element using
I am not stopping you, I asked you to convert that into your model.
On Tuesday, July 3, 2018 at 5:57:35 PM UTC+5:30, NaviHan wrote:
>
> I would like to use the PageObject gem..
>
> On Tue, Jul 3, 2018 at 10:24 PM, >
> wrote:
>
>> What are you saying me? I gave you the answer, did you try?
>>
I would like to use the PageObject gem..
On Tue, Jul 3, 2018 at 10:24 PM, wrote:
> What are you saying me? I gave you the answer, did you try?
>
> On Tuesday, July 3, 2018 at 5:51:20 PM UTC+5:30, NaviHan wrote:
>>
>> Thanks.
>> The query is posted in the group now.
>>
What are you saying me? I gave you the answer, did you try?
On Tuesday, July 3, 2018 at 5:51:20 PM UTC+5:30, NaviHan wrote:
>
> Thanks.
> The query is posted in the group now.
> https://groups.google.com/forum/#!topic/watir-general/mJ1IhrQWCxg
>
> Hi Raja
>
> In fact I nailed it in parts by
Thanks.
The query is posted in the group now.
https://groups.google.com/forum/#!topic/watir-general/mJ1IhrQWCxg
Hi Raja
In fact I nailed it in parts by using
div(:nav_div, class: "row applied-voucers-list")
span (:applied_voucher) do |page|
page.nav_div_element.span_element
end
This
Ah sorry, I made a small mistake in last mail
Use this
p b.divs(class: "row applied-voucers-list".split).map {|div| div.div.span.
> text}
On Tuesday, July 3, 2018 at 5:36:15 PM UTC+5:30, NaviHan wrote:
>
> Hi All
>
> In fact I nailed it in parts by using
>
> div(:nav_div, class: "row
I will write in watir and then you may convert that code into your
pageobject code
p b.divs(class: "row applied-voucers-list").map {|div| div.div.span.text}
This will print two span text, look at carefully I used b.divs not b.div
On Tuesday, July 3, 2018 at 5:36:15 PM UTC+5:30, NaviHan
Hi All
In fact I nailed it in parts by using
div(:nav_div, class: "row applied-voucers-list")
span (:applied_voucher) do |page|
page.nav_div_element.span_element
end
This gives me the first div.
But how do I access the second div using index parameter?
On Tuesday, 3 July 2018
This is my first post here. Apologies if there is a mistake.
I have a section of a page as attached in the pic.
The html code for the section is as follows
Enter code here...
9830318220466018
Remove
9831228610400260
Remove
I need to assert two value here
1. The vouchers
16 matches
Mail list logo