What is the best way to modify DOM element with Zennoposter

julienNW

Новичок
Регистрация
09.04.2021
Сообщения
3
Благодарностей
0
Баллы
1
Hi all Zenno-users,

i load a webpage with zennoposter and i would like to add a red border to a html element

for example, i want to tranform this :
<tr data-url_host="target.com"><td>blabla</td></tr>

into this :
<tr data-url_host="target.com" style="border:#ff0000 3px solid;"><td>blabla</td></tr>

in order to make a screenshot later

is it possible ?
if yes, what is the best way ?

(i need to mention that the webpage uses jQuery, i tried to do something with JS custom code executed on the current page but i couldn't make it works)

Thanks
 

nicanil

Client
Регистрация
06.03.2016
Сообщения
2 242
Благодарностей
1 804
Баллы
113
Hello!

Use the SET action. I've attached example.
 

Вложения

  • 18,9 КБ Просмотры: 70

julienNW

Новичок
Регистрация
09.04.2021
Сообщения
3
Благодарностей
0
Баллы
1
Hi Nicanil,

Thank you,

I use zennoposter 5.41.1.0 and file format is xmlz
i cannot open your file
 

julienNW

Новичок
Регистрация
09.04.2021
Сообщения
3
Благодарностей
0
Баллы
1
Hi all, it's ok, i have succeed with set style (it was simple, i was searching in the bad direction)

my problem is now to target the last tr with a specific attribute :
<tr data-url_host="target.com"

because, sometimes there is 2 tr like that and i need to change the style only on the last one...
does somebody have any idea ?
 

nicanil

Client
Регистрация
06.03.2016
Сообщения
2 242
Благодарностей
1 804
Баллы
113
In the action properties put end keyword in "Match #" section.
More about this keyword (and other ones) you can read here.
75455
 

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