(TEST DATA) Define specific Excel Sheets to get Excel Values

Hi
Use assert target.contains(rowcount.toString())

2 Likes

Thanks HeleneB :slight_smile:

Hi Shilpi,

Very sorry for my slow response, I’m quite busy on my work.

Thank you @HeleneB for handling this.

Cheers! :beers:

1 Like

Hi Guys,

New query - how can I delete previously downloaded CSV files from my system’s download folder.

Hi Shilpi,

You can try this solutions and play with it. . .

Hope that helps. . . :slight_smile:

1 Like

Thanks , I am able to do it now with ref File Operations - Open any File and Delete file Using Custom Keyword in Katalon
but rather using as custom keyword I have created method and using that in my code.
not sure why as keyword it does not worked in feature file though as keyword it worked in manual scripts.

These are more optimized code, will surely use it.
Thanks for quick responses :slight_smile:

Cool!

Cheers :beers:

I have element which get active on mouse hover.
First I have to hover mouse on element then upload files by click on that.
Three Actions at a time …please guide…
Mouse Hover, click and file upload

Yes its worked :slight_smile:
added upload plugin and it worked .

could you share the full code ( with dynamic for loop info for increasing each time )

i am trying login page to get data from excel file username and password each time for 10 users

Hi Prakasam,

Sorry for my late response. . .

Based on my understanding, I can say that your case is quite simple, because there was no other information about it. . . Why don’t you just bind your test data in the test suite? By doing it you don’t have to hard code your case. The data binding will do the iteration for your test. You can only use ExcelFactory approach if you have multiple sheets in your test data.

Have a look into this links:

If that doesn’t answer your question, please provide a more information.

Hope that helps. . . :slight_smile:

Hi Amal ,

below was my script , i am using local data … so could you please add for loop for below code

import static com.kms.katalon.core.checkpoint.CheckpointFactory.findCheckpoint
import static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase
import static com.kms.katalon.core.testdata.TestDataFactory.findTestData
import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject
import com.kms.katalon.core.checkpoint.Checkpoint as Checkpoint
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as Mobile
import com.kms.katalon.core.model.FailureHandling as FailureHandling
import com.kms.katalon.core.testcase.TestCase as TestCase
import com.kms.katalon.core.testdata.TestData as TestData
import com.kms.katalon.core.testobject.TestObject as TestObject
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
import internal.GlobalVariable as GlobalVariable

WebUI.openBrowser(‘’)

WebUI.navigateToUrl(‘Gmail’)

WebUI.setText(findTestObject(‘Object Repository/Login_data/input_Continue to Gmail_identifier’), findTestData(‘login_data/data’).getValue(
1, 1))

WebUI.click(findTestObject(‘Object Repository/Login_data/span_Next’))

WebUI.setEncryptedText(findTestObject(‘Login_data/input_Too many failed attempts_password’), findTestData(‘login_data/data’).getValue(
1, 2))

WebUI.click(findTestObject(‘Object Repository/Login_data/span_Next’))

WebUI.click(findTestObject(‘Object Repository/Login_data/span_Send feedback_gb_Ba gbii’))

WebUI.click(findTestObject(‘Object Repository/Login_data/a_Sign out’))data

Refer to links I sent. . .

i have done binding … but it was doing each time for one value only …

yes it was simple code . i just created this to check the loo condition … i am new for loop condition … that why i requested sample code for loop statement in katalon program

You have to use variables


how does one get the iteration ID or rather the rowcount during runtime as katalon iterates through my spreadsheet? I tried using a loop and getRowNumbers(), but when I do that it just keeps reading the first row only of my test data (no longer iterates)

Hello guys,
can i have some help ?
I have import an excel with user emails and passwords.
When i run the test alone it stops on the email input and does not move on.
When i run the whole test suite, the same issue appears again.
Any ideas?

I found in the screenshot you are using WebUI.setEncryptedText(). Are you sure? Why not you use WebUI.setText()

1 Like

@kazurayam You are right!!
It worked… thanks a lot!