I think what bret said is
$my_button = $ie.button(:id, 'foo')
is a bad idea. It may be better to do something like...
def my_button()
return( $ie.button(:id, 'foo') )
end
while
my_string = $ie.text
could be fine, though you could still do
def my_string()
return( $ie.text )
end
... i think
Christian Kreutzer wrote:
> On 12/22/06, Bret Pettichord <[EMAIL PROTECTED]> wrote:
>
>
>> So we have consistently urged people to wrap their watir expressions in
>> methods rather than assign them to global variables. This makes it easy
>> to reuse them, and ensure that a correct rebinding occu
the watir expressions are now wrapped in methods but i cant see how
the object binding could be different from using global vars. I hope
someone can enlighten me on this
http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/117762add75f59e7/c7bb0338921b15ef?lnk=gst&q=global+variab
On 12/22/06, Bret Pettichord <[EMAIL PROTECTED]> wrote:
> So we have consistently urged people to wrap their watir expressions in
> methods rather than assign them to global variables. This makes it easy
> to reuse them, and ensure that a correct rebinding occurs on each reuse.
> Also, as i have b
John Lolis wrote:
> A second, slightly related question. Regardless of how you do it, i'm
> wondering whats going on behind the scenes.
> If you do
>
>> headline = $ie.div(:text, 'Pragmatic Version Control')
>> link = $ie.link(:class => 'addtocart', :after? => headline)
>>
>
> Is headlin
> link = ie.div(:text, 'Pragmatic Version
> Control').after.link(:class,
> addtocard')
>
>
> I think this is less intuitive and it would be
> somewhat harder to
> implement. That's why i came up with the other
> proposal, above.
Thats actually the first way I thought of it too.
A second, sli
John Lolis wrote:
> headline = $ie.div(:text, 'Pragmatic Version Control')
> link = $ie.link(:class => 'addtocart', :after? => headline)
>
> Is this saying you want the link that comes after headline? Is there a
> before? :)
>
Yes, there would also be a 'before' option, plus some others
> *if*
headline = $ie.div(:text, 'Pragmatic Version Control')
link = $ie.link(:class => 'addtocart', :after? => headline)
Is this saying you want the link that comes after headline? Is there a before?
:)
*if* thats the case, my only problem with it is that it seems to not follow the
standard syntax o
Željko Filipin wrote:
> This would make sense to me (no question mark)
>
> link = $ie.link(:class => 'addtocart', :after => headline)
>
> "By convention, methods that answer questions (i.e. Array#empty?
> returns *true* if the receiver is empty) end in question marks."
> (http://www.ruby-lang.org
On 12/20/06, Bret Pettichord <[EMAIL PROTECTED]> wrote:
link = $ie.link(:class => 'addtocart', :is_after? => headline)
This would make sense to me (no question mark)
link = $ie.link(:class => 'addtocart', :after => headline)
"By convention, methods that answer questions (i.e. Array#empty?
i can't see much difference between :after? and :is_after?. i would
read both versions as link after headline
Christian
On 12/20/06, Bret Pettichord <[EMAIL PROTECTED]> wrote:
> Yi, Lawrence wrote:
> > I would see that as link after headline.
> >
> >
> That was my original intention.
>
> Is this
Yi, Lawrence wrote:
> I would see that as link after headline.
>
>
That was my original intention.
Is this clearer?
link = $ie.link(:class => 'addtocart', :is_after? => headline)
Bret
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http:/
] Syntax for relative attributes
I am in the process of adding a new feature to Watir and have a
question.
Consider this code:
headline = $ie.div(:text, 'Pragmatic Version Control')
link = $ie.link(:class => 'addtocart', :after? => headline)
Would you assume th
Bret Pettichord wrote:
>I am in the process of adding a new feature to Watir and have a question.
>
> Consider this code:
>
> headline = $ie.div(:text, 'Pragmatic Version Control')
> link = $ie.link(:class => 'addtocart', :after? => headline)
>
> Would you assume that link was after headli
I am in the process of adding a new feature to Watir and have a question.
Consider this code:
headline = $ie.div(:text, 'Pragmatic Version Control')
link = $ie.link(:class => 'addtocart', :after? => headline)
Would you assume that link was after headline, or headline after link?
I can
15 matches
Mail list logo