robotframework

Unable to run test on RIDE --monitorcolors option not recognised

断了今生、忘了曾经 提交于 2019-12-08 06:11:20
问题 I have been trying to run tests on RIDE (Robot Framework IDE). It used to warn about --monitorcolors option being depricated. In the latest install, it is unable to recognise. How do I change the options to make my tests run? Thanks 回答1: The --monitorcolors option has been replaced with --consolecolors in Robot Framework version 2.9. The usage documentation for --consolecolors is here. You must be using the old option somewhere - check the Arguments string in the Run tab in RIDE. 来源: https:/

Robot Framework location and name of keyword

坚强是说给别人听的谎言 提交于 2019-12-08 05:28:09
问题 I want to create a python library with a 0 argument function that my custom Robot Framework keywords can call. It needs to know the absolute path of the file where the keyword is defined, and the name of the keyword. I know how to do something similar with test cases using the robot.libraries.BuiltIn library and the ${SUITE_SOURCE} and ${TEST NAME} variables, but I can't find anything similar for custom keywords. I don't care how complicated the answer is, maybe I have to dig into the guts of

How to handle File Upload in Robot Framework

喜夏-厌秋 提交于 2019-12-08 05:13:08
问题 I have excel importer in my application when I click on the "Upload" button I will get a pop up window with file upload screen where I can select the excel from the specified path. How to handle this in Robot Framework? Can any one help me how to handle the case? 回答1: Selenium2Library provides Choose File keyword for the same. It takes two arguments, first is locator for the button and second is path to the file which needs to be uploaded. e.g. Choose File xpath=.//div/input ${TEMPDIR}${/

How do I send value to a date picker in Robot Framework?

耗尽温柔 提交于 2019-12-08 04:55:09
问题 I am trying to automate form filling using robot framework. Could pass values to text fields, drop down list etc, stuck at date. Anyone who has done please help. 回答1: You can send, e.g. a date 6 days from today, directly by setting the value of the datepicker element with javascript: ${my_date_to_select}= Get Current Date UTC 6 days %d/%m/%Y Execute JavaScript document.getElementById('ID_OF_YOUR_DATEPICKER').value='${my_date_to_select}' NB: In order to use the keyword 'Get Current Date', you

“value error: Element locator did not match any element.” while trying to locate a element

半腔热情 提交于 2019-12-08 04:54:53
问题 I am using Robot Framework with Selenium2Library for website tests automation. My HTML Value is <select class="autoWidth m![Element Locator Error][1]inWidth" id="ctl00_ResultPanePlaceHolder_ctl00_ctl02_ctl01_contentContainer_ddlLanguage" name="ctl00$ResultPanePlaceHolder$ctl00$ctl02$ctl01$contentContainer$ddlLanguage"> <option value=![enter image description here][2]"1118">አማርኛ ‎(ኢትዮጵያ)‎</option> I am using cmd Click Element id=ctl00_ResultPanePlaceHolder_ctl00_ctl02_ctl01_contentContainer

Stuck with creating Keyword library using Java in Eclipse and using that JAR file in RIDE

余生长醉 提交于 2019-12-08 04:52:54
问题 I'm new to ROBOT framework and must create library keyword using java and utilize the JAR files in RIDE editor. I have followed the below steps. But still have confusions in where to start up. Please help me to achieve this. Steps: 1) Installed Python, wxPython, pybot, RIDE, selenium2library successfully and I'm able to work with RIDE using predefined keywords. 2) For creating own java library, Installed Eclipse Mars, Java, ROBOT IDE manually using the link https://github.com/NitorCreations

How to read required key, values from json response and store it in json format using robot framework?

我与影子孤独终老i 提交于 2019-12-08 04:43:20
问题 I am trying to read the required key and values from JSON Response and store it in JSON file. I have a sample simplified json format as below: ${API_Output}= { "data": { "resources": { "edges": [ { "node": { "tags": [], } }, { "node": { "tags": [ { "name": "app", "value": "e2e" }, { "name": "Cost", "value": "qwerty" } } }, { "node": { "tags": [ { "name": "app", "value": "e2e" }, { "name": "Cost", "value": "qwerty" }, { "name": "test", "value": "qwerty" } } } ] } } } Here, I am reading the

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

此生再无相见时 提交于 2019-12-08 03:23:42
问题 <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. 回答1: 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:/

Robot Framework not creating file or writing to it

孤街浪徒 提交于 2019-12-08 03:02:48
问题 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,

How to handle File Upload in Robot Framework

拟墨画扇 提交于 2019-12-08 02:54:15
I have excel importer in my application when I click on the "Upload" button I will get a pop up window with file upload screen where I can select the excel from the specified path. How to handle this in Robot Framework? Can any one help me how to handle the case? Sachin Nikam Selenium2Library provides Choose File keyword for the same. It takes two arguments, first is locator for the button and second is path to the file which needs to be uploaded. e.g. Choose File xpath=.//div/input ${TEMPDIR}${/}file_pa.csv If you're using a dialog or input that WebDriver can interact with, then Sachin's