robotframework

I get an error while trying to install Ride

好久不见. 提交于 2020-02-06 08:44:25
问题 I get an error when I type the command to install Robotframework ride on my Debian : pip3 install robotframework--ride The error is : Could not find a version that satisfies the requirement Pywin32 (from robotframework--ride) (from versions: ) No matching distribution found for Pywin32 (from robotframework--ride) Btw, it is quite strange that Pywin32 is mentionned while I'm not on Windows... I have both python2 and python3` on my machine and I've read many topics where I saw it could bring

Robotframework.request - How to make a POST request with content “multipart/form-data”

感情迁移 提交于 2020-02-02 06:35:05
问题 I want to make a POST request in Robot Framework with "Content-Type: multipart/form-data" using the RequestsLibrary but nothing seems to work. The Keyword that makes this request looks as follows: *** Variables *** &{API_CREDS} username=myusername password=mypwd *** Keywords *** Get token # Assumes that session has been created [Arguments] ${Session_id} &{headers}= create dictionary Content-Type=multipart/form-data ${response}= Post Request ${Session_id} ${AUTH_TOKEN_URL_PATH} data=${API

How to assign SQL query results to a variable(Robot Framework) to input in application edit text?

六月ゝ 毕业季﹏ 提交于 2020-01-30 06:41:27
问题 Using MySQL and Robot Framework combination along with robot database library and pymysql library. Connecting Database Connect to database pymysql ${DB_NAME} ${DB_USER_NAME} ${DB_USER_PASSWORD} ${DB_HOST} ${DB_PORT} Sleep ${wait_time} Log to console Database Connection is established successfully! And able to fetch the DB table data and printed on IDE console. Problem is that not able to assign query results to a robot variable to input for an edit-text inside the application. ${queryResult1}

Pass arguments when robotframework test case create new instance of customized library class

左心房为你撑大大i 提交于 2020-01-30 02:51:11
问题 There is a customized RF library written in Python: class ALibrary: def __init__(self, name): self._name = name def get_name(self): print "*WARN*" + self._name Import this library within settings *** Settings *** Library lib/ALibrary.py LaoWang by default, it creates new instances of test libraries for every test case. My understanding is that __init__(self, name) gets invoked at the beginning of every test case, for example: *** Test Cases *** Test Case 1 get name Test Case 2 get name

Unable to install robotframework-ride in ubuntu

醉酒当歌 提交于 2020-01-25 08:13:53
问题 I am trying to install robotframwrok-ride in ubuntu18.04 but getting "could not find a version satisfies the requirement Pywin32" error. please help me to get the ride installed. 回答1: That problem is fixed in the next release, which is 1.7.4. You can install the Beta version by following the instructions in the release notes, https://github.com/robotframework/RIDE/blob/master/doc/releasenotes/ride-1.7.4.rst You can also install the current development version, which includes more fixes. pip

Test a python function in Robot Framework 3

家住魔仙堡 提交于 2020-01-25 08:07:27
问题 How can I test a python function in Robot Framework 3. The code I want to test is: def message(msg): print ('your message is ' + msg) return True The robot test: *** Settings *** Library Lib *** Test Cases *** Case1 message "hello" 回答1: If you have a file with python functions in it, you need to reference the filename with suffix in the robot test (assuming your file is named Lib.py ). Example: *** Settings *** Library Lib.py 回答2: You need to follow the below steps to get the function called

Can we write test cases in CSV OR Excel file in Robot Framework and execute just by reading CSV file

心不动则不痛 提交于 2020-01-25 07:50:10
问题 I am working on Robot Framework for mobile App Automation. I have written test cases and keywords in Test Suit in Robot Framework and i can execute it. But i am trying to have test cases written in CSV OR Excel file which will be the input to Robot Framework (like we do in Test Complete). How we can write test cases in CSV/Excel file [looking for format] which is readable by Robot-framework and how we execute these test cases in Robot by reading the CSV file.Please help [Note : For now i can

calling class variable via method from robot framework prints empty list

眉间皱痕 提交于 2020-01-25 06:39:27
问题 Python version: 3.7.8 Robot framework: 3.1.2 I have a python class where specified a class variable to store and retrieve data later in robot framework. Example: class1 class test1(): __testvar__=[] def set_data(self, data): test1.__testvar__.append(data) def get_data(self) return test1._testvar__ def main_calling_method(self): ...something... self.set_data(data) class2: from ...test1 import test1 class test2(): t=test1() def get_method_data(self) return test2.t.main_calling_method() Robot

Robotframework : How to retrieve the answer of a request

扶醉桌前 提交于 2020-01-24 14:05:07
问题 I would like to test the activation of a user. To validate the creation of a user, I click on a "Valid" button and the front-end requests the back-end to send a POST request. My goal is to retrieve the answer to this query. I have tried these keywords: *** Setting *** Library SeleniumLibrary Library HttpLibrary.HTTP *** Keyword *** !Confirm entry [Arguments] ${id_button} Wait Until Element Is Visible ${id_button} Click Element ${id_button} Response Status Code Should Equal 200 Or *** Setting

How to find Broken Links using Robot Framework

空扰寡人 提交于 2020-01-24 01:59:33
问题 I'm facing an issue with finding the broken links on the webpage. I'm using RequestsLibrary for the same. Right now I'm able to find all the links but now able to verify them against the response code. Get All Link Tests [Tags] Regression [Setup] Log To Console Test for total links present on landing page started... ${base_url}= Get Base Url open browser about:blank ${browser} go to ${base_url} ${ALL_LINKS_COUNT} get element count xpath://a log to console ${ALL_LINKS_COUNT} @{LINK_ITEMS}