robotframework

Robotframework / Selenium2Library: Why does Drag And Drop not work with draggable elements?

痞子三分冷 提交于 2019-12-06 12:16:33
问题 If you have python (v2.7), robotframework (v2.8.7) and Selenium2Library (v1.6.0) installed, you could run the following test case to get the idea of the problem, e.g. using: pybot -L TRACE *** Settings *** Library Selenium2Library *** Variables *** *** Test Cases *** DragDemo Open Browser http://www.w3schools.com/html/html5_draganddrop.asp firefox # NO VISIBLE ACTION HERE, BUT COMMANDS TAKE SOME MINUTES TO EXECUTE WITHOUT FAILURE Wait Until Page Contains Element //img[@id='drag1'] Drag And

How to execute the simple python script from robot frame work

喜欢而已 提交于 2019-12-06 11:47:42
I am new to the python and Robot frame work. I have a python script at below location "C:\Python33\sample.py" print ('Hello world') I have installed the RF and I have a robot file (test.robot) at same location with below content. # example.robot *** Settings *** | Library | Process *** Test Cases *** | | ${result}= | run process | python | /C:/Python33/sample.py When I tried to execute the file from command prompt getting errors C:\Python33>robot test.robot Error: "Testcase name cannot be empty" Please help me to fix this Rakesh Dommaraju By modifying below code in robot file testcase is

How to do some infinite task with Robot Framework?

时光怂恿深爱的人放手 提交于 2019-12-06 11:37:36
问题 I need to "enable and disable the firewall" continuously using robot framework. I have written following robot testcase for this purpose: testcase1 Open Connection 1.1.1.1 Login test test Write firewall enable Write commit Write firewall disable Write commit The above testcase doing the task as expected but only one time. But I want to do this continuously (infinite). Any clue please? Thanks in advance for your help. 回答1: You could put it inside a for loop. It is not infinite but if you put

How can I get the text node of an element in robot framework with selenium2library?

限于喜欢 提交于 2019-12-06 11:34:54
<span id="spanHome" class="where-are-we" style="background-color: transparent;"> Home </span> I want to get "Home" and returned. Which keyword should I use? I tried: ${value}= Get Value //span[@id='spanHome'] But I always get None. To get the text within a dom element, you need to use getText() . You are specifying getValue() which is synonymous with getAttribute("value") . Since your <span> element reveals text by it's innerHTML , instead of a value attribute, use getText() 来源: https://stackoverflow.com/questions/19831271/how-can-i-get-the-text-node-of-an-element-in-robot-framework-with

__init__.txt in Robot Framework

ぐ巨炮叔叔 提交于 2019-12-06 11:07:33
问题 I have the following structure: test_init |__________resources | |__________ keywords.robot |__________tests |__________ __init__.txt |__________ TestInit.robot The keywords.robot contains: *** Keywords *** Keyword for init Log init The __init__.txt contains: *** Settings *** Documentation This is from init file Resource ${EXECDIR}/resources/keywords.robot The TestInit.robot contains: *** Test Cases *** Testing the Init Log Vimal Keyword for init And from command line in the test_init

WebDriverException: Message: Missing 'marionetteProtocol' field in handshake

送分小仙女□ 提交于 2019-12-06 10:43:31
I'm currently trying to run a robotframework test scripts locally (Ubuntu 12.04 LTS 64 bit). The issue that I faced was not able to launch FF browser in Open Browser. Below is the details/specs of the setup that I have. Firefox (v26.0) Selenium2Library selenium-server-standalone-2.53.1.jar geckodriver-v0.9.0 Please note that I used same machine as hub and node (selenium grid) Here the command to launch my hub : java -jar selenium-server-standalone-2.53.1.jar -role hub -port 4444 While here's the command to register my node : java -jar selenium-server-standalone-2.53.1.jar -role node -hub http:

how to read the csv file in robot framework for data verification

心已入冬 提交于 2019-12-06 10:26:13
问题 I want to read a CSV file for data verification. Any library or Keywords for reading CSV file would do. I am using Robot Framework with Ride. 回答1: You can easily create your own library in python for reading and writing csv files. Doing so lets you create any keywords you want. You could simply read and return all the data, or have a keyword that returns the number of rows, or the number of columns, or anything else. Example keyword to read a csv file: Save the following definition in a file

Click on Save button on File Download popup in IE11 in robot framework

本秂侑毒 提交于 2019-12-06 09:54:24
Is there a way to click on the Save or Open button in the pop up that appears while downloading a file in IE 11? I am using Robot Framework AutoIt Library. I can handle the windows that comes subsequent after clicking the Save or Save As option. What kind of file are you downloading? Depending on the file type you should be able to set a default behaviour in IE11. Personally I think AutoIT solutions with this are overkill, I'd recommend looking at the following blog post for alternative ideas if possible: https://blog.codecentric.de/en/2010/07/file-downloads-with-selenium-mission-impossible/

How to check if an Android App is a device owner?

对着背影说爱祢 提交于 2019-12-06 08:36:48
问题 I am executing one test case using robot framework where I have to install an app and make it as device owner and then check if the same app has become a device owner or not. I have searched though Stack Overflow and other search engine results but there, they have mentioned on how to make an app as device owner but not the way how to check if an app is a device owner. I have used following command to make my app as device owner : adb shell dpm set-device-owner com.myapp.package/.main

Robot Framework not creating file or writing to it

北战南征 提交于 2019-12-06 08:33:35
I have a Python script that takes in a log level and sets that to the default level, so once log messages are passed through, it will print or not print according to the level hierarchy (i.e. all messages print if default is DEBUG, only CRITICAL & ERROR messages if default is ERROR). My Python code is along the lines of this: # Sets default log level. def set_default_level(self,level): levels = { 'DEBUG': logging.DEBUG, 'INFO': logging.INFO, 'WARNING': logging.WARNING, 'ERROR': logging.ERROR, 'CRITICAL': logging.CRITICAL } # Sets up configuration for logging message. logging.basicConfig(format