Remember last session and data file driven loop

falling in love with katalon. I have created my first project need to know how could I get the following done

1.I need to execute a for loop statement from from fnsku
2.I don’t want to login every time want the pc to remember the last session. Since this is a amazon website it needs two step verification

WebUI.setText(findTestObject(‘Page_Quick Inbound/input_Scan or type SKU_itemId’), fnsku)

my 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

import org.openqa.selenium.Keys as Keys

import java.awt.Robot as Robot

import java.awt.event.KeyEvent as KeyEvent

WebUI.openBrowser(‘’)

WebUI.navigateToUrl(‘https://www.amazon.in/ap/signin?openid.return\_to=https%3A%2F%2Fsellerflex.amazon.in%2F&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier\_select&openid.assoc\_handle=amzn\_waas\_in&openid.mode=checkid\_setup&marketPlaceId=A21TJRUUN4KGV&openid.claimed\_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier\_select&pageId=Amazon&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.pape.max\_auth\_age=3600&siteState=clientContext%3D258-7043128-4510908%2CsourceUrl%3Dhttps%253A%252F%252Fsellerflex.amazon.in%252F%2Csignature%3Dnull’)

WebUI.setText(findTestObject(‘Page_Amazon Sign In/input_Email or mobile phone nu’), ‘abc@example.com’)

WebUI.setEncryptedText(findTestObject(‘Page_Amazon Sign In/input_Forgot Password_password’), ‘abc’)

WebUI.click(findTestObject(‘Page_Amazon Sign In/input_Enter your password_reme’))

WebUI.click(findTestObject(‘Page_Amazon Sign In/input_Enter your password_sign’))

WebUI.click(findTestObject(‘Page_Two-Step Verification/a_Didnt receive the code’))

WebUI.click(findTestObject(‘Page_Two-Step Verification/span_Text me at my number endi’))

WebUI.click(findTestObject(‘Page_Two-Step Verification/input_Call me at my number end’))

WebUI.setText(findTestObject(‘Page_Two-Step Verification/input_Enter code_otpCode’), ‘000000’)

WebUI.click(findTestObject(‘Page_Two-Step Verification/span_Dont ask for codes on thi’))

WebUI.click(findTestObject(‘Page_Two-Step Verification/input_Dont ask for codes on th’))

WebUI.switchToWindowIndex(1)

WebUI.click(findTestObject(‘Object Repository/Page_Orders/i_Orders_was-inventory-icon’))

WebUI.click(findTestObject(‘Object Repository/Page_Orders/i_Load More_was-receive-and-st’))

WebUI.setText(findTestObject(‘Page_Quick Inbound/input_Scan or Search Shipment’), ‘4DK4837U’)

Robot rb = new Robot()

rb.keyPress(KeyEvent.VK_ENTER)

WebUI.delay(1)

rb.keyRelease(KeyEvent.VK_ENTER)

WebUI.delay(2)

WebUI.setText(findTestObject(‘Page_Quick Inbound/input_Scan or type SKU_itemId’), fnsku)

rb.keyPress(KeyEvent.VK_ENTER)

WebUI.delay(1)

rb.keyRelease(KeyEvent.VK_ENTER)

WebUI.delay(2)

WebUI.setText(findTestObject(‘Page_Quick Inbound/input_Bad_quantity’), quantity)

rb.keyPress(KeyEvent.VK_ENTER)

WebUI.delay(1)

rb.keyRelease(KeyEvent.VK_ENTER)

WebUI.delay(2)

WebUI.setText(findTestObject(‘Page_Quick Inbound/input_(You can select bin from’), bin)

rb.keyPress(KeyEvent.VK_ENTER)

WebUI.delay(1)

rb.keyRelease(KeyEvent.VK_ENTER)

WebUI.delay(2)

WebUI.click(findTestObject(‘Page_Quick Inbound/button_RECEIVE STORE’))

I tried watching multiple videos and trying differnt things for last two days. All I could understand is I need to put this lines in my code but it did not work

def data = TestDataFactory(‘Ship Plan Data’) – ship plan data is test data. should I give path

for (def index : (0…data.getRowNumbers() - 1)) {
WebUI.setText(findTestObject(‘Page_Quick Inbound/input_Scan or type SKU_itemId’), fnsku)
.
.

}

Anyhelp would make my day awesome.