robotframework

How to generate oauth 2.0 token using “Create Client Oauth2 Session” keyword in robot framework

让人想犯罪 __ 提交于 2020-01-16 19:31:13
问题 Token&{head}=Create Dictionary Content-Type=application/x-www-form-urlencoded Create Client Oauth2 Session temp token_url=https://websec-qa.cable.comcast.com/as/token.oauth2 tenant_id=customerequipmentqa tenant_secret=ac975251ba4349acbb962955876ec404 base_url=https://ce-service-qa.u1.app.cloud.comcast.net/xnet/ced/1.0/messages headers=&{head} verify=${True} I am getting below error: MissingSchema: Invalid URL 'None': No schema supplied Perhaps you meant http://None? 回答1: Check Webservice $

Robot Framework:: Imported library 'class' contains no keywords

对着背影说爱祢 提交于 2020-01-15 11:13:11
问题 I am creating Robot Framework keyword using python When I use only function, then RIDE can detect the keyword def hello_world (patient): print ('Hello') However when I am using class helloAll(object): def hello_world (patient): print ('Hello') I am adding the library as below *** Settings *** Library hello I have placed the .py file in the same directory as the test case. Imported library "Name of the Class" contains no keywords Please help. Thanks. 回答1: Ok I found my mistake, I needed to put

How to click a row that has javascript on click event in RIDE

谁都会走 提交于 2020-01-15 04:15:20
问题 I am trying to click a row that has a javascript onclick function in RIDE IDE by using Robot Frame Work with Selenium2 library. <tr class="lstrow" onclick="javascript:selectItem(this);" onmouseover="javascript:this.className='rowhover';" onmouseout="javascript:this.className='row';"> When i perform click event at following xpath, it says element at path not found. //*[@id="myList"]/tbody/tr[0] By inspecting the element, I can confirm this row is there. Also tried to pin point the 'rowhover'

How to click a row that has javascript on click event in RIDE

▼魔方 西西 提交于 2020-01-15 04:14:27
问题 I am trying to click a row that has a javascript onclick function in RIDE IDE by using Robot Frame Work with Selenium2 library. <tr class="lstrow" onclick="javascript:selectItem(this);" onmouseover="javascript:this.className='rowhover';" onmouseout="javascript:this.className='row';"> When i perform click event at following xpath, it says element at path not found. //*[@id="myList"]/tbody/tr[0] By inspecting the element, I can confirm this row is there. Also tried to pin point the 'rowhover'

How to record test cases with robotframework?

不羁的心 提交于 2020-01-14 02:47:11
问题 I recently started using robotframework with the Selenium2Library . I haven't tested using Selenium before, but I know it is possible to record tests using Selenium . In RobotFramework , it says, "it is not possible" . I mean even for a simple login test, I need to write the test , specifying the id of username, password and submit button. However, is there any way by which these tests can be recorded using robotframework ? such as clicking on a text box, entering a string and then clicking

Get Type in Robot Framework

半世苍凉 提交于 2020-01-14 02:30:07
问题 Could you tell me about how to get the variable type in Robot Framework. ${ABC} Set Variable Test ${XYZ} Set Variable 1233 Remark: Get the variable Type such as string, int get ${ABC} type = string get ${XYZ} type = int 回答1: This is what I use: ${type} = Evaluate type($temp).__name__ Note: it's good to have global string/int/float/list/dict/... examples for comparison than hard-coding the type values as they might differ depending on build. 回答2: You can do e.g. this: ${type_ABC} Evaluate type

Testcase level variables in [Documentation] for robot framework

不想你离开。 提交于 2020-01-12 08:48:05
问题 I cannot get test level variables to appear in documentation. Let's say I have this testsuite: | *Variables* | | ${SystemUnderTest} = | Staging | *testcase* | | Device Test | | | Set Test Variable | ${device} | iPhone | | [Documentation] | Device is: ${device} | | | ... | System is: ${SystemUnderTest} | | | No Operation That produces this log: TEST CASE: Device TestExpand All Full Name: T.Device Test Documentation: Device is: ${device} System is: Staging Notice that the Suite level variable

How to use User Keyword Arguments with default values in RobotFramework

巧了我就是萌 提交于 2020-01-12 07:57:07
问题 Can someone explain me how to use default values for optional keyword arguments in connection with data-driven testcases? As you can see in my example not all default values are used in some cases: *** Test Cases *** | testArgs | [Template] | doSomething | | 111 : 222 : 333 : 444 | | xxx : 222 : 333 : 444 | xxx | | 111 : xxx : 333 : 444 | | xxx | | 111 : xxx : 333 : 444 | ${EMPTY} | xxx | | None : xxx : 333 : 444 | ${None} | xxx | | None : xxx : 333 : 444 | ${null} | xxx | | 111 : 222 : xxx :

How to get a required parameter from JSON String using robotframework keyword

可紊 提交于 2020-01-11 13:21:48
问题 The following is my JSON response string { "macKey": "This_is_a_Test_QED_MAC_Key_Which_Needs_to_be_at_Least_32_Bytes_Long", "subject": "delivery@token.com", "audience": "qed:test", "expirationTime": "2016-03-09T23:07:52Z", "notBeforeTime": "2016-03-09T23:07:52Z", "jwtId": "", "permissions": [ "MANAGE_SYSTEM" ], "useCompactPermissions": false, "url": "http://172.30.2.155:8080/", "generatedToken": "eyJhbGciOiJIUzI1NiJ9

Can I install Selenium2Library for RobotFramework without installing Python?

独自空忆成欢 提交于 2020-01-11 07:57:07
问题 Can I use Selenium2Library if I only have Jython? That is, I haven't installed Python, and was hoping to get away with not needing it. I've read conflicting information however that jybot CANNOT use selenium2library, and I'll need pybot to use it. If jybot can't use selenium2Library, is there a way to have jybot call pybot somehow? Thanks 回答1: So after some reading and trial and error, it IS possible to use Selenium2Library with only Jython AS LONG AS you use jython 2.7+ ... jython 2.5.x is