How to check for element/image presence.

Ossy Uche

Client
Регистрация
20.02.2015
Сообщения
20
Благодарностей
1
Баллы
3
How do i check for an element presence i.e images, buttons etc. I know how to check for text presence, but i cant seem to do same for other non text elements. What i want to achieve is to check for an image presence then apply logic to achieve what i want. Thanks for your help.
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 715
Баллы
113
Use action degisgner, set attributes to search and try to use GET mode instead of SET or RISE and take width for example.
If action will fail: element is not found
 

Ossy Uche

Client
Регистрация
20.02.2015
Сообщения
20
Благодарностей
1
Баллы
3
Use action degisgner, set attributes to search and try to use GET mode instead of SET or RISE and take width for example.
If action will fail: element is not found

Thanks for your answer, please can you give me a template example or screenshot, will understand it quicker that way. Thanks once more.
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 715
Баллы
113
Here you go
 

Вложения

Ossy Uche

Client
Регистрация
20.02.2015
Сообщения
20
Благодарностей
1
Баллы
3

Hery Yanto

Client
Регистрация
08.07.2015
Сообщения
5
Благодарностей
0
Баллы
1
Would you please give another example which is easier than this one , I have openned this template in project maker, It could not be run , I still confuse
Use GET mode instead of SET or RISE, and then what else which type of attribut should I choose ?

I have same problem, I can not make bot for push "share button" in google plus if share button still weak
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 715
Баллы
113
It's kinda easy example. What the problem exactly?
 

Hery Yanto

Client
Регистрация
08.07.2015
Сообщения
5
Благодарностей
0
Баллы
1
the problem is I do not understand

would you Please info where is tutorial / manual/ wikipedia for action designer :

Set
which Attribute should we choose
what to be filled in Value

Get
which Attribute should we choose
what to be filled in Value

Rise
which Event should we choose

Thanks Before
 

Tobbe

Client
Регистрация
01.08.2013
Сообщения
428
Благодарностей
148
Баллы
43
It refers to HTML elements.
A link may look like this <a class="something" href="http://tobbe.co">Best Guy Ever</a> where the bold part is the attribute and the underscored part is the value.
So if you want to GET the href-attributes value of the element above it would return http://tobbe.co,
but if you'd SET it, say with the attribute href and value http://zennoposter.com it would change the source to <a class="something" href="http://zennoposter.com">Best Guy Ever</a>.
GET/SET, you want to GET something from the source, or do you want to SET something into the source?
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 715
Баллы
113
You also need to get a basic knowledge of HTML and mouse eventS to understand attributes, tags, mouse events
 

Hery Yanto

Client
Регистрация
08.07.2015
Сообщения
5
Благодарностей
0
Баллы
1
I am not expert html, but I can find the element like class, div, outerrhtml with action designer. But I still do not know the coding of logical how to exam image / element presence.

I need your help, I am frustrating because I have been looking for this video tutorial in this forum

I want to show my problem bot to you, do you have teamviewer?
 

Hery Yanto

Client
Регистрация
08.07.2015
Сообщения
5
Благодарностей
0
Баллы
1
here is my bot : share in google Plus

I can not make logical check presence of Image Element of SHARE , I must add pause for 32 second after loading photo
if the photo that I upload not completely, the share button is disable
if the photo that I upload completely, the share button is able to click
 

Вложения

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 715
Баллы
113
Check
 

Вложения

Hery Yanto

Client
Регистрация
08.07.2015
Сообщения
5
Благодарностей
0
Баллы
1
Hi Rostonix

I Have test your bot, it run well

Now I try to learn how did you make this bot

attached two pictures
The first is my action designer try to search element :

The Second is comparison Get Value betwen Yours ( left) and mine ( the right)
There are differences :
1. your document is -1 my document is 0
2. Your Value is d-k-l b-c b-c-Ba qy jt ( area-disabled="false" ) my value is d-k-l b-c b-c-Ba qy jt b-c-I ( area-disabled="true" )

I wonder when I search element share button ( disabled) my value is always d-k-l b-c b-c-Ba qy jt b-c-I , not like yours d-k-l b-c b-c-Ba qy jt


Could you teach me how to get two points above ?


a.JPG
b.JPG
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 715
Баллы
113
maybe it renders differently because i have russian version of Google+
the main point is to check value of aria-disabled attribute.
If it's true you wait in loop several seconds, if it's false - you go further
 

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