katalon-studio

Katalon Script: Find element by attributes and click it

故事扮演 提交于 2021-02-19 07:52:07
问题 I have some yes/no radio buttons and it would be much faster if I did not have to register these as 'test objects' using many clicks in the UI. Is there a way to edit my test script to find these elements by-attribute and click them? 回答1: You don't need to use the UI (By that I presume you mean the Object Repository). For example, if you have the following HTML: <form action=""> <input type="radio" value="On"> On<br> <input type="radio" value="Off"> Off<br> </form> You can make a parametrized

How to read data from excel sheet in Katalon Studio

不问归期 提交于 2021-02-08 05:14:48
问题 Can I know how to read data from excel sheet in Katalon Studio, so as to read API endpoint from file to check its output? How to code in java to make the URL run and verify the response from the API endpoint? 回答1: I’ve created a sample project using Katalon Studio, you can use it to map with your scenario: HTTP endpoint is defined as 'REST_CommentDetails' test object Other rest parameters are defined as Excel file in 'REST_Parameters' test data Test Suite:"TS_RegressionTest" will do as you

How to extract browser cookie(s) using Katalon Studio

点点圈 提交于 2021-01-29 00:55:46
问题 I am trying to get all the cookies of the browser which is opened while we execute automation test using Katalon. Please suggest how we can extract a specific cookie/list of cookies using Katalon. I have checked in traditional Selenium/Java; its pretty easy - driver.manage().getCookieNamed("Cookie Name").getValue(); But I am not getting any clue how to do this in Katalon. 回答1: Resolved it.... import com.kms.katalon.core.webui.driver.DriverFactory import org.openqa.selenium.WebDriver WebDriver

How to extract browser cookie(s) using Katalon Studio

為{幸葍}努か 提交于 2021-01-29 00:48:12
问题 I am trying to get all the cookies of the browser which is opened while we execute automation test using Katalon. Please suggest how we can extract a specific cookie/list of cookies using Katalon. I have checked in traditional Selenium/Java; its pretty easy - driver.manage().getCookieNamed("Cookie Name").getValue(); But I am not getting any clue how to do this in Katalon. 回答1: Resolved it.... import com.kms.katalon.core.webui.driver.DriverFactory import org.openqa.selenium.WebDriver WebDriver

How to passing json parameters for test api (restful) in katalon studio?

陌路散爱 提交于 2021-01-28 14:13:00
问题 I created a demo test using reqres.in fake data API. I want to create a user with a name and a job parameter, but the data format required is json. In my Katalon test I tried to do that in the script tab: My parameters are not sent to the API... I didn't find how to do that in Katalon Studio (5.7) and I don't know if it's possible to do that. 回答1: You didn't add parameters to the REST object. Click the + Add button shown in the screenshot and add the following to the parameter table: Name |

Convert a Map value to String

Deadly 提交于 2020-06-29 03:51:16
问题 I am trying to convert a map value to String . I tried toString() method but it still returns an Object instead of String response = WS.sendRequest(findTestObject('api/test/TD-4_01_01-Valid')) Map parsed = response.getHeaderFields() String messageId = parsed.get('x-message-id').toString(); println messageId Actual Output: [C5yZC5hcy5sb2NhbC0xMjgyNi05MzE1LTE=] Expected Output: C5yZC5hcy5sb2NhbC0xMjgyNi05MzE1LTE= 回答1: ResponseObject#getHeaderFields returns a Map of String keys to a List of

Folders meaning in Katalon Project

大城市里の小女人 提交于 2020-05-30 08:03:40
问题 Are there any resources that can help me better understand the meaning and the roles of files in each folder in a Katalon project? 回答1: Most of the folder names are named after what they contain such as Scripts, Reports, Test Cases, Test Suites. Was there a specific folder you wanted more information on? Still, if you want to learn more https://www.katalon.com/resources-center/tutorials/ you will be able to find tutorials. 回答2: I myself am looking for such a resource. I cannot find one 1 , so

Folders meaning in Katalon Project

与世无争的帅哥 提交于 2020-05-30 08:03:15
问题 Are there any resources that can help me better understand the meaning and the roles of files in each folder in a Katalon project? 回答1: Most of the folder names are named after what they contain such as Scripts, Reports, Test Cases, Test Suites. Was there a specific folder you wanted more information on? Still, if you want to learn more https://www.katalon.com/resources-center/tutorials/ you will be able to find tutorials. 回答2: I myself am looking for such a resource. I cannot find one 1 , so

katalon test case parameterize with variable

这一生的挚爱 提交于 2020-04-30 15:48:51
问题 i would like post different API body every time the test case run. i have set the variable at POST object e.g. testID default value test0001 then the HTTP body as below, test and verify passed. { “drugId”: “$testID”, } what syntax/command i can use in test case like parameterize test step, so first time test case run drugId = test0001 second time test case run, it will be drugId = test0002 回答1: Your HTTP body should be something like { “drugId”: “${testID}” } And your request in code should

katalon test case parameterize with variable

天大地大妈咪最大 提交于 2020-04-30 15:46:17
问题 i would like post different API body every time the test case run. i have set the variable at POST object e.g. testID default value test0001 then the HTTP body as below, test and verify passed. { “drugId”: “$testID”, } what syntax/command i can use in test case like parameterize test step, so first time test case run drugId = test0001 second time test case run, it will be drugId = test0002 回答1: Your HTTP body should be something like { “drugId”: “${testID}” } And your request in code should