Oops
I thought because in a case where the wishlist is empty (i:e no buttons on
wishlist page) the buttons are undefined.
So thats not the case?
When the page class is loaded all the elements are declared or what?
Thsi si equivalent to doing on irb
a.any?
without declaring a as a = [ ]
irb(main):001:0> a.any
Traceback (most recent call last):
2: from C:/Ruby25-x64/bin/irb.cmd:19:in `<main>'
1: from (irb):1
NameError (undefined local variable or method `a' for main:Object)
irb(main):002:0> a = []
=> []
irb(main):003:0> a.any?
=> false
irb(main):004:0>
On Wednesday, 27 March 2019 11:08:54 UTC+11, NaviHan wrote:
>
> Hi
>
> I have a collections of buttons defined as
>
> buttons(:products_on_wishlist, :class => 'product-quick-add')
>
>
>
> Basically they represent the products on wishlist
>
> The page can have
> 1. No products (no buttons)
> 2. One product (1 button)
> 3. More than one products (more than 1 button)
>
> I need to check if the wishlist page is empty. Basically I want to check
> if the button is present on not.
> Because the button is defined as a collection
>
>
> products_on_wishlist_elemets.present?
>
>
> is not working.
>
> Is there a way to check if the collection is present or not?
>
>
>
--
--
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.
[email protected]
http://groups.google.com/group/watir-general
[email protected]
---
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 [email protected].
For more options, visit https://groups.google.com/d/optout.