Hi please add WATIR tag in stack overflow. People will be looking into that
always.

On Fri 10 Aug, 2018, 9:58 AM Navi, <[email protected]> wrote:

> Hi Titus
>
> I ran the script directly from Jenkins box. Its a Windows Server 2016
> edition.
> When the script runs I can see the popup appears and its stays for
> 10seconds(configured time) and then disappears. Then it fails complaining
> "Element no found".
>
> The local is Windows 7 machine..
> Very very strange...
>
>
> On Fri, Aug 10, 2018 at 1:28 PM, Titus Fortner <[email protected]>
> wrote:
>
>> So are you thinking the popup had already gone away on remote? Are you
>> sure it was ever opened in the first place? 10 seconds should be
>> plenty of time to get information off of something. Is there something
>> happening on the site or in the code that would keep you from getting
>> that information in that 10 seconds?
>> On Wed, Aug 8, 2018 at 8:23 PM NaviHan <[email protected]> wrote:
>> >
>> > Yes Titus. I took the screenshot as well.
>> > It shows the homepage of the site, without the popup.
>> > Basically the popup appears on the homepage for 10second(this is driven
>> by config) and after 10 seconds it disappears. This is where we are trying
>> to read the text of the popup.
>> >
>> > The screenshot show the homepage without the popup...
>> >
>> > On Friday, 3 August 2018 15:12:45 UTC+10, NaviHan wrote:
>> >>
>> >> I have a functionality where I click an a link from an email a voucher
>> gets added to the shopping cart and a pop up appears with a message. Im
>> trying to assert the text in the popup
>> >> I have defined the element as
>> >>
>> >> div(:cta_description, :css => '.homepage-clicktoactiavte-description')
>> >>
>> >> Tried to use a mix of Watir and Pageobejct to read the text. The below
>> code works 5 out of 10 times.
>> >>
>> >> @rewards_popup_txt = Watir::Wait.until{cta_description_element}.text
>> >> @rewards_popup_txt = @rewards_popup_txt.gsub(/[^$,.A-Za-z0-9]/," ")
>> >> return @rewards_popup_txt
>> >>
>> >>
>> >> Tried using, which doesnt even set the @reward_popup_txt and shows
>> error
>> >>
>> >>
>> >> if (Watir::Wait.while {cta_description_element.visible?})
>> >>   @rewards_popup_txt = cta_description_element.text
>> >> end
>> >> @rewards_popup_txt = @rewards_popup_txt.gsub(/[^$,.A-Za-z0-9]/," ")
>> >> return @rewards_popup_txt
>> >>
>> >> Error
>> >> NoMethodError: undefined method `gsub' for nil:NilClass
>> >> ./features/support/pages/Frontend/Cotton_On/Loyalty_Page.rb:22:in
>> `rewards_popup_description'
>> >>
>> >> Any stable way to do the job?
>> >
>> > --
>> > --
>> > 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]
>> <http://groups.google.com/group/[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.
>

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