How can I use actions designer to do this...

osho

Client
Регистрация
20.03.2012
Сообщения
125
Благодарностей
5
Баллы
18
I have two submit buttons on a page, one <input type="submit" class="button"> and another <input type="submit" class="button">

I want the second one... but this template is for multiple targets (so it may change (hence form = -1)). Is there a way to make actions designer select from the same <form> as the step before uses? e.g:

Step 1:

form = -1
group = 0
attribute name=username
match=0

Step 2:
form = -1
group = 0
attribute type=submit
match=0

Ok, so that step set the username in the correct spot... now is there a way to make the submit button on the next step use the same form? Remember, this template will be used for multiple targets, so sometimes there will only be one submit button, other times there will be 3+. That's why I'm using form = -1, match = 0. But I'm hoping I don't know about some feature?
 

drvosjeca

Client
Регистрация
26.10.2011
Сообщения
512
Благодарностей
455
Баллы
63
first you need to close down range so it wont hit wrong button... that means selecting something that only those buttons have as search parameters

second thing...If you are making this for mor sites and not all have same parameters, then you can add more search atributes to branch (you can add them in editor)

third... in case you need to click two buttons on some sites and just one on other. or fill in...then you need to make them all there are and just make them as unnecessery in case there is no such a thing on site it will just continue with no error


OK, I hope this helps
 

osho

Client
Регистрация
20.03.2012
Сообщения
125
Благодарностей
5
Баллы
18
Unfortunately I can't narrow it down as the two forms are very similar (same attribute name, id, class etc). So I just need it to use the submit button on the same form where username is placed. Maybe it's not possible. It keeps filling in the login/password, then hitting the 'search site' submit button :P.

What about intellisearch? I've trained it with intellisearch. It will work in debug. Then I'll try to debug again (without changing anything) and intellisearch can't find the fields the second time. It makes no sense?
 

bigcajones

Client
Регистрация
09.02.2011
Сообщения
1 216
Благодарностей
682
Баллы
113
I had this problem before and i just had it fill in all the fields. Since the submit button for registration was different that the search or login button it would go to registration. Kind of a pain, but it works.
 
Регистрация
01.02.2011
Сообщения
99
Благодарностей
15
Баллы
0
Unfortunately I can't narrow it down as the two forms are very similar (same attribute name, id, class etc). So I just need it to use the submit button on the same form where username is placed. Maybe it's not possible. It keeps filling in the login/password, then hitting the 'search site' submit button :P.

What about intellisearch? I've trained it with intellisearch. It will work in debug. Then I'll try to debug again (without changing anything) and intellisearch can't find the fields the second time. It makes no sense?
Regex is the correct answer to the problem. The syntax of the code either side of "two forms are very similar (same attribute name, id, class etc)" can be used to pull a regex pattern that can be used in the action designer. By the fact the forms are rendered at different positions on the page, that suggests you have something to work with.

The regex pattern can be used in the "attribute value" ( select: regex, "search type") of the "search elements" section of the action designer to pull a result for the form item.
 

bigcajones

Client
Регистрация
09.02.2011
Сообщения
1 216
Благодарностей
682
Баллы
113
would help if you could give us the site url or a similar one. sounds like a forum to me.
 

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