Тест RobotFramework AutoIT NotePad проходит, но не запускает Блокнот

Сделайте объект обновления с именами свойств, включая нужный путь. («somekey.» + из примера OP), а затем используйте это обновление.

//the modification that's requested
updateReq = { 
   param2 : "val2_new",
   param3 : "val3_new"   
}

//build a renamed version of the update request
var update = {};
for(var field in updateReq){
    update["somekey."+field] = updateReq[field];
}

//apply the update without modifying fields not originally in the update
db.collection.update({._id:...},{$set:update},{upsert:true},function(err,result){...});
0
задан utpal 17 January 2019 в 16:41
поделиться

2 ответа

Думаю, я понял это. Тест проходил, когда блокнот запускался в скрытом окне. Я дал ему дополнительный аргумент, и он прошел:

*** Test Cases ***
AutoIT Notepad Test
    Run    notepad.exe    ${EMPTY}     1
    Wait for active window    Untitled - Notepad
    Send   Typing some text
0
ответ дан utpal 17 January 2019 в 16:41
поделиться

Если у вас есть блокнот в папке по умолчанию, попробуйте это:

*** Settings ***
Library    AutoItLibrary

*** Variables ***
${notepad}    C:\\Program Files\\Notepad\\notepad.exe

*** Test Cases ***
Run     ${notepad}
Send    This is some text
0
ответ дан Justin Wilkins 17 January 2019 в 16:41
поделиться
Другие вопросы по тегам:

Похожие вопросы: