Image as a link, CUITe recorder script error

Feb 20, 2012 at 10:46 AM
Edited Feb 20, 2012 at 2:22 PM

Hi, just started using CUITe now that you are back :)

First page in and the CUITe Object is having a problem with a web object. The object is an image on a Pane, It acts as a hyperlink. In CUITe it causes a script error Link 5498572

Char 21,

Error: 'undefined' is null or not and object,

Code 0,

URL <my project>

The object reference is incomplete in the generated code with the semi colon missing from the end of the link:     

public CUITe_HtmlImage var = new CUITe_HtmlImage(searchparams)

and 'searchparams' does not exist in current context.

I have to click on the script dialog 'yes' to continue running scripts on the page

Have I missed something, I hope so cus everything about CUITe is what I have been trying to work towards?




I have found a way to get the control and that is to manually change the parameters in the Object repository class, but the CUITe is still giving a script error, to:

 public CUITe_HtmlImage imgTemp1 = new CUITe_HtmlImage("Href=http://server/IPAutomation/Systems/Apps/View");

adding a variable name and adding the Href.

I tried to do this in code with the SetSearchProperty but it did not work

homePage.imgTemp1.SetSearchProperty("Href", http://server/IPAutomation/Systems/Apps/View);

 What do I use to remove the origional search property(s) for a control?

I do not want to hard code the Object Repository ( O.R. ) if I can help it since re-creating the O.R. as the page changes will over write any hard codings there.



Feb 21, 2012 at 1:16 AM

Can you please send me the HTML code for the Image as a link control? Just wanted to check if there anything that is different.

--Suresh Bala

Feb 21, 2012 at 8:52 AM

Here is the html for the 'button'

<div class="section-box">
<a href="/IPl/SystemsAdmin/Applications/ViewAll">
<img src="/IP/Content/media/images/icons/large-cogs.png" alt="">
<h1> Systems Admin</h1>
<p> View and configure settings for applications etc.</p>


Feb 23, 2012 at 7:43 AM

Sorry for the delayed response. Was busy with a couple of things at work place.

Can you please try with below object repository definition? 'SRC' is a supported search parameter for images.

 public CUITe_HtmlImage imgTemp1 = new CUITe_HtmlImage("src=/IP/Content/media/images/icons/large-cogs.png");

--Suresh Bala

Mar 2, 2012 at 10:14 PM

I just downloaded and added CUITe to my Visual Studio project and this is the first thing I ran into. Our login page uses an image as the login button with attached javascript code for execution. The CUITe Object Recorder wouldn't recognize it and I immediately got a script error that I had to click yes to.

Here is the HTML for the image button in question:

<tr> <td colspan="2"><CENTER><INPUT type="image" src="art/buttons/login.gif" border="0" value=""></CENTER></td> </tr>

Sep 7, 2012 at 11:26 AM


The CUITe Object Recorder will throw a javascript error or unexpectedly use searchparams in the case where it can not find a unique identifier for the control whose click action was just recorded.


Using an <img /> element with a unique value for the id attribute should resolve the issue.



Using an <input /> element with a unique value for the id attribute should resolve the issue.

Note: Changeset 19989 contains support for the <input type="image" /> control.


Thank you.