Check If HTML Element Exists

nibbr

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

Is there a way to check if an element exists on a page? I am looping over different blogs to post comments, but some of them don't have the same fields; i need to check if specific fields are present otherwise it crashes out saying element is not found.
 

Hungry Bulldozer

Moderator
Регистрация
12.01.2011
Сообщения
3 441
Благодарностей
834
Баллы
113
You can handle negative exit of action - this way you will know that there is no such an element on this page. Or you can set some of them as optional
 

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 812
Благодарностей
1 187
Баллы
113
Hi

Is there a way to check if an element exists on a page? I am looping over different blogs to post comments, but some of them don't have the same fields; i need to check if specific fields are present otherwise it crashes out saying element is not found.
Use action check text on page. Example check if there is username field. If yes fill it if no go to next field. Use take text from page and with logic if step
 

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