Making template more universal

krisztos

Client
Регистрация
28.06.2014
Сообщения
170
Благодарностей
8
Баллы
18
I want to make my ont of my template more universal. I know I can use -1 for document and form#. What about attribute name, tag and match#? Can I use something like input:.* or -1 here? I just want to search for an element only by value.
 

LexxWork

Client
Регистрация
31.10.2013
Сообщения
1 190
Благодарностей
786
Баллы
113
try to make it in c# by xpath or by tag name
 

krisztos

Client
Регистрация
28.06.2014
Сообщения
170
Благодарностей
8
Баллы
18
I have to update the template frequently, so I try to avoid using C# (which I am not good by the way). I'd rather want to know in which fields I can use regex or -1 values. For the sake of a speed I just want to reduce amount of widgets. I guess the match nb is mandatory? What about the other?
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 707
Баллы
113
you can use values of attributes as regular expressions.
not attributes themselves
 

krisztos

Client
Регистрация
28.06.2014
Сообщения
170
Благодарностей
8
Баллы
18
Ok, but as I want to select element only by regex no matter what match#, attribute and tag input:.* it has? Maybe you can give me some c# code for that?
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 707
Баллы
113

krisztos

Client
Регистрация
28.06.2014
Сообщения
170
Благодарностей
8
Баллы
18
OK, but can I made it work for all attributes - it's a common situation that field name is sometimes in id, name or inner/outer html - it's waste of time to go through 4 elements instead of one.
 

Tobbe

Client
Регистрация
01.08.2013
Сообщения
428
Благодарностей
148
Баллы
43
OK, but can I made it work for all attributes - it's a common situation that field name is sometimes in id, name or inner/outer html - it's waste of time to go through 4 elements instead of one.
Create a list of all attributes it might be found in. Take a line and loop trough them one at the time.
It's still "going trough all" but in more flexible way tho.
 

krisztos

Client
Регистрация
28.06.2014
Сообщения
170
Благодарностей
8
Баллы
18
Yes, I also think about that - but as I will have 30 objects I have to make 30 loops in the project? And at least one "if" to go to next object when all vales are checked.

Have authors never considered letting us to use regex in match, attribute and tag fields? Would it be very hard to implement?
 

Tobbe

Client
Регистрация
01.08.2013
Сообщения
428
Благодарностей
148
Баллы
43
Yes, I also think about that - but as I will have 30 objects I have to make 30 loops in the project? And at least one "if" to go to next object when all vales are checked.

Have authors never considered letting us to use regex in match, attribute and tag fields? Would it be very hard to implement?
You create 1 loop in the project, which loops up to 30 times.
 

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