question

gkarumba avatar image
gkarumba asked gkarumba posted

iTest does not execute setText, click commands on certain objects on a page

iTest does not execute setText, click commands on certain objects on a page. What could be the problem? The script has the same setText, click commands captures. This is specific to a page. How do I debug this issue? The showPage command output has these two twp objects.

 

<code>

 

<item guid="3a62c9c0-895d-432c-b375-f11496db4f29" action="setText" session="$wcs" session.subst="true" target="name=ipAddress" target.subst="true">

<command>

<body subst="true">$ctlr_ip</body>

</command>

<applicationProperties type="com.fnfr.svt.applications.web.documents.stepproperties.StepProperties"/>

</item>

<item guid="c1cf93ce-b51e-441d-9d03-00af3f765044" action="click" session="$wcs" session.subst="true" target="name=save" target.subst="true">

<applicationProperties type="com.fnfr.svt.applications.web.documents.stepproperties.StepProperties"/>

</item>

 

</code>

iTestGUI Testing(Web-Java Swing-etc)
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
PreetS avatar image
PreetS answered PreetS posted

Hi gkarumba,

 

Firstly, you shoudl use 'snapshot' and not 'showPage' to get the XML of the page. 

 

When you say that iTest fails to 'setText' or 'click' on the specified target, does it complain with any issue (like target not found or some other execution issue),  or does it just move on to the next step without actually setting the text?

 

It would be good to have a snapshot right before the step where you are setting the text. That way you will get the XML of that page just before the action is executed. 

 

4 comments
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

gkarumba avatar image gkarumba commented ·

Hi PreetS,

 

It does not report that target not found, instead it moves on to the next step. When I debugged further on, by setting breakpoints, I could see that iTest points the cursor/mouse to those objects, but it does not do anything.

 

Karums.

0 Likes 0 ·
PaulD avatar image PaulD gkarumba commented ·

Karums,

 

I suspect that this object on the page has unusual behaviors attached to it -- such as javascript event handlers that are grabbing clicks and/or keystrokes.  Can you post the page source and identify which component is involved?  Perhaps we'll spot the issue.

 

0 Likes 0 ·
PreetS avatar image PreetS PaulD commented ·

I agree, it seems like some unusual javascript on that page is causing this. It would be better if you post the output of the 'snapshot' action on that page.  We would get more information from it.

0 Likes 0 ·
gkarumba avatar image gkarumba PreetS commented ·
There was some problem with getting the variable assigned. It always took a blank value and set the same in the text field and hence is the problem. We can close this thread. Appreciate all your responses.
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.