Hello, I have made an test that checks the content of a downloaded Excel file (using the robotframework-excellib library). When the test is done and closes the document and browser, it takes more then a minute:
When I rerun the test without opening and closing the Excel-file, the same closing steps are done in mere tenths of a second:
While debugging I found the part that takes up all the time (please forgive the bad code for debugging):
-
response = stub.CloseBrowser(Request.Empty())
Has anyone else experienced this? If so, how did you fix it? While it isn’t a problem at this moment, it will soon be when there are 10 tests coming that all use this technique (and I hate waiting for 10+ minutes for nothing
)
This is the part of the test that interacts with the Excel file:
-
Check excel export
-
[Arguments] ${documentnaam} ${ordernummer} ${kosten} ${routing} ${vergoeding} ${percentage} ${busmaatschappij} -
Open Excel Document ${DOWNLOAD_FOLDER_PATH}/${documentnaam}.xlsx docid -
${row}= Set Variable 2 -
FOR ${index} IN RANGE 1 20 -
${A}= Read Excel Cell ${index} 2 -
IF "${A}" == "${ordernummer}" -
${row}= Set Variable ${index} -
Exit For Loop -
END -
END -
${busmaatschappij_kolom}= Read Excel Cell ${row} 1 -
${ordernummer_kolom}= Read Excel Cell ${row} 2 -
${kosten_kolom}= Read Excel Cell ${row} 3 -
${routing_kolom}= Read Excel Cell ${row} 4 -
${vergoeding_kolom}= Read Excel Cell ${row} 5 -
${percentage_kolom}= Read Excel Cell ${row} 6 -
IF "${busmaatschappij}" != "null" -
Should Be Equal As Strings ${busmaatschappij_kolom} ${busmaatschappij} -
END -
Should Be Equal As Strings ${ordernummer_kolom} ${ordernummer} -
Should Be Equal As Strings ${kosten_kolom} ${kosten} -
Should Be Equal As Strings ${routing_kolom} ${routing} -
Should Be Equal As Strings ${vergoeding_kolom} ${vergoeding} -
Should Be Equal As Strings ${percentage_kolom} ${percentage} -
Close Current Excel Document -
Sleep 1s
