Why do you search for "url" when attribute is "href"?

It should be b.link(:href, /loadBuildPage/).exists?

On Tuesday, September 17, 2013 6:51:42 AM UTC+7, Rakesh Kapoor wrote:
>
> i want to search for links by the partial name of path. i want to click on 
> the element where it points to href="/ive/loadBuildPage.ive"
>
>
> the actual html fragment is 
> <li> … </li><li><a target="insideview" href="/ive/loadBuildPage.ive"> … 
> </a></li>
>
> i get error invalid attribute for :url.
>
> how do i fix it?
>
>
> irb(main):022:0>  assert(b.link(:url, /loadBuildPage/).exists?)
> Watir::Exception::MissingWayOfFindingObjectException: invalid attribute: 
> :url
>         from 
> C:/Ruby187/lib/ruby/gems/1.8/gems/watir-webdriver-0.6.4/lib/watir
> ebdriver/locators/element_locator.rb:238:in `assert_valid_as_attribute'
>         from 
> C:/Ruby187/lib/ruby/gems/1.8/gems/watir-webdriver-0.6.4/lib/watir
> ebdriver/locators/element_locator.rb:219:in `normalize_selector'
>         from 
> C:/Ruby187/lib/ruby/gems/1.8/gems/watir-webdriver-0.6.4/lib/watir
> ebdriver/locators/element_locator.rb:198:in `normalized_selector'
>         from 
> C:/Ruby187/lib/ruby/gems/1.8/gems/watir-webdriver-0.6.4/lib/watir
> ebdriver/locators/element_locator.rb:195:in `each'
>         from 
> C:/Ruby187/lib/ruby/gems/1.8/gems/watir-webdriver-0.6.4/lib/watir
> ebdriver/locators/element_locator.rb:195:in `normalized_selector'
>         from 
> C:/Ruby187/lib/ruby/gems/1.8/gems/watir-webdriver-0.6.4/lib/watir
> ebdriver/locators/element_locator.rb:75:in `find_first_by_multiple'
>         from 
> C:/Ruby187/lib/ruby/gems/1.8/gems/watir-webdriver-0.6.4/lib/watir
> ebdriver/locators/element_locator.rb:32:in `locate'
>         from 
> C:/Ruby187/lib/ruby/gems/1.8/gems/watir-webdriver-0.6.4/lib/watir
> ebdriver/elements/element.rb:509:in `locate'
>         from 
> C:/Ruby187/lib/ruby/gems/1.8/gems/watir-webdriver-0.6.4/lib/watir
> ebdriver/elements/element.rb:487:in `assert_exists'
>         from 
> C:/Ruby187/lib/ruby/gems/1.8/gems/watir-webdriver-0.6.4/lib/watir
> ebdriver/elements/element.rb:43:in `exists?'
>

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

Reply via email to