Condition to check opened window

krisztos

Client
Регистрация
28.06.2014
Сообщения
175
Благодарностей
8
Баллы
18
I make some action on one page - at the end a popup is opened (or new tab in zenno) - how can I determine whether it succeded or not so I can repeat or not such actions? Maybe some if statement?
 

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 814
Благодарностей
1 188
Баллы
113
Most probably there is some elements on page that you can check against.
And use to search in which TAB popup
 

krisztos

Client
Регистрация
28.06.2014
Сообщения
175
Благодарностей
8
Баллы
18
I's really random - in most cases it's difficult to tell what the content will be.
 

LexxWork

Client
Регистрация
31.10.2013
Сообщения
1 190
Благодарностей
792
Баллы
113
first you have to get the count of opened popups before popup action:
return instance.AllTabs.Length;
after pup action you repeat the action
return instance.AllTabs.Length;
and make the comparison
 

krisztos

Client
Регистрация
28.06.2014
Сообщения
175
Благодарностей
8
Баллы
18
Ok - I'll try this method - is not there any macro to find if a tab exists - searching by it's name?
 

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 814
Благодарностей
1 188
Баллы
113
Whatever what content, for example if you know that on this popup page is at least one link then use same I posted previous but in attribute set href and in value set .* and in event you can set focus if you want only for check...
It will search for any link on TAB popup, so if there will not be any popup tab then red dot, if will be tab popup with at least one link on page then green dot
 

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