depends on how your script will read excel?
read again with another sheet name as parameter
you have to implement keyword where the sheet name is used as parameter
@Keyword
public List<String> readExcelRows(int start, int end, String path, sheetName) throws IOException, InvalidFormatException{
SAMPLE_XLSX_FILE_PATH = path;
workbook = WorkbookFactory.create(new File(SAMPLE_XLSX_FILE_PATH));
// Getting the Sheet as sheetName
Sheet sheet = workbook.getSheet(sheetName);
I was using findTestData( ) and getValue( ) methods from katalon studio API.
below is snippet:
WebUI.setText(findTestObject('Object Repository/Page_Login Salesforce/input_Username_username'), findTestData('Automation Test Data').getValue(
'UserName', 1))
WebUI.setEncryptedText(findTestObject('Object Repository/Page_Login Salesforce/input_Password_pw'), findTestData('Automation Test Data').getValue(
'Password', 1))
If I have to use them and also read the data from another sheet, Do i need to create a custom getValue( ) method with sheet as parameter? OR does katalon studio API has a predefined method to perform this task.
There’s no native API in katalon to help read values from different sheets. However, there’s a Read Write Excel Custom Keyword Plugin that may interest you.
`I am not using Katalon excel plugin, I have implemented own excel read / write keywords to my use, with this way i’ll get just that how I will use the excel functions
Hi Thanh.
I have read the excel file in a specific location.I have a code for that.
Still my excel file name varies always.
But it starts with constant number followed by varying characters.
eg “01123_bfkjenfkennkn.xlx”
number 01123 is constant always.
Pls help me how to refer this excel in my code.