Выберите окно, созданное с помощью JavaScript

В My Robot Script, после нажатия на ссылку Edit Description, открывается окно get (т.е. окно Java Script). Изображения здесь
Изображение 1:: введите описание изображения здесь

Изображение 2:: Изображение окна вместе с источником страницы введите описание изображения здесь

Что мне нужно это. Выберите окно (сценарий Java) б. Введите текст в область текста и нажмите "ОК".

Я пытался использовать Select Window new/ Select window Description, но элемент управления ждет бесконечно @ Ключевое слово Select Window не движется вперед. Я должен убить Контроль силой.

    *** Settings ***
Documentation    Suite description
Library  Selenium2Library       run_on_failure=Nothing
Library  Collections

*** Test Cases ***
Log into Command center
    [Tags]    DEBUG
    open browser        http://11.8.180.***/BCC     ie

    input text          xpath=//*[@id='LoginName']   User
    input password      Password   Pwd@123
    click element       LoginBtn
    wait until keyword succeeds     30 sec       5 sec     page should contain element      AppTitle
    sleep   3s
    ${Title}    Get Page Title
    log  ${Title}
    Navigation to Usrs
    Click on Window popup and enter text

CloseBrowser
    close all browsers

*** Keywords ***
Click on Window popup and enter text
    Click Link   //*[@id="aspnetForm"]/table/tbody/tr[1]/td[2]/a
    Sleep  5s
Select Window By Unique Identifier Element With Delay   //*[@id="descript"]

Select Window By Unique Identifier Element With Delay
    [Arguments]  ${element}   ${delay_time}=10
    sleep  ${delay_time}
    @{wins}=  Get Window Handles
    Log  ${wins}<--these are window names   console=true
    :FOR  ${windowName}  IN  @{wins}
    \   Log   ${windowName}   console=true
    \   run keyword and ignore error  Select Window  ${windowName}
    \   ${found_flag}=   run keyword and return status  page should contain  ${element}
    \   Run keyword if  ${found_flag}  input text  ${element}  this is text
    \   exit for loop if  ${found_flag}

Get Page Title
    Log  Control came to GET PAGE TITLE
    run keyword and return  Get Title

Navigation to Usrs
    Go to   http://11.8.180.***/BCC/role.aspx 

Любая идея, как выбрать новое окно? и введите текст ударил в порядке.

A.Get Window Identifiers --> Jus hangs it neither moves nor throw any error 
B. Get Window Names gives this error {URLError: <urlopen error [Errno 10061] No connection could be made because the target machine actively refused it>..}. 
C. Get Window Handles returns this {    [u'b0ce0f28-f6d4-4943-93f7-f65fd5f1de2a', u'c0442110-4ea9-40a4-b126-eee09d9f3eb0']} 
I am not sure how to identify which window have these id's

Заранее спасибо

1 ответ

Это должно быть распознано как новое окно в вашем браузере, поэтому вы можете использовать:

Select Window   Description
Другие вопросы по тегам