find an element exactly? any help?

webmuthu

Пользователь
Регистрация
27.11.2012
Сообщения
43
Благодарностей
0
Баллы
6
hi,

i recorded a login page. it works most of the cases. some time fails due to following criteria.

suppose the page has two login username. name of the filed is same. but the ID is different. if single login is in the page there is no issue. if two login is in the page it sets first form of the username. i set the the username field form is -1.

username1-
name-op
id-edit_name

username2-
name-op
id-edit_username
you understand my problem.

Thanks in advance.
 

nevadahsot

Client
Регистрация
27.04.2012
Сообщения
106
Благодарностей
5
Баллы
18
hi,
if two login is in the page it sets first form of the username. i set the the username field form is -1.

Match No
.
0 -----means the first found element which in accordance with search criteria.
1 -----the 2nd,
2------ the third.......





Form No. ----it has two search types: 0, 1,2,3,4,... OR -1;
Form No. 0 means (search element only in) the first form (of it's "father" document);
Form No. 1 means (....................only in) the second form;.......

If want pinpoint the 21th form, then it's form No. is 20.


"all forms of a page'---If Document No. is -1, this is right;
If Document is designated,then Form No.-1 (set it [SIZE=-1]manual[/SIZE]ly) means search in "the" document's
all child forms. (Ofen frame/iframe is involved.)

Document No.
looks like
-1
0
0;0
0;1
0;2
0;3
...
0;_0
0;_1
0;_1;_0
0;_2
0;_4;_0
...
etc.

http://i1303.photobucket.com/albums/ag152/Nevadahost/zzn_zpsadbc1a7e.png
http://i1303.photobucket.com/albums/ag152/Nevadahost/bloghi_zps3e058d4d.png



+++++++++++++++++++++++++++






username1-
username2- this is "text" search type. Means "as it is (exactly the same)"----the search string
has to match exactly with a particular field/tag's attribute's value.

Sometimes, text search is a little
buggy; alternate it to regexp search. (Don't forget escape ? etc.)


( id="username1-"; id="username2-")
If search type is regex, it doesn't have to "expression"
the whole attribute value.

then username, or user (even just only u )will find the field/form(s).
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)