robotframework

Can't press enter in selenium2library

自古美人都是妖i 提交于 2020-01-03 06:37:12
问题 I'm trying to make a test that will open Facebook, log in and search something. However I'm having trouble getting Facebook to search. Selenium types whatever it needs in the search bar, but I can't find how to locate the search button or press the enter key. *** Settings *** Documentation Tell pui she bitch Library Selenium2Library *** Variables *** *** Test Cases *** User must tell pui she bitch open browser http://www.facebook.com set browser implicit wait 5 input text name=email *****

how to pass values from python code to variable of robot framework

可紊 提交于 2020-01-03 05:32:22
问题 I'm beginner in robot framework. I want to pass values from python file to variable of robot framework, but still can't work successfully. globe.py is my python file and it's very simple. a = 'this is testing' below is test case configuration as robot required *** Setting *** |Variables|globe.py *** Variables *** |${myTest}|${a} but robot throw error : "Error in file: Setting variable '${myTest}' failed: Variable '${a}' not found." could you give some suggestion on that? here is screen about

Robot Framework Variable Class File with triple Nested Dictionary is not dot notation accessible

北战南征 提交于 2020-01-03 02:02:37
问题 Using the Robot Framework Documentation on Variable Files as a guide I implemented a Variable File Class with the get_variables. The basic example works as described. When I implement a triple nested Dictionary ( ${A.B.C} ) I can access the first two using ${A} and ${A.B} notation. However, when I want to access the third node ${A.B.C} the result is that I get an error Resolving variable '${A.B.C}' failed: AttributeError: 'OrderedDict' object has no attribute 'C' In the below three examples I

Robot framework: run setup for an entire test suite

匆匆过客 提交于 2020-01-02 16:28:12
问题 Is it possible in ROBOT to run a setup for an entire test suite, rather than running the setup individually for each file? I want to run setup at the beginning of the suite, and if the setup fails, not run any of the test cases at all. For example, given the following file: *** Settings *** Test Setup Setup Fails *** Test Cases *** Case1 Should Be True 1<2 Case2 Should Be True 2<1 *** Keywords *** Setup Fails Should Be True 2<1 I want neither Case1 nor Case2 to execute at all. As it is, both

How to execute the simple python script from robot frame work

試著忘記壹切 提交于 2020-01-02 15:01:09
问题 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

WebDriverException: Message: Missing 'marionetteProtocol' field in handshake

对着背影说爱祢 提交于 2020-01-02 14:11:35
问题 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

Robot framework, chrome new tab issue

无人久伴 提交于 2020-01-02 09:58:52
问题 I have a simple Robot Framework script *** Settings *** Documentation Simple Amazon.in demo Library SeleniumLibrary *** Variables *** ${MESSAGE} Hello, World *** Test Cases *** User must sign in to check out [Documentation] This is some basic info about the test [Tags] Smoke Open Browser http://www.amazon.in chrome Input text id=twotabsearchtextbox Ferrari 458 Click Button xpath=//div[@class='nav-search-submit nav-sprite']/input[@class='nav-input' and 1] Wait until page Contains results for

Robot framework, chrome new tab issue

江枫思渺然 提交于 2020-01-02 09:58:36
问题 I have a simple Robot Framework script *** Settings *** Documentation Simple Amazon.in demo Library SeleniumLibrary *** Variables *** ${MESSAGE} Hello, World *** Test Cases *** User must sign in to check out [Documentation] This is some basic info about the test [Tags] Smoke Open Browser http://www.amazon.in chrome Input text id=twotabsearchtextbox Ferrari 458 Click Button xpath=//div[@class='nav-search-submit nav-sprite']/input[@class='nav-input' and 1] Wait until page Contains results for

Pass variables from python file to robot framework variables

让人想犯罪 __ 提交于 2020-01-02 05:22:07
问题 I am assigning variables in robot framework as *** Variables *** ${TestNAME} test But can I pass variable value from python file? #test.py var = 'test' Is it possible to assign var to ${TESTNAME} ? 回答1: If you have a file named "test.py" that has variables defined in it, you can import the variables using the robot variable file feature. Here's an example, using the pipe-separated format for clarity: *** Settings *** | Variables | test.py *** Variables *** | ${myTestName} | ${var} This works

How to convert a tuple in robot framework into list

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-01 19:31:54
问题 After executing a mysql query, got the results in the form of tuple in robot framework. In order to do further operations, I would need to convert that tuple into list. Ex: @{id}= Query select column1 from table_name where column2 = '${var1}' and column = '${var2}' Here the @{id} would be returned as a tuple. EX : ( (1), (4) ) Now I need to convert the above tuple into list as below : [ 1, 4 ] 回答1: If you only had a tuple, you could use Convert To List or Create List. But here you have a