How to check for an html element on the page?

  • Автор темы Автор темы rnbguru
  • Дата начала Дата начала

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!
 
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.
 
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.

 

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