Click on specific list of elements one by one.

irmscher

Client
Регистрация
28.11.2012
Сообщения
199
Благодарностей
6
Баллы
18
Hey, I'm quite new to Zennoposter and I'm already loving it! Real Mental Power!

I'm now trying to set up my script to click on links in the list one by one:

I know that elements are surrounded by: <div class="result-url"> </div>

So I got regex, this is a list of link titles that I want to click --> (?<=<div\ class="result-url">).*(?=</div>)

Now what should I do? Drag'n'Drop Event tag...
how do I set it to look for links related to this regex?

I've actually tried to sniff out how the script looks like when similar stuff via Action Recorder but then my Event box differs from what I get (look at the image below)



Why when I'm adding "Rise Event" via Editor it only offers me only 2 Intelli Search options instead of "Classic item search" options (shown in the bottom box)


The software is rather easy to learn actually, just some things like that cause some confusion.

Thanks for your time guys, Merry Christmas!
 

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 800
Благодарностей
1 187
Баллы
113
This question is asked already many times, but there is no clear answer to that :D
If you want classic item search then you should record step and then take it...
 

drvosjeca

Client
Регистрация
26.10.2011
Сообщения
512
Благодарностей
455
Баллы
63
first of all if you wanna get all results that match your regex, you need to remove that atribute with innertext... what you have set there now is to look for both parameters match (both have group 0)... It would be other case if innertext atribute had group 1...but it is still beter to remove it completly...

Now if you wish to click on one-by-one link that is matching your regex... than you need to include counter in your equation... that means that under match number you need to set counter variable...and not to forget loop back with increasing counter and clicking on next link...simple as it gets :D
 
  • Спасибо
Реакции: irmscher

irmscher

Client
Регистрация
28.11.2012
Сообщения
199
Благодарностей
6
Баллы
18
Thanks drvosjeca

By the way, I love your training videos :-)

Merry Christmas and Happy New year guys! :-)
 

irmscher

Client
Регистрация
28.11.2012
Сообщения
199
Благодарностей
6
Баллы
18
Now I want to create an *.txt filename out of a variable, is that possible?

I'm trying to "Write to file" with the following path: C:\Users\Irmscher\Documents\Zennoposter\Scrapedarticles\{-Variable.article_title_from_description-}.txt

I thought that zennoposter is going to create file if none existent with the variable as the name of the file, BUT it's giving me an error.

Any ideas what am I doing wrong?
 

bigcajones

Client
Регистрация
09.02.2011
Сообщения
1 216
Благодарностей
683
Баллы
113
The problem may be in the fact that the variable contains characters that cannot be used as a file name....ie

\ / : * ? < > |
 
  • Спасибо
Реакции: irmscher

irmscher

Client
Регистрация
28.11.2012
Сообщения
199
Благодарностей
6
Баллы
18
Yeah! That was the cause, now it works!

Thanks bigcajones :-)
 

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