Not able to click on link

Jan 7, 2014 at 2:33 PM

We are running into a problem clicking on a link. I was looking for ideas as to what might be causing this and if anyone else has run into the problem before. We are running tests in VS2010 on IE9 with a flavor of CUITe version 1.0.6.

This is the html that we have:
    <div id="header-content">
        <div id="ml-wrapper">
            <div class="ml">
                <a class="ml-icon" id="ml-icon">
We are trying to click on the hyperlink however the error that we get is that the link cannot be found. Here is the code for that:
CUITe_HtmlHyperlink aMiniLauncherIcon = Get<CUITe_HtmlHyperlink>("id=ml-icon");

I used FirstChild to navigate through the DOM and the automation thinks that the <a> element is actually an CUITe_HtmlCustom type so I updated the code to try and get a HtmlCustom but the automation was still unable to find the element. Here is the updated code:
CUITe_HtmlCustom aMiniLauncherIcon = Get<CUITe_HtmlCustom>("id=ml-icon");

I was finally able to click on this control but the only element that the automation would recognize was this <DIV>
<div id="ml-wrapper">

It cannot find any of the control below this if I search directly for the control using the class or id attribute. Ideas??


Jan 10, 2014 at 3:11 PM
One idea, try defining it as an CUITe_HtmlImage with the properties of the image that you are trying to click on & do a .Click() on that.

That's one thing that's worked for me in the past.