How to check for an html element on the page?

rnbguru

Новичок
Регистрация
21.05.2013
Сообщения
5
Благодарностей
0
Баллы
0
I've nearly finished my first project with Zennoposter, but just hit a road block.

My project runs a loop, hits a web page, and grabs the first element that matches a given id (using get value). However, when that element isn't on the page, the program throws an exception causing the run to stop.

How can I do a "check for element?" I tried using the javascript module, but that module didn't seem to understand what I was trying to access when I would use document.getElementById.

Or as an alternative, is there any means of exception handling? So if it fails, just skip to the next element rather than breaking out of execution.

Thanks!
 

bigcajones

Client
Регистрация
09.02.2011
Сообщения
1 216
Благодарностей
683
Баллы
113
Yeah, right click on the action and choose it as optional. If element is not found, it will go to next action, if it is it will carry out the action. As far as the check for element, you can do a selected text presence check on it by highlighting the text you are searching for and right clicking and check for text.
 

nevadahsot

Client
Регистрация
27.04.2012
Сообщения
106
Благодарностей
5
Баллы
18
grabs the first element that matches a given id (using get value). However, when that element isn't on the page, the program throws an exception causing the run to stop.

How can I do a "check for element?"
Thanks!
Failed exit with dotted line----element is not found.
Combination and variations of:
Action's optional (or not) AND it's success/fail exit and check for element:
----It's interesting part of zennoposter.

 

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