You are wrongly giving class attribute there instead of id

Write

b.link(id: " ").click

On Sun, 17 Feb, 2019, 7:43 PM fugee ohu <[email protected] wrote:

> This is the anchor element I want to click
>
> <a id="linkFreeShip" href="javascript:;" class="sel-free filter-item "
> data-spm-anchor-id="2114.search0104.0.0">
> <i class="check-icon"
> data-spm-anchor-id="2114.search0104.0.i2.42966f2cOb5FTo"></i>
> <span class="bulkQty-a"
> data-spm-anchor-id="2114.search0104.0.i3.42966f2cOb5FTo">Free
> Shipping</span>
> </a>
>
> The selector path  to the anchor element is king of long I know how to
> reference selector paths with watir chrome driver using `css` or `at_css`
>  but I don't know how to access a selector path with `browser`
>
> I'm trying to click the element like this:
>
> browser.a(class: 'linkFreeShip').click but it fails to find it the anchor
>
> Caused by Watir::Wait::TimeoutError: timed out after 30 seconds, waiting
> for true condition on #<Watir::Anchor: located: false;
> {:class=>"linkFreeShip", :tag_name=>"a"}>
>
> How do I path to the element using `browser` object?
>
> --
> --
> 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.
>

-- 
-- 
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.

Reply via email to