Forum Discussion

darmstrong's avatar
darmstrong
Occasional Contributor
15 years ago

web app element identified with ID attribute is found but not clicked

I have a web element in my app that has an ID attribute.  In my script I call



  all.gwt_debug_add_report_component_button_MenuItem.Click();

 

but the following error:



Type    Message    Time    Link

There was an attempt to perform an action at point (0, 0), which is out of the window bounds.    15:51:42   



So TC is finding the web element, but not successfully clicking on it.  Any suggestions on what might be causing this?



HTML snippet:



<td class="gwt-MenuItem ImageMenuItem-FF gwt-MenuItem-selected" id="gwt-debug-add-report-component-button-MenuItem" role="menuitem" aria-haspopup="true" title="Add Component to Report" style="">

    <table class="MenuItem-InnerTable">

        <tbody>

            <tr>

                <td>

                    <div class="ImageMenuItem-Icon add-report-component-button"></div></td><td><div class="MenuItem-Text" style="display: none;"></div>

               </td>

           </tr>

        </tbody>

    </table>

</td>

3 Replies


  • Hi,





    We tried to reproduce the behavior with the code snippet you posted, but everything worked fine on our side.





    I suggest that you verify your NameMapping scheme and check whether the target object and its parent objects are mapped correctly by unique properties. If NM is OK, but you still face the issue, you can try using the NativeWebObject.click method as a workaround.





    If the suggestions above do not help, please zip the entire project suite folder along with logs of the test execution and send us the archive.
  • darmstrong's avatar
    darmstrong
    Occasional Contributor
    I'm very new to TC.  Can you please detail for me how to do the name mapping verification and how to use NativeWebObject.click()?

  • Hi,





    Please see "Name Mapping Editor" and the related articles to learn more about modifying the Name Mapping scheme.





    As for the NativeWebObject.click method, you need to use it in the same way as you use the Click method:







    all.gwt_debug_add_report_component_button_MenuItem.NativeWebObject.click();







    BTW, to help you get started with TestComplete easier, I recommend that you visit our free TestComplete webinar: http://www.automatedqa.com/webinars/

    Also, we offer an online TestComplete training course for an affordable price - please check the training options on our web site:

    http://www.automatedqa.com/support/training/