In a web Page there is a HtmlText "NewOrder +", SilkTest recogninze it as a HTMLTEXT , when I use HtmlText(""NewOrder +").getText() it returns "NewOrder +", . But I have to click on '+' character of HtmlText "NewOrder +".
In simply way have to click on last character of HtmlText.
Can any Body tell me how it can be performed?
Thanks in advance.
playing with the RECT of the object probably ?
Get the rects of the object.
Count the number of characters in "New Order +" ( or whatever your string is) , divide the Rect xSize by the number of characters .. that should give you the aproximate position of the + Character you can then click on
You forgot one thing [img]/images/graemlins/smile.gif[/img]
What you re doing above is Dividing the length by the size of one character, that s giving you the position of the 1st character
- get the length of the string
- get the rect of the string
- divide the rect.xsize of the string by its length to get the average size of One character
-> Remove the average size of One Character (/2 to get the middle of the object ) from the object s xSize, that s what gives you the position of the +
Int ilastCharPos = ( a.xSize - ( (a.xSize / iA) / 2 ) )