Luckily I found the issue with the below problem. There was a small popup
that showed up on the page, once I dismiss that Im able to successfully
click the link
Used the call:-)
el.link_element}.click
Enter code here...
On Tuesday, 3 July 2018 21:48:19 UTC+10, NaviHan wrote:
>
> This is my
Put a debugger point in this line, once program reaches this line, wait for
sometime and execute it, if it works fine, then you can rescue the
exception ElementClickInterceptedError, this is possible only if you run in
Firefox because Chrome is not having this Exception.
On Mon 23 Jul, 2018, 4:34
Having yet another roadblock wrt Watir/PageObject gem automation
Im having a parent unordered list with child list elements and child links
as shown below
XXS
>
> 1. Just like we do plural for div, I mean divs, isnt there plural version
> for select_list i:e select_lists? Similarly buttons?
> How do we know if there is a plural version at all. I couldn't find
> the documentation.
>
The plural version `#select_lists` does exist. I don't think
Thanks a lot Justin. Your knowledge of PageObject gem is amazing. Hats Off
to 'cheezy' too.
I have a few clarifications.
1. Just like we do plural for div, I mean divs, isnt there plural version
for select_list i:e select_lists? Similarly buttons?
How do we know if there is a plural
Hey Justin, tell me what else you do not know in automation? You are
awesome dude! Thanks for contributing all your knowledge to WATIR.
On Wed 11 Jul, 2018, 11:43 PM Justin Ko, wrote:
> The accessors do not provide a mechanism for filtering the element
> collection. In other words, the
The accessors do not provide a mechanism for filtering the element
collection. In other words, the exception is from
`product_line_items_in_bag_elements(:"data-product-id" => '9350486827327')`.
You can filter the elements manually using `#find`:
class MyPage
include PageObject
Hi Justin/Titus
There is a correction in the html code
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
On Tuesday, 3 July 2018 21:48:19 UTC+10, NaviHan wrote:
>
> This is my first post here. Apologies
I tried this way. but got error
ArgumentError: wrong number of arguments (given 1, expected 0)
elements(:product_line_items_in_bag, :name => 'dwfrm_cart_shipments')
product_line_items_in_bag_elements(:"data-product-id" => '9350486827327').set(2)
On Tuesday, 3 July 2018 21:48:19 UTC+10,
Hi Justin/Titus
Facing another challenge here.
I have a section of a page with multiple outer div which has lots of inner
divs/spans etc of which Im interested in a select with an attribute named
"data-product-id" which has a specific value.
1
2
3
4
5
6
7
8
9
10
Hi Justin
That worked like a charm. PageObject gem is amazing :-)
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 pic.
>
>
> The html code for the section is as follows
>
Hi,
Accessing the spans within minimum_spend_threshold_error would be similar
to what you did with nav_div_elements:
page.minimum_spend_threshold_error_element.span_elements[0].html
#=> ""
page.minimum_spend_threshold_error_element.span_elements[1].html
#=> "Sorry, your Perks Payday Voucher
Hi Titus
I have got a related query
I have a section of page
Sorry, your Perks Payday Voucher will be removed if you
proceed to checkout
This reward is only available on orders AUD 10.00 and over.
If I define the outer div as div
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
28 matches
Mail list logo