robotframework

RobotFramework Selenium2Library and External Libraries- pass webdriver?

笑着哭i 提交于 2019-11-28 09:23:16
问题 I have created a Java library that utilizes an instance of Selenium Web Driver. I would like to run the test I have written with this library, as well as the Selenium2Library. In a way, the Java Library would add some functionality that I need (working with Ajax elements), but much of the test could be written with Selenium2 keywords. Is there a way to pass the webdriver instantiated in Selenium2Library to my external library so that they can run the same test? Thank you for your input! 回答1:

wait until the page is loaded

大城市里の小女人 提交于 2019-11-28 05:45:58
问题 In Robot Framework, does any keyword in any library implement this? Open Browser and Go To just go to the requested URL but don't wait until the page document is fully loaded. 回答1: Have a look at this discussion. You don't really need to wait for anything apart from Ajax. In case you are using Angular, have a look at extendedselenium2library that implements waiting for Angular actions with every keyword. If you are not using Angular, but you know which Ajax action you expect will fire before

Robot framework installation issue for wxPython

时光怂恿深爱的人放手 提交于 2019-11-28 02:19:02
问题 I am trying to install robot framework but getting an error for wxPython version. When I type ride.py in cmd then an error message is shown: "C:\Users\snar13>ride.py Wrong wxPython version. You need to install wxPython 2.8.12.1 with Unicode support to run RIDE. wxPython 2.8.12.1 can be downloaded from http://sourceforge.net/projects/wxpytho n/files/wxPython/2.8.12.1/" I have done following steps: Installed python version 2.7, set an environment variable and verified in cmd by typing “python

Robot Framework: access Robot's global variables from Python library code?

二次信任 提交于 2019-11-27 23:28:01
问题 I have some settings-type global vars that I'd like to be able to access from Python code. For example: pybot --variable RESULTS_PATH:/wherever/this/points test.txt Now, my module logger.py file needs to know the results_path to set up properly. I know that I can initialize the logger with a variable, like ***Settings*** Library logger ${RESULTS_PATH} And then in logger I'll be passed results_path: def __init__(self, results_path): # Whatever However the problem with doing it this way for me

how to handle web based alert or pop ups in robot framework?

自作多情 提交于 2019-11-27 23:02:24
问题 I am using Robot IDE for creating robot automation test scripts. For my test when I start audio call then browser is asking for the permission with "Allow" and "Block" buttons. So as it's a web based alert/popup dialog I can't able to access it in my robot script. If I am clicking on "Allow" button manually then it proceeds the test and passes successfully but I need to click it manually. For Image, please click here As you can see from the image I want to click on Allow button which is

Running tests on PyCharm using Robot Framework

非 Y 不嫁゛ 提交于 2019-11-27 21:38:53
I started using PyCharm with the robot framework, but I'm facing an issue. How can I run my tests? All the time I right click on my tests folder, I get an Empty test suit message from the console log. Is there any way to run each test separately like right click on the test case and hit the test runner? This is my code: *** Settings *** Library Selenium2Library Resource /steps/keywords.txt *** Variables *** ${URL} http://www.google.com *** Keywords *** Open browser with URL [arguments] ${url} Open Browser ${url} browser=gc Set input on text box [arguments] ${xpath} ${text} Input text ${xpath}

Robotframework: Selenium2Lib: Wait Until (…) Keywords

三世轮回 提交于 2019-11-27 07:31:03
问题 I am using Selenium2 w RF to test GUI of rather complex web application. Since I do get some fails with elements load, would like to know what are differences between keywords: Wait Until Element Is Enabled locator Wait Until Element Is Visible locator Wait Until Page Contains Element locator What is the scoope of each one and which keyword is most reliable in case, when I wanna check if element of the page is fully loaded and ready to use? Is there a keyword that checks if a full page is

Json handling in ROBOT

半世苍凉 提交于 2019-11-27 07:19:54
I have a Json file , in which there is a field which i need to edit and save the file for next usage. But the field which i need to edit is as shown below, The val i need to assing fr the field is generated Randomly in run time which i'll be capturing in a variable and pass it to this json specific key "dp" then save the json. The saved json will be used for REST POST url. { "p": "10", "v": 100, "vt": [ { "dp": "Field to be edited"(integer value) , ] } Please help me out , I am using ROBOT framework, i need to update json field in run time. The simplest solution would be to write a python

Pass existing Webdriver object to custom Python library for Robot Framework

天大地大妈咪最大 提交于 2019-11-27 01:21:38
I am trying to create a custom Python library for Robot Framework, but I'm new to Python and Robot and I'm not sure how to accomplish what I'm trying to do. I want to pass the Webdriver object that Robot creates using Selenium2Library to my custom Python library so that I could use the Webdriver's methods, such as find_element_by_id . I've seen some suggestions about how to do it here and here , but they're for Java libraries - I can't find any Python instructions. How would I go about doing this in Python? Or would I want to do this differently, without passing the Webdriver object? Bryan

Robot Framework using Python, key press without selecting any button or element in the page

青春壹個敷衍的年華 提交于 2019-11-26 20:46:02
问题 I am automating one application using Robot Framework using Python. In a certain situation I need to press Enter without selecting any button or element of the page once the page is loaded. I have tried with the below example (using Press Key), but it didn't work as I don't want to select any specific button or element of the page before press Enter on the page. Examples: Press Key text_field q Press Key login_button \\\13 # ASCII code for the Enter key The below keyword is not recognized by