Problem with IndexElement

Applying eValid to AJAX applications that require advanced DOM-based methods.

Problem with IndexElement

Postby mssl » Thu Nov 25, 2010 12:57 am

Hi Team,

In a particular page the following Inputvalue command passes without any issue.
CMD : InputValue 0 38 "TEXT" "" "fsTacClntServerPort" "77" "" "number:7"

But the Index command throws an message saying fsTacClntServerPort is not an text item.
########
Index command
IndexSetEnd 0 "number:7"
IndexFindElement 0 UP "name" "fsTacClntServerPort" "number:7"
IndexInputValue 0 "TEXT" "77" "" "number:7"
########
If we try Valueset, the command passes but the value is not set.

########
IndexSetEnd 0 "number:7"
IndexFindElement 0 UP "name" "fsTacClntServerPort" "number:7"
ValueSet 77
ValuePutElement 0 "ffsTacClntServerPort" "number:7"
########

The Same issue persist in the cases of Combo-box..InputValue command suceeds but not the Index command. I need Index to work without any issues.

########
InputValue 0 16 "SELECT-ONE" "" "fsTacClntServerAddrType" "IPv4" "0" "" \
"number:7"
#######

IndexSetEnd 0 "number:7"
IndexFindElement 0 UP "name" "fsTacClntServerAddrType" "number:7"
IndexInputValue 0 "SELECT-ONE" "IPv4" "0" "number:7"
############
mssl
 
Posts: 16
Joined: Tue Sep 07, 2010 8:51 pm

Re: Problem with IndexElement

Postby eValid » Mon Nov 29, 2010 2:55 pm

Let's take the two cases separately.

* Case No. 1

Here your IndexFindElement command has started from the bottom of the page and has stopped with the "sourceIndex" pointing to the first-found element on the page where the "name" attribute has the value "fsTacClntServerPort", in the frame "number:7" on that page.

Good work so far!

However, your NEXT command says put a specific value into that element, and eValid objects with the message "Sorry, that's not a text item."

In this case, eValid has acted correctly, to decline to insert a value into the page element that your originally found.

What's missing is this: after the first IndexFindElement you need to adjust the sourceIndex value to point to an actual text entry element.

You probably can use the PageMap to identify, from the page itself, the relative location of the required text entry. It could be up two positions (IndexMove -2) or down three positions (IndexMove 3). Or, you may need to do an additional IndexFindElement command to find the text entry element.

(Without the actual page in front of us we can't see exactly what to do).

By the way, the ValueSet command you mentioned probably worked, but it probably added an attribute with a specified name to have a specified value...which information probably would be ignored by that web page.

* Case No. 2

Here the information in your post is less clear, but we are guessing it is the same kind of issue.

You've correctly found the sourceIndex for "fsTacClntServerAddrType" but NOT for the combo-box menu item.

As before, you will need to use the PageMap to find the location of the required input field prior to dropping a value into it.

* Summary

eValid is working normally but is being given incomplete or inappropriate commands...

If you send us the complete situation we can work it out for you if you like.

_________________
The eValid Team
eValid
 
Posts: 2431
Joined: Tue Jan 01, 2008 12:48 pm
Location: USA


Return to AJAX Applications & DOM Processing

Design Downloaded from free phpBB templates | free website templates | Free Web Buttons