Hi Vishal!

The error message you're getting suggests that Watir can't find the
button with id 'showSearchCriteriaButton'.  Have you verified that
your browser is on the page you expect and that you get the same error
when you attempt to perform the action in an irb session?

Sometimes elements that appear as buttons are actually links.  Have
you tried the following?

$ie.link(:text, 'Show Search Criteria').click

Hope this helps!

-Tiffany



On May 10, 4:55 am, Vishal <[email protected]> wrote:
> My program it unable to click on Submit button. Below is the Code
>
> My code :
>  def Click_Show_Criteria
>    $ie.button(:id,'showSearchCriteriaButton').click
>  end
>
> HTML:
>
> <TABLE cellpadding=0 cellspacing=0 style='width:100%'><TR
> class='action_button_area'><TD style='width:99%'><BUTTON
> id='hideSearchCriteriaButton' onclick='hideSearchCriteria()'>Hide
> Search Criteria</BUTTON><BUTTON id='showSearchCriteriaButton'
> onclick='showSearchCriteria()'
> onmouseover='showFriendlySearchCriteriaText(this)'
> style='display:none'>Show Search Criteria</BUTTON>&nbsp;<TD
> NOWRAP><DIV NOWRAP id='_datasetNavArea'></DIV><TD style='text-
> align:right' NOWRAP><a id='subSearchNavArea'
> style='display:none;color:black' href='#' onclick='popSearch();return
> false;'>&lt;&lt;Back</a>&nbsp;<TD style='text-align:right' NOWRAP><TD
> style='text-align:right' NOWRAP id='optionsArea'><TD style='text-
> align:right' NOWRAP>Group By: <SELECT
> onchange='handleGroupBy(this);'><OPTION m_index='-1'>No
> Grouping<OPTION m_Index='2' m_DateGranularity='1'>Status</SELECT></
> TABLE>
>
> I am getting following error
>
> d:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:52:in
> `assert_ex
> ists': Unable to locate element, using :id,
> "showSearchCriteriaButton" (Watir::E
> xception::UnknownObjectException)
>
> --
> Before posting, please readhttp://watir.com/support. In short: search before 
> you ask, be nice.
>
> You received this message because you are subscribed 
> tohttp://groups.google.com/group/watir-general
> To post: [email protected]
> To unsubscribe: [email protected]

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: [email protected]
To unsubscribe: [email protected]

Reply via email to