robotframework

How to use fully functional JsonPath in RobotFramework?

≡放荡痞女 提交于 2020-01-07 06:40:43
问题 Could you please recommend how to use JsonPath in the Robot Framework? It should supports multi-level query as following: $.items[?(@.status.name="closed")].name I'm seeking the way to make following work: *** Variables *** ${json} {"items":[{"name":"item1","status":{"id":1,"name":"opened"}},{"name":"item2","status":{"id":2,"name":"closed"}}]} ${json_path} $.items[?(@.status.name="closed")].name *** Test Cases *** Get closed item ${names}= Get Json Items ${json} ${json_path} Should be equal $

WebDriverException: Message: File not found - Close Upload FIle window in Robot Framework

时间秒杀一切 提交于 2020-01-07 03:53:24
问题 I need to close the File Upload window of a browser. I tried the following code to achieve this Press Key id=fileToUpload \\27 - I found the ascii character in the URL http://help.adobe.com/en_US/AS2LCR/Flash_10.0/help.html?content=00000520.html My Complete code is *** Variables *** ${TVAURL} http://localhost:1500/ ${Browser} Firefox TC_01: Enter into the application [Documentation] Enter into the application to upload a file Open Browser ${TVAURL} ${Browser} Choose File id=fileToUpload C:/

Can robot framework keyword can be executed in python console?

泄露秘密 提交于 2020-01-06 22:43:56
问题 I am using robot framework for writing test case. As it is not possible to debug the each and every statement, logging is only way which makes it very slow to develop test case. I am looking for a way in i can execute the robot keyword in python console. so that I can debug and see if the keyword i have created or inbuilt keyword that i have used will work correctly. Is there a way to do it ? eg. Can i execute wait until page contains element ${ELEMENT} ? 回答1: Try following plugin on eclipse

How to perform mouse right click in Robot Framework?

落爺英雄遲暮 提交于 2020-01-06 06:46:44
问题 I' writing automated tests using selenium in RIDE. I need somehow to right click element on page and click option from context menu. Is somewhere any library for Robot Framework which may be helpful to do that? If not, Could you help me how to do that in other way, using existing keywords for example? 回答1: I found the solution. I wrote an extension to the Selenium2Library: from robot.api.deco import keyword from selenium import webdriver from selenium.webdriver import ActionChains from

How to make variables from 'Import Variables' globally available?

空扰寡人 提交于 2020-01-06 06:46:41
问题 I'm currently using Robot Framework to automate some tests. Problem: I am trying to figure out a way to make variables imported from 'Import Variables' keyword globally available (--variablefile is not an option for me right now, sadly). I already tried some workarounds, with no luck: 1. Import Variables 2. Get Variables available in current scope 3. Loop through each variable and get its key and value 4. Set each variable globally (using Set Global Variable) The problem I faced in the above

RobotFramework - Run Tests on different environments

怎甘沉沦 提交于 2020-01-06 05:27:27
问题 I need to run specific tests for specific environments QA, Dev, Test etc., I have put a Tag on different tests i want to run on different, I am using AppiumLibrary as I am working on a mobile device, I was thinking to use a text file with all variables i need to execute for specific enviroments something like this. --variable Env:http://example.test.com:1111 --variable remoteUrl:http://127.0.0.1:123/web/hub --variable platformVersion:8.0 --variable platformName:Android --variable deviceName

RobotFramework - Run Tests on different environments

假装没事ソ 提交于 2020-01-06 05:27:04
问题 I need to run specific tests for specific environments QA, Dev, Test etc., I have put a Tag on different tests i want to run on different, I am using AppiumLibrary as I am working on a mobile device, I was thinking to use a text file with all variables i need to execute for specific enviroments something like this. --variable Env:http://example.test.com:1111 --variable remoteUrl:http://127.0.0.1:123/web/hub --variable platformVersion:8.0 --variable platformName:Android --variable deviceName

Selenium: Session externalKey not available

一世执手 提交于 2020-01-04 04:42:09
问题 The Selenium Grid Hub I am running displays this error message whenever a Robot Framework automation test (kicked off by a Jenkins job) requests a Chrome browser from the Hub: Session [(null externalkey)] not available and is not among the last 1000 terminated sessions. I've spent hours searching and trying proposed solutions with no luck. Running a Linux server as a Selenium Grid Hub and a windows server as a Selenium Grid Node. Have tried each node with versions 3.0.1, 3.5.3, 3.13.0, and 3

Jenkins pipeline and Robot Framework results

随声附和 提交于 2020-01-03 08:39:09
问题 I had to implement a Pipeline and trying to find a way, how to publish Robot Framework results in Jenkins Pipeline. I found multiple questions about implementation of Robot Framework plugin into Pipeline and also found this question which seems to be solution. However I have tried this approach and results are still missing. Is there any workaround or functional example? 回答1: [Edited to reflect successful workaround] This comment on the issue tracker shows a workaround that seems to work:

Can't press enter in selenium2library

a 夏天 提交于 2020-01-03 06:37:59
问题 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 *****