katalon-studio

katalon test case parameterize with variable

岁酱吖の 提交于 2020-04-30 15:44:47
问题 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

What is the “include” folder used for in a Katalon Studio project

扶醉桌前 提交于 2020-04-30 06:32:09
问题 Similarly to what is being asked in this question, which is yet without answer, I'm struggling to understand how should I properly use folders in a Katalon Studio project. In particular, so far I wasn't able to trigger creation of any file in the Include subfolders. Which files should I expect to find there? Depending on the answer, I can decide wether to put them under version control or go and default .gitignore to exclude Include . I watched the available tutorials, but so far I couldn't

Global Variables - Katalon Studio

霸气de小男生 提交于 2020-02-05 20:55:11
问题 I am working with Cucumber & Groovy in Katalon Studio. I have ten feature file lines in Cucumber and corresponding step definitions. In my cucumber feature file first step has the indicator where if the first line is passed with the parameter with "NO RUN", the test case should not run and it should be moved to the next test case. So, I thought, I will use the Global variable indicator where I can handle in the test and assign the values. I see that and could create the Global Variable (RUN

How to convert Katalon Script in Selenium Java?

丶灬走出姿态 提交于 2020-02-02 11:34:08
问题 As we know Katalon has now become a paid tool so my Katalon scripts need to be converted into Selenium Java script. Katalon scripts are in Groovy, and it's written using Katalon Built in libraries, objects are saved in .rs(.xml) fie on Object repository and user defined Keywords are also in Groovy. So please suggest best way(time saving) to convert scripts into selenium. 回答1: I don't think there is a simple way to convert all of your scripts to Selenium. Katalon keywords are a wrapper around

Store generated dynamic unique ID and parse to next test case

冷暖自知 提交于 2020-01-23 17:53:26
问题 I have keyword groovy which allowed me to generate a dynamic unique ID for test data purpose. package kw import java.text.SimpleDateFormat import com.kms.katalon.core.annotation.Keyword class dynamicId { //TIME STAMP String timeStamp() { return new SimpleDateFormat('ddMMyyyyhhmmss').format(new Date()) } //Generate Random Number Integer getRandomNumber(int min, int max) { return ((Math.floor(Math.random() * ((max - min) + 1))) as int) + min } /** * Generate a unique key and return value to

Catching jQuery noty with Katalon Studio

依然范特西╮ 提交于 2020-01-06 06:18:11
问题 My AUT has a jQuery "noty" that appears after clicking on a button. ("Noty" is a jQuery plugin for message/notification creation.) The message stays on screen for a couple of seconds and then goes away. I'm afraid that's to fast for methods such as Katalon's 'WebUI.verifyElementPresent()' . Is there another way to catch it with Katalon Studio or Selenium ? 回答1: Yes, there is a way to handle this situation: import org.openqa.selenium.support.ui.WebDriverWait as WebDriverWait WebDriverWait wait

Connect to Oracle SQL in Katalon Studio

坚强是说给别人听的谎言 提交于 2020-01-02 02:46:07
问题 I tried to use Groovy script below from to connect to an Oracle SQL database: def connectDB(String dataFile){ //Load driver class for your specific database type Class.forName("oracle.jdbc.driver.OracleDriver") String connectionString = "jdbc:sqlite:" + dataFile if(connection != null && !connection.isClosed()){ connection.close() } connection = DriverManager.getConnection(connectionString) return connection } There is sqlite in connection string, but not sure which value should I use there.

Converting a java code containing selenium commands to groovy in order to be inserted at script mode on Katalon

醉酒当歌 提交于 2019-12-24 10:24:15
问题 I have a solution for a particular problem using Selenium Webdriver in Java environment, so the code in java and I want to put it in Katalon at script mode that runs groovy language and the code provided below contains selenium commands like findElements with. size() to count the elements in a panel which I did not find an equivalent for it in Katalon and also the code containing a casting from integer to string. String changingselec = ""; int lastChildIndex = driver.findElements(By

WebDriverException: unknown errors (“chrome failed to start” and “Failed to create a Chrome process”)

不打扰是莪最后的温柔 提交于 2019-12-24 09:18:30
问题 After installing Katalon Studio v.5.8.2 to a co-workers laptop, when trying to run the test, test fails with this exception Test FAILED because (of) (Stack trace: com.kms.katalon.core.exception.StepFailedException: Unable to open browser with url: '' (Root cause: org.openqa.selenium.WebDriverException: unknown error: chrome failed to start (Driver info: chromedriver=2.35.528161 (5b82f2d2aae0ca24b877009200ced9065a772e73),platform=Windows NT 10.0.17134 x86_64) (WARNING: The server did not

How to get Test Case name in Katalon Studio

大城市里の小女人 提交于 2019-12-24 06:37:20
问题 I am trying to take a screenshot of every Test Case and have it exported to a screenshot directory with it's name. I am using: testName = RunConfiguration.getExecutionSourceName().toString() but this only contains the name of the Test Suite and NOT the Test Case name. WebUI.takeScreenshot('path'+testName+'.png') How would I reference the Test Case name and not the Test Suite name? Thank you. EDIT: The code I am taking a screenshot currently lives in the "TearDownTestCase" method located in