robotframework

How do I use Click Element function with robot framework when the element does not have id or name?

青春壹個敷衍的年華 提交于 2021-02-18 12:46:09
问题 I'm currently using the Selenium2Library in robot framework to automate some web tests. Currently, I'm having problems automating the click of a login button with the Click Element function. This is the element I would like to use: <a class="transparentBtn loginLink ng-scope" ng-click="commonService.gigyaRaasLogin()" translate="BTN_ADMIN_LOGIN_WATCHLIST">LOGIN</a> and this is the xpath if I copy from the console: //*[@id="menu"]/div/div[5]/div/div/div[2]/ul/li[2]/a I have trouble finding

No keyword with name '${body}= Create Dictionary' found

放肆的年华 提交于 2021-02-17 07:16:19
问题 *** settings *** Library RequestsLibrary Library Collections Library OperatingSystem Library SeleniumLibrary *** Variables *** ${username} XXXXXX ${password} YYYYYY ${locale} ZZZZ *** test cases *** TC1 ${body}= Create Dictionary username= ${username} password= ${password} ${header}= Create Dictionary Accept=application/json, text/plain, */* Content-Type=application/json, Accept-Language=${locale}, Create Session OA2 ${base_url} ${response}= post request OA2 /oauth/v2/token data= ${body}

How can I check list with numbers, that is ordered numerically in Robot Framework

自闭症网瘾萝莉.ら 提交于 2021-02-11 17:57:34
问题 I have problem with checking my list. Actually I need check that list is ordered numerically in Robot Framework. Let's imagine that we have a list ${nice}= ['13', '12', '10', '7', '6', '6', '6', '4', '3', '2', '2', '1', '1', '1', '0', '0'] I need to verify that the first element is greater than the second, the second greater than the third and so on. Problem is, that in Robot Framework keyword 'Sort List' doesn't order number list in proper way. One of the decision is to call Python method

Robotframework: RIDE - SikuliLibrary import error

拥有回忆 提交于 2021-02-08 10:01:33
问题 I am working with Robotframework - SikuliLibrary for windows app testing. Everything is installed properly. From RIDE I am importing SikuliLibrary following way _ Library SikuliLibrary If RIDE imports properly then its text color becomes black othertwise red. Sometimes text color is black & sometimes red. Can any one say why? 回答1: There are some troubleshoots, you should try. There is a "Import Failed Help" button on the right, below the "Variables" button. As instructed in the help, you

Error: No section: 'default' in Robot Framework using DatabaseLibrary

僤鯓⒐⒋嵵緔 提交于 2021-02-08 08:32:52
问题 I am using Robot Framework with Database Library to test database queries on localhost. I am running it by XAMPP. This is my test case: *** Settings *** Library DatabaseLibrary *** Variables *** @{DB} robotframework root \ localhost 3306 *** Test Cases *** Select from database [Tags] This Connect To Database MySQLdb @{DB}[0] @{DB}[1] @{DB}[2] @{DB}[3] @{DB}[4] @{results}= Query Select * From tbName Log Many @{results} I have installed MySQLDb for Python 2.7, however, when I run it using pybot

Error: No section: 'default' in Robot Framework using DatabaseLibrary

妖精的绣舞 提交于 2021-02-08 08:32:28
问题 I am using Robot Framework with Database Library to test database queries on localhost. I am running it by XAMPP. This is my test case: *** Settings *** Library DatabaseLibrary *** Variables *** @{DB} robotframework root \ localhost 3306 *** Test Cases *** Select from database [Tags] This Connect To Database MySQLdb @{DB}[0] @{DB}[1] @{DB}[2] @{DB}[3] @{DB}[4] @{results}= Query Select * From tbName Log Many @{results} I have installed MySQLDb for Python 2.7, however, when I run it using pybot

How can I add an extension to my chromedriver at the Robot Framework with Selenium2Library and launch remotely

醉酒当歌 提交于 2021-02-08 08:26:48
问题 I got stuck with scenario like How can I add an extension to my chromedriver at the Robot level with Selenium2Library , but i am trying to launch browser on a remote machine. Answer present on the above question works well on local machine. But to how to add an extension to chrome browser and launch on remote machine. Using python to get chrome options def launchbrowserwithextension(): options = webdriver.ChromeOptions() options.add_argument('--load-and-launch-app=path_to_extension') return

How can I add an extension to my chromedriver at the Robot Framework with Selenium2Library and launch remotely

流过昼夜 提交于 2021-02-08 08:26:23
问题 I got stuck with scenario like How can I add an extension to my chromedriver at the Robot level with Selenium2Library , but i am trying to launch browser on a remote machine. Answer present on the above question works well on local machine. But to how to add an extension to chrome browser and launch on remote machine. Using python to get chrome options def launchbrowserwithextension(): options = webdriver.ChromeOptions() options.add_argument('--load-and-launch-app=path_to_extension') return

how to execute bat file (.bat) by use command robot framework?

ⅰ亾dé卋堺 提交于 2021-02-08 05:56:07
问题 I have one script.bat and i want to excute this script it in robotframework . I'm also try with this but nothing work for me . Run ${CURDIR}/script/script.bat Anyone could help me please ? 回答1: Use Process Library to run bat file Then your snippet wil be like *** Settings *** Library Process *** Test Case *** Launch Bat File Run Process ${CURDIR}/script/script.bat I tested above snippet using sample bat file(script.bat) which launch chrome. start chrome https://www.google.co.in/ Even i tried

Robot framework: Is there a way to write dynamic test cases?

*爱你&永不变心* 提交于 2021-02-07 14:47:53
问题 I am pretty new to robot framework. I would like to create test cases dynamically without having a input key-value driven approach. Found some material that suggested the following: suite = TestSuite('Example suite', doc='...') tc = TestCase('Example test') tc.add_step(TestStep('Log', args=['Hello, world!']) suite.add_test(tc) I dont see add_step in test case class, Will continue to look around and see if there are any solutions. 回答1: The TestSuite object has a keywords attribute which itself