Hello,
While using TruClient for scripting a CMS system I run into the following issue:
The script creates an article with each article having a photo attached to it. When selecting the photo, I have to browse to the photo and when it is clicked and recorded I can see in Truclient that it is identified by Xpath as:
/html/body/div[13]/div/div[2]/div/div/div/div[2]/div/div/div/div/div/form/div[4]/div/div[3]/div/div[2]/ul/li[13]/a
The issue I am trying to resolve is to randomize which photo is selected as an attachment. I found that by changing numer 13 to 14, 15 ... etc. I can influence which target object is selected. So I want be able to parameterize the number and randomize it between boundaries. The problem is that TruClient will not accept this, apparently it only accepts parameters in the arguments section of an action. I thought about using a variable instead, still Truclient will not let me do that. I tried replacing 13 with a variable and assigned the variable the value 13 (just to test it). When executing this step TruClient will give me the error message :"target image not found". I am positive that the variable was assigned the proper value.
It looks like this:
/html/body/div[13]/div/div[2]/div/div/div/div[2]/div/div/div/div/div/form/div[4]/div/div[3]/div/div[2]/ul/li[RndmPhoto]/a
Where RndmPhoto is the variable that I assigned the value 13.
I wonder: can this be done at all in Truclient using a variable in Xpath?
Or am I going at this the wrong way? Is there a better way of doing things?
Peet