how to get data from site to excel sheet

Please help me to solve this. I have to save user names into excel sheet after logged in to the account. I have tried several ways but unable to get the values into excel.Let me know the code that how to store values into excel from the site .

WebUI.openBrowser(’’)

WebUI.maximizeWindow()

WebUI.navigateToUrl(’’)

WebUI.click(findTestObject(‘login/a_’))

not_run: WebUI.click(findTestObject(‘login/li’))

not_run: WebUI.click(findTestObject(‘login/div_id(katalon-elementInfoDiv)’))

WebUI.waitForPageLoad(60)

WebUI.click(findTestObject(‘login/login’))

WebUI.setText(findTestObject(‘login/input_Email’), email)

WebUI.setText(findTestObject(‘login/input_Password’), password)

WebUI.click(findTestObject(‘login/input’))

WebUI.waitForPageLoad(60)
if (WebUI.verifyElementPresent(findTestObject(‘login/span_’), 30))
{

here i have to get login user name into excel
}

else
{
this.println(‘login failed’)
}
WebUI.takeScreenshot()

WebUI.closeBrowser()

1 Like