robotframework

Selenium Webdriver - How to use Robot Framework with Java

こ雲淡風輕ζ 提交于 2019-12-11 08:30:57
问题 I want to use robot framework with java in Eclipse IDE. i have installed robot framework in Eclipse IDE. How to write script by using robot framework with Selenium web-driver. 回答1: If you want to use eclipse as an IDE to write your tests you can use this plugin: RobotFramework-EclipseIDE If your goal is to write a java method then call it from robotframework you can use Remote library. Here are the supported formats writing robotium tests: Robotium Test Data Sytntax You can also use maven to

Extracting single Text from a table cell containing multiple texts Robot Framework

六眼飞鱼酱① 提交于 2019-12-11 08:04:31
问题 I have a table in which some cells have multiple text and each text has its own xpath. An example, the two text elements in the code below are located in the same table cell, but has two xpaths : for the first "B17AA038" xpath is // [@id="profile_research"]/tbody/tr[1]/td[10]/text() and the next instance has another xpath (// [@id="profile_research"]/tbody/tr[1]/td[10]/div[2]/text()). In the table I have some cells that have many individual text elements packed in one cell. I am trying to

In Robot Frame Work How Can we use value returned from one keyword as input argument to other keyword directly(without use of variable)

空扰寡人 提交于 2019-12-11 08:00:01
问题 How Can we use value returned from one keyword as input argument to other keyword directly (without assigning return value to variable) Currently I am maintaining all Web Elements or Variable names and corresponding xpath in an Excel Sheet. I get XPath using keyword read_xpath by passing web element/variable name as argument. I store the xpath in separate variable then make use of it for other or Next line keyword. Since I need to use a variable for each XPath access, i am trying to find out,

Convert a list into a list of parameters using robot framework

随声附和 提交于 2019-12-11 07:38:45
问题 I'm using robot framework and I want to use a keyword that acepts a variable number of parameters this is the common use of this keyworkd keyWord to use var1 var2 var3 Now I want to use it from my own keyword because it will be common in my project, and I want to avoid repeat the loop in every file. This is what I tried Get data from users var1 var2 var3 Get data from users [Arguments] @{keys} :FOR ${user} IN @{users} \ keyWord to use ${keys} [Return] ${userData} But this is not working

How can I specify arguments in the middle of the sentence in gherkin-style tests in robot framework?

扶醉桌前 提交于 2019-12-11 07:36:26
问题 Using Robot Framework, I am intent on using Gherkin style tests since it is the lingua franca of BDD/ATDD. I can specify a test like this: *** Test Cases *** New alert Given there were no alerts so far When there is an alert Then an alert should be sent with level LOW and Robot will map this to methods in my test library without any help: def there_were_no_alerts_so_far(self): assert(self.alert == None) def there_is_an_alert(self): self.alert = self.alert_processor.alert() def an_alert_should

How to connect to mysql using ride

。_饼干妹妹 提交于 2019-12-11 06:25:30
问题 Using RIDE,I want to connect to MySql Database. I have downloaded the Database Library and MySQL db .I need to execute queries from MySQL for validating.How to connect to MySQL using RIDE. 回答1: Here is a simplified RF test setup using MySQL database on localhost: *** Settings *** library DatabaseLibrary library pymysql Suite Setup Connect To Database @{database} *** Variables *** @{database} pymysql dbname user password localhost 3306 来源: https://stackoverflow.com/questions/11323209/how-to

Running robotframework tests simultaneously

半城伤御伤魂 提交于 2019-12-11 05:54:51
问题 Is there a way to run all my test cases simultaneously? if so could you please post an example of how to do it? Regards, Meir 回答1: There is nothing built-in to robot to run tests in parallel. If your tests are spread across multiple suites you can write a script that runs them all at the same time, and then you can use rebot to combine all of the output.xml files into a single report. There is an open source program that might do what you want. The project is named "pabot" and can be found

Including --data-binary in Robot Framework request

安稳与你 提交于 2019-12-11 05:42:47
问题 I'm posting a image (.svg/.png) using Robot Framework (the tabular pythonic way) using the --data-binary flag to test a rest API. The documentation suggests it accepts binary data, but not how to use --data-binary. See robot request docs The post in CURL looks like this: curl -w "\n%{http_code}\n" -H "Content-Type: image/png" -u user:pass --data-binary "data=@~/someImage.png" -X POST "http://website/{id}" The test case is formatted like so: ${result} = Post url=${ROOT}/website/{id} data=${if

Robot Framework running multiple testcases using csv and for loop

纵然是瞬间 提交于 2019-12-11 03:17:44
问题 I have a csv file which contains TestcaseID,Testcase Description,Tag and input to the testcase like below TUNG001,sample1,sampletag1,01 TUNG002,sample2,sampletag2,02 I want to iterate through this file and fetch each row and start a test case(which will be TestcaseID) using a common function. After researching, I found out that this feature is not implemented in Robot Framework. Someone please suggest how I can achieve this. 回答1: Here's how you COULD do this, below this is are better ways to

How to Customise the Log file generated in the robot Framework Report

烂漫一生 提交于 2019-12-11 02:08:00
问题 I want only test scenarios in the Log file of the report generated in the Robot Framework but while clicking upon the Test Scenarios the test scripts is getting expanded and the Test steps are clearly visible how can stop this issue I have attached the screenshots I want to achieve this But I am getting this type of Log Report 回答1: In Robot Framework userguide there is an entire section dedicated to this functionality: Removing and Flattening Keywords. In your case I think that the -