//input[@type="hidden" and @name="val" and position() = 1]/@value
does this mean get the text typed inside the input box ?
//input[@type="hidden" and @name="val" and position() = 1]/@value
does this mean get the text typed inside the input box ?
I think it means grab the value attribute of an input whose type attribute is 'hidden' in addition its name attribute is 'val' and its position amongst its siblings is 1 ( first I believe, not sure if 0 is the start in xpath ).
<input type="hidden" name="val" value="test">
<input type="hidden" name="foo">
Read from right to left, it means "Get the value attribute of all of the input tags whose type attribute is 'hidden', whose name attribute is 'val', and which appears as the first element in its enclosing (form) tag".