On Sunday, December 10, 2017 at 9:03:18 AM UTC-8, rajagopalan madasami 
wrote:
>
> It is known that using :visible_text will not have the same performance. 
> It has to iterate over elements, where as the Selenium ones would not. The 
> benefit of :visible_text is that we can apply it across all element types, 
> not just links.
>
> Yes, it is increasing the performance ! But still it's taking much time 
> but compared to element() function it's okay. But *link*: locator really 
> rocks! I still don't have any clue why WATIR is going to forbid using such 
> a powerful performance of Selenium, I don't see any reason other than 
> putting just name sake of WATIR API. 
>
> I have a number of ideas for improving locator performance in general. 
> However, for this specific case, you will see performance improvements by 
> not using #element. Just switching to using #link will cut down the 
> number of elements Watir has to iterate over. If there are other locators 
> to reduce the links checked, that will also help performance. If that 
> doesn't help, a specific example would help us identify other places for 
> performance improvements.
>
> Yes, I agree using b.link() increases the performance, But I completely 
> against the idea of not using the link: locator of selenium.
>
> If I pass the locator which is inside the selenium locators list, then 
> make a direct call to find_element just by passing those two values, but 
> when you find the locator which is not in selenium locators list, then go 
> for formation of xpath. It's pretty simple. It was good but I don't know 
> why all these unnecessary arrangement which actually spoils the WATIR 
> structure rather than improving. The very first time yesterday when I 
> developed  WATIR code for new project, I installed previous version(6.8.4) 
> because of this new arrangement. 
>
>
If you want to just use `.element` method instead of specific element type 
methods such as `.link` , and use selenium locators instead of those that 
Watir provides, then why use Watir?  Why not just use raw Webdriver 
instead, since you see to like its API more than the Watir API?   The only 
time I use .element with Watir is as a last resort when nothing else will 
work.  Otherwise I use the selection methods that parallel the DOM element 
type I am selecting, be it a .div or a .link or a .checkbox

-- 
-- 
Before posting, please read http://watir.com/support. 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