robotframework

How to ignore Get Table Text from Cell, if xpath of cell not match

孤人 提交于 2019-12-13 13:58:05
问题 How to ignore Get Table Text from Cell, if xpath of cell not match ? Becuase i want my test case still continues testing . ${tableFinal} Set Variable xpath=/html/body/div[2]/div[3]/div/form/table[3] ${totalPayAmount} Get Table Text from Cell ${tableFinal} 1 2 Thanks you 回答1: Using either Run Keyword And Continue On Failure or Run Keyword And Ignore Error can help with this. In the documentation the entire family of Run Keyword .... keywords. The difference between the two is that one just

How to run BrowserMob Proxy with RobotFramework and Capture HAR files

三世轮回 提交于 2019-12-13 12:44:49
问题 I have written this code in robotframework ${proxy}= | Evaluate | sys.modules['selenium.webdriver'].Proxy() sys, selenium.webdriver | ${proxy.http_proxy}= | Set Variable | 127.0.0.1:8080 | Create Webdriver | Firefox proxy=${proxy} | Go To | http://www.knowledgefarm.in/tst/a.html | And I am running BrowserMob proxy from command line like this: browsermob-proxy.bat --address 127.0.0.1 --port 8080 Now, when i run robotframework, it open the browser and simple give this message on page. HTTP

How to run keywords into multiple times

可紊 提交于 2019-12-13 10:33:39
问题 My scenario: There is field called " search first value " i have to click on Then click on Submit. I have to repeat this step more than 100 times. How can i do in Robot framework? MY code: [Documentation] Resubmit wait until element is enabled ${CLICK_RESUBMIT} click element ${CLICK_RESUBMIT} sleep 2s confirm action repeat keyword 5times Go to Previous Page 回答1: Standard library have keyword Repeat Keyword http://robotframework.org/robotframework/latest/libraries/BuiltIn.html#Repeat%20Keyword

how to run commands in CMD prompt using robot framework

早过忘川 提交于 2019-12-13 09:41:36
问题 How do i run the command 'ipconfig' in cmd prompt using robot framework. running below code gives me the complete result. I just need IPV4 Address. ${frt}= | Run | ipconfig Log ${frt} 回答1: Although it would propably be more effective of use a custom Python library, it is possible to accomplish with regular Robot Framework: *** Settings *** Library OperatingSystem Library String *** Test Cases *** Test IPConfig ${frt}= Run ipconfig | find "IPv4" ${IP}= Fetch From Right ${frt} ${SPACE} Log To

Handling mozilla firefox download box through robot framework using Selenium2Library

可紊 提交于 2019-12-13 08:37:58
问题 Page Should Contain Button xpath = /html/body/blockquote/form/p/input Click Button xpath = /html/body/blockquote/form/p/input Confirm Action The 'Confirm Action' keyword is supposedly used to select OK in an alert box, which is not happening in the above case. In my opinion, Selenium2Library is not treating the download box as an alert box, because when I tried Get Alert Message, I'm receiving an output saying 'No alert box found'. In what way can I select the OK in the download box? Also,

Importing test libraries failed. No module named 'a'

孤人 提交于 2019-12-13 08:01:02
问题 I have a folder /example which contains /Libs which further contains different folders /a , /b each containing python libraries. I am trying to run a robot framework code from /example . The error it shows : Importing test library 'a' failed: ImportError: No module named 'a' File "/root/Libs/a/ init .py", line 7, in from a import a_classname How can I solve this? 回答1: import os import sys filepath = "path/file/" sys.path.append(os.path.abspath(filepath)) from a import a_classname 来源: https:/

Robot Framework File Upload

懵懂的女人 提交于 2019-12-13 07:38:47
问题 I have to write a test where a file has to be uploaded. Is this possible using Robot Framework? Thanks 回答1: There is a Choose File keyword in SeleniumLibrary 回答2: Choose File keyword can type in the file path with name in the file upload text field. However, the keyword cannot interact for selecting the file in the window where you click on a file and then click on the Open button. To click on a file in the Open File Window and click on open button, you can use Robot Framework AutoItLibrary

Robot framework, Python - handle lazy load on page with dynamic content

白昼怎懂夜的黑 提交于 2019-12-13 07:23:20
问题 I have a page with dynamically generated table ( rows are dynamically generated ). In my test I do NOT know how many rows to expect . I just create a dictionary from all the rows and then compare to another dictionary. But the table has lazy load, so when the number of rows is higher, some of the rows which should be there are not visible "on the first sight" but it needs to be scrolled down to get them. So those rows are not included into my dictionary and then it fails... But again, I do

no such window exception after close window

心不动则不痛 提交于 2019-12-13 05:00:10
问题 I am unable to select main parent window after closing pop-up window using close window keyword. I tried Wait until keyword succeeds but still I am getting the same issue. This issue is happening on Chrome,FF,IE can someone please help me to get a workaround for this. I am using selenium 2.43 version with Robot Framework Close window is closing pop up but at select window step I am getting no such window exception. I also tried with Wait Until Keyword Succeeds with Close window and select

robot framework: test case cannot load keyword in resource file that import in the test suite's parent test suite folder

做~自己de王妃 提交于 2019-12-13 03:52:19
问题 Hi, I am using robot framework to automate testing of a website, and the image above is the structure of test in the RIDE: Test: a test suite folder, and I import resource file here, which is in the " init .robot" under the folder Sub1: a sub test suite, import nothing test: a test case My problem is: in the test case "test", robot cannot recognize the keyword that imported in the "Test" test suite folder, because there will be more sub test suites, like sub2, sub3, how can I import resource