Selecting inside a div

yosheryosh

Client
Регистрация
28.10.2011
Сообщения
44
Благодарностей
0
Баллы
0
Hi guys, any help not really a programmer and been at this for some hours now...

I am trying to select a link on a page that is always changing, so I can't just click the link.

I right click the link, select branch builder, complete the element search fields and it correctly finds all the divs on the page.

I then go to action select. select 'rize' and then 'click' and add to template.

When i run it, it never selects the link however. I get no errors, it just gets to this point then starts over.

It should be selecting the link inside this div and then going to the following page.

Any help I'm going mad!
 

gcomm

Client
Регистрация
01.03.2011
Сообщения
332
Благодарностей
93
Баллы
28
Do you have the correct match# selected in branch builder? Because if 20 divs exist on the page you must pinpoint which div it will click-

Also if the link is always changing you might want to do a regex with a portion that is always common within the link...

for example if the link is ... thisnamewebsite.com/clickhere/093454xopqrs.html your regex could be this... thisnamewebsite/clickhere.* the .* = "anything" it tells the program to click the link no matter what follows the previous text -


Try that for now or PM me the portion of the template I will take a look.

zpdude.JPGzpdude2.JPG
 

Shayne54

Client
Регистрация
07.10.2011
Сообщения
16
Благодарностей
2
Баллы
0
Oops, accidentally posted twice... see the below post
 

Shayne54

Client
Регистрация
07.10.2011
Сообщения
16
Благодарностей
2
Баллы
0
Firing a Click event on the div container that holds the link wont work.
Since a Div isn't a Link, telling the browser to Raise the Click event on that specific div element wont in-turn Raise the Click event to the div's children.

Do what gcomm said first, your regex can be a little more precise to be sure you grab the correct link but thats the easiest way..
Regex is very powerful and you can come up with a Regex to find a Dynamic random link like "/14839074242hdkfalhfa.html" for example using Regex: "\/\d*\w*.html"

If you still want to do what your trying, I would use the Emulations.dll which Emulations a click at the position of a element inside the browser window.
So for example, your Div container is at X=540, Y=800 inside the browser window, and your link is the first/only element in that container... in Code Creator you could emulate a click on the Div container (ZP is just using the XY coordinates from the element to do this) and if the link is in those same coordinates, it will click the link.
 

yosheryosh

Client
Регистрация
28.10.2011
Сообщения
44
Благодарностей
0
Баллы
0
thanks guys, i used the regex... that was the best method
 

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