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 PM NaviHan, <hishinessr...@gmail.com> wrote:

> Made a slight modification in method "select_size (size_position)"
>
> el.link_element.when_visible.click
>
>
> This gives me the error
> Selenium::WebDriver::Error::UnknownError: unknown error: Element <a
> class="swatchanchor value-cont" href="
> https://ci.cottonon.com/AU/show-variation/?dwvar_2003013_color=2003013-05&amp;pid=2003013&amp;dwvar_2003013_size=XS&amp;originalPid=2003013-05";
> title="Select Size: XS" data-attribute-type="size" data-size="XS">...</a>
> is not clickable at point (659, 593). Other element would receive the
> click: <div id="feedback-row" class="small-12 large-4 xlarge-5"
> data-sticky-container="">...</div>
>   (Session info: chrome=67.0.3396.99)
>   (Driver info: chromedriver=2.36.540470
> (e522d04694c7ebea4ba8821272dbef4f9b818c91),platform=Windows NT 6.1.7601 SP1
> x86_64)
>
>
>
> 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
>> Enter code here...<div class="small-12 applied-evouchers">
>> <div class="row applied-voucers-list">
>> <div class="small-6">
>> <span>9830318220466018</span>
>> </div>
>> <div class="small-6 small-text-right">
>> <button type="button" class="remove-gift-cert"
>> data-gift-id="9830318220466018">
>> <span class="icon icon-cross-standard-small-black"></span>
>> <span class="underline remove-evoucher-button-text">Remove</span>
>> </button>
>> </div>
>> </div>
>> <hr>
>> <div class="row applied-voucers-list">
>> <div class="small-6">
>> <span>9831228610400260</span>
>> </div>
>> <div class="small-6 small-text-right">
>> <button type="button" class="remove-gift-cert"
>> data-gift-id="9831228610400260">
>> <span class="icon icon-cross-standard-small-black"></span>
>> <span class="underline remove-evoucher-button-text">Remove</span>
>> </button>
>> </div>
>> </div>
>> <hr>
>> </div>
>>
>> I need to assert two value here
>>
>> 1. The vouchers applied, which are 9830318220466018 & 9831228610400260
>> 2. The span "Remove"
>>
>> The issue Im facing is as these two divs are identical and 1 & 2 doesnt
>> have a unique identifier I cannt locate them using PageObjects.
>>
>> I can locate the element using the following Java script
>> document.getElementsByClassName('applied-voucers-list')[0].innerText;
>> This returns
>> Enter code here..."9830318220466018
>> Remove
>> "
>>
>> I tried to capture this with the code
>> Enter code here...@var =
>> @browser.execute_script("document.getElementsByClassName('applied-voucers-list')[0].innerText;")
>>
>> This isnt working
>>
>> Any clue?
>>
>> --
> --
> 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-general@googlegroups.com
> http://groups.google.com/group/watir-general
> watir-general+unsubscr...@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+unsubscr...@googlegroups.com.
> 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.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to