[Wtr-general] Automation annoyingness
Jeff Wood
jeff.darklight at gmail.com
Fri Jun 9 17:13:11 EDT 2006
I've seen example code like this on the ruby talk list ... I just sent
an email there this morning to see if somebody would dredge it back up
for me...
The syntax isn't very had to do ... I'll post here once I've got
something easily transferrable for ya.
Things are still ok here in my world too ... remember you're still
always welcome to ask whatever you need of me. ;)
--jw.
On 6/9/06, Jeff Fry <jfry at lyris.com> wrote:
>
> Hey Jeff, nice suggestion - very intuitive syntax (not that I would know
> how to code it).
> Hope you're enjoying yourself. Life is good here.
> Jeff F
>
> Jeff Wood wrote:
> From: wtr-general-bounces at rubyforge.org
> Bcc:
> Message-ID: <AVSPAMYiufL0xJdQdSe0000c47f at avspam.lyris.com>
> X-OriginalArrivalTime: 09 Jun 2006 06:35:36.0947 (UTC)
> FILETIME=[EAEA2C30:01C68B8E]
> Date: 8 Jun 2006 23:35:36 -0700
>
> actually, I would code up a "when" functionality just like endfix if
> or unless ... then you could do
>
>
> ie.link( :text, "Second" ).click when ie.link( :text, "Second" ).exists? ...
> or something like that. --jw. On 6/8/06, Jeff Fry <jfry at lyris.com> wrote:
>
> Bret Pettichord wrote:
>
> Specifically, I propose that where you currently do this:
>
> while not ($ie.link(:text,"Second").exists?)
> sleep 0.5
> end
> $ie.link(:text,"Second").click
>
>
>
>
>
> You would instead just do this
>
> $ie.link(:text,"Second").click
>
>
>
>
>
> And you would implicitly get the polling behavior that had been explicit.
> The proposal is to change all the element methods, except (perhaps)
> "exists?".
>
> It seems to me that "exists?" is a separate case. We should consider it
> separately.
>
> Do we have agreement on the usefulness of the proposal, if no change is
> made to exists?
>
> Bret
> My question is: Do we take anything useful away by making $ie.link always
> do this? If we have a configurable default timeout that can be set to 0 I
> think we're fine.
>
> Here's what I'd like to see:
> 1) Add a global configurable default time to wait for pages to load. I'd
> propose leaving this at 0 seconds by default and letting people up it
> intentionally.
> 2) Add a new optional argument on $ie.link, where I can choose to override
> that default:
>
> $ie.link_wait(:text,"Second").click ## continues to
> do what it's always done, unless I have deliberately changed my default page
> wait. (Or if I've set my default page wait to (for example) 600 seconds,
> it'll wait for up to 10 minutes on each page before giving up.)
>
> $ie.link(:text,"Second", 30).click ## would wait up to 30 seconds for
> the page to load before erroring out, regardless of my default page wait
> time.
>
> ...btw, I don't have a strong opinion on whether the default wait time
> would be 0 or non-0. The question for me is which is least surprising
> scenario: Someone who expects the script to error when a page doesn't return
> quickly, or someone who expects the script to wait patiently while something
> happens prior to page load.
>
> Jeff
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
>
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
>
>
>
>
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
>
More information about the Wtr-general
mailing list