2nd automation data driven test run encountered span element is not clickable at point X,Y

[Katalon Studio 9.4.5 - Automation Test Log|attachment](upload://oIxakjW2a7L9zX11Y17pmdy748.5 - Automa) (6.3 KB)
[Katalon Studio 9.4.5 - Script|attachment](upload://flwnh4KmntBDEoR64kQgqAHsU8Z.5 - Script) (5.8 KB)
screen layout
eTravel_TestData.xlsx (9.6 KB)

Hi Katalon team, currently am using version 9.4.5 running data driven automation testing. 1st row of data in the test data went through successfully but when comes to 2nd row, the dropdown item not clickable. May I seek your kind expertise on how to handle this error. Thank you team.

1 Like

Hi there,

Thank you very much for your topic. Please note that it may take a little while before a member of our community or from Katalon team responds to you.

Thanks!

Hi,

When you try to click the element, do you receive any error log?

Hi, the web recorder automation run attempt to click on it the dropdown item and encountered error. If manually click, no issue. Please find below the error log.


**=============== ROOT CAUSE =====================
Caused by: org.openqa.selenium.ElementClickInterceptedException: element click intercepted: Element <span _ngcontent-ng-c3900254635="" class="col-8 dtlText">...</span> is not clickable at point (605, 308). Other element would receive the click: <div id="cdk-overlay-7" class="cdk-overlay-pane" style="width: 331.562px; top: 295.345px; left: 343.819px;">...</div>

For trouble shooting, please visit: https://docs.katalon.com/katalon-studio/docs/troubleshooting.html
================================================

05-30-2024 10:39:23 pm Test Cases/DataDrivenTest eTravel

Elapsed time: 2m - 2.848s

Test Cases/DataDrivenTest eTravel FAILED.
Reason:
com.kms.katalon.core.exception.StepFailedException: Unable to click on object 'Object Repository/DataDrivenTest eTravel/Page_Company/mat-option_AY000011 - AY000011-FULL_NAME - Copy'
	at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:64)
	at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:26)
	at com.kms.katalon.core.webui.keyword.builtin.ClickKeyword.click(ClickKeyword.groovy:74)
	at com.kms.katalon.core.webui.keyword.builtin.ClickKeyword.execute(ClickKeyword.groovy:40)
	at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:74)
	at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.click(WebUiBuiltInKeywords.groovy:647)
	at DataDrivenTest eTravel.run(DataDrivenTest eTravel:48)
	at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
	at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
	at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:448)
	at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:439)
	at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:418)
	at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:410)
	at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:285)
	at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:137)
	at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:128)
	at TempTestCase1717079958652.run(TempTestCase1717079958652.groovy:25)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Caused by: org.openqa.selenium.ElementClickInterceptedException: element click intercepted: Element <span _ngcontent-ng-c3900254635="" class="col-8 dtlText">...</span> is not clickable at point (605, 308). Other element would receive the click: <div id="cdk-overlay-7" class="cdk-overlay-pane" style="width: 331.562px; top: 295.345px; left: 343.819px;">...</div>
  (Session info: chrome=125.0.6422.113)
Build info: version: '3.141.59', revision: 'unknown', time: 'unknown'
System info: host: 'hostname', ip: 'xx.xx.xxx.xxx', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '17.0.7'
Driver info: com.kms.katalon.selenium.driver.CChromeDriver
Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 125.0.6422.113, chrome: {chromedriverVersion: 125.0.6422.60 (3ac3319bff9f..., userDataDir: C:\WINDOWS\SystemTemp\scope...}, fedcm:accounts: true, goog:chromeOptions: {debuggerAddress: localhost:64060}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: WINDOWS, platformName: WINDOWS, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:extension:minPinLength: true, webauthn:extension:prf: true, webauthn:virtualAuthenticators: true}
Session ID: 82ba927e5ab5666f9bae951e91f33995
	at jdk.internal.reflect.GeneratedConstructorAccessor35.newInstance(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187)
	at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122)
	at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49)
	at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
	at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
	at com.kms.katalon.selenium.driver.CChromeDriver.execute(CChromeDriver.java:19)
	at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:285)
	at org.openqa.selenium.remote.RemoteWebElement.click(RemoteWebElement.java:84)
	at jdk.internal.reflect.GeneratedMethodAccessor12.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringWebElement.lambda$new$0(EventFiringWebDriver.java:404)
	at jdk.proxy2/jdk.proxy2.$Proxy24.click(Unknown Source)
	at org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringWebElement.click(EventFiringWebDriver.java:417)
	at org.openqa.selenium.WebElement$click.call(Unknown Source)
	at com.kms.katalon.core.webui.keyword.builtin.ClickKeyword.clickUntilSuccessWithTimeout(ClickKeyword.groovy:81)
	at com.kms.katalon.core.webui.keyword.builtin.ClickKeyword.clickUntilSuccessWithTimeout(ClickKeyword.groovy)
	at jdk.internal.reflect.GeneratedMethodAccessor16.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at com.kms.katalon.core.webui.keyword.builtin.ClickKeyword$_click_closure1.doCall(ClickKeyword.groovy:67)
	at com.kms.katalon.core.webui.keyword.builtin.ClickKeyword$_click_closure1.call(ClickKeyword.groovy)
	at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:20)
	... 18 more
**
  1. Use Explicit Waits.
  2. Scroll the Element into View.

This is my test case script.

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 static com.kms.katalon.core.testobject.ObjectRepository.findWindowsObject
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.testng.keyword.TestNGBuiltinKeywords as TestNGKW
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 com.kms.katalon.core.windows.keyword.WindowsBuiltinKeywords as Windows
import internal.GlobalVariable as GlobalVariable
import org.openqa.selenium.Keys as Keys

WebUI.openBrowser('')

WebUI.navigateToUrl(https://abc/login')

WebUI.setText(findTestObject('Object Repository/DataDrivenTest eTravel/Page_Company/input_User Name_username'), 
    'abc@abc.com')

WebUI.setEncryptedText(findTestObject('Object Repository/DataDrivenTest eTravel/Page_Company/input_Password_password'), 
    'XHGUD38hmPndqa32/tI6yr==')

WebUI.click(findTestObject('Object Repository/DataDrivenTest eTravel/Page_Company/button_SIGN IN'))

WebUI.click(findTestObject('Object Repository/DataDrivenTest eTravel/Page_Company/button_Proceed'), 
    FailureHandling.OPTIONAL)

for (def rowNum = 1; rowNum <= findTestData('etRAVEL_TestData').getRowNumbers(); rowNum++) {
    WebUI.waitForElementClickable(findTestObject('DataDrivenTest eTravel/Page_Company/a_PRODUCTS'), 
        5)

    WebUI.mouseOver(findTestObject('Object Repository/DataDrivenTest eTravel/Page_Company/a_PRODUCTS'))

    WebUI.mouseOver(findTestObject('Object Repository/DataDrivenTest eTravel/Page_Company/a_Create New Quote'))

    WebUI.enhancedClick(findTestObject('Object Repository/DataDrivenTest eTravel/Page_Company/a_Create New Quote'))

    WebUI.setText(findTestObject('DataDrivenTest eTravel/Page_Company/input_Intermediary Name_mat-input-10 - Copy'), 
        findTestData('eTravel_TestData').getValue(1, rowNum))

    WebUI.click(findTestObject('DataDrivenTest eTravel/Page_Company/mat-option_AY000011 - AY000011-FULL_NAME - Copy'), 
        FailureHandling.STOP_ON_FAILURE)

    WebUI.enhancedClick(findTestObject('DataDrivenTest eTravel/Page_Company/span_CREATE NEW'))

    WebUI.click(findTestObject('DataDrivenTest eTravel/Page_Company/input_Destination_mat-input-12 - Copy'))

    WebUI.click(findTestObject('DataDrivenTest eTravel/Page_Company/mat-option_Zone A_1 - Copy'))

    WebUI.click(findTestObject('Object Repository/DataDrivenTest eTravel/Page_Company/button_Annual'))

    WebUI.click(findTestObject('DataDrivenTest eTravel/Page_Company/input_Group_next - 1'))

    WebUI.click(findTestObject('Object Repository/DataDrivenTest eTravel/Page_Company/span_SGD 100.00'))

    WebUI.click(findTestObject('DataDrivenTest eTravel/Page_Company/input_Group_next - 2'))

    WebUI.setText(findTestObject('Object Repository/DataDrivenTest eTravel/Page_Company/input_NRICFIN Number_finNo'), 
        findTestData('eTravel_TestData').getValue(2, rowNum))

    WebUI.setText(findTestObject('Object Repository/DataDrivenTest eTravel/Page_Company/input_Given Name_givenName'), 
        findTestData('eTravel_TestData').getValue(3, rowNum))

    WebUI.setText(findTestObject('Object Repository/DataDrivenTest eTravel/Page_Company/input_Family Name_familyName'), 
        findTestData('eTravel_TestData').getValue(4, rowNum))

    WebUI.setText(findTestObject('Object Repository/DataDrivenTest eTravel/Page_Company/input_Date of Birth_mat-input-15'), 
        findTestData('eTravel_TestData').getValue(5, rowNum))

    WebUI.click(findTestObject('Object Repository/DataDrivenTest eTravel/Page_Company/button_MALE_1'))

    WebUI.setText(findTestObject('Object Repository/DataDrivenTest eTravel/Page_Company/input_Postal Code_postalCode'), 
        findTestData('eTravel_TestData').getValue(6, rowNum))

    WebUI.setText(findTestObject('Object Repository/DataDrivenTest eTravel/Page_Company/input_Phone Number_phoneNo'), 
        findTestData('eTravel_TestData').getValue(7, rowNum))

    WebUI.setText(findTestObject('Object Repository/DataDrivenTest eTravel/Page_Company/input_Email_email'), 
        findTestData('eTravel_TestData').getValue(8, rowNum))

    WebUI.click(findTestObject('DataDrivenTest eTravel/Page_Company/input_Group_next - 3'))

    WebUI.click(findTestObject('Object Repository/DataDrivenTest eTravel/Page_Company/label_I accept the Terms and Conditions sta_fef253'))

    WebUI.click(findTestObject('DataDrivenTest eTravel/Page_Company/input_Group_next - 4'))

    WebUI.click(findTestObject('DataDrivenTest eTravel/Page_Company/input_Group_next - 5'))

    WebUI.click(findTestObject('Object Repository/DataDrivenTest eTravel/Page_Company/button_OK'))

    WebUI.click(findTestObject('Object Repository/DataDrivenTest eTravel/Page_Company/button_View Quotation'))

    WebUI.waitForPageLoad(5, FailureHandling.STOP_ON_FAILURE)
}

WebUI.mouseOver(findTestObject('Object Repository/DataDrivenTest eTravel/Page_Company/svg_FAQ_svg-inline--fa fa-user'))

WebUI.mouseOver(findTestObject('Object Repository/DataDrivenTest eTravel/Page_Company/button_Logout'))

WebUI.click(findTestObject('Object Repository/DataDrivenTest eTravel/Page_Company/button_Logout'))

WebUI.closeBrowser()

I see you have at least inserted a couple of “wait” statements, although, like @dineshh, I think you should have more; between changing pages and elements appearing on the page. Since you are only recording, what you won’t have are any “verify” statements. Instead of “click” on an element, you can use “verifyElementClickable” or “verifyElementVisible” to check that an element exists.

If you are actually trying to click on a checkbox, or radio button, then you can verify that your click statement worked, with “verifyElementChecked”. After you enter text to a textbox, you can ensure the text was entered with “verifyElementAttributeValue”. Yes these wait and verify statements slow your test down by fractions of seconds, but you get a more stable test run overall. Often, your test script(s) goes so much faster than your browser and that is when you (can) get into errors.

Also, another of @dineshh’s issues was to “scroll the element into view”. After your login page, do all of your elements exist within the viewport together? If some of your elements are not in the viewport, the script may move to the element so it will become visible but you would be better off if you controlled the viewport with “scrollToElement” or “scrollToPosition”. These statements are not inserted within a recording script.

As an example:

WebUI.openBrowser('')

WebUI.navigateToUrl('https://abc/login')

WebUI.waitForPageLoad(10)

WebUI.waitForElementVisible(findTestObject('Object Repository/DataDrivenTest eTravel/Page_Company/input_User Name_username'), 10)
WebUI.setText(findTestObject('Object Repository/DataDrivenTest eTravel/Page_Company/input_User Name_username'), 'abc@abc.com')
WebUI.verifyElementAttributeValue(findTestObject('Object Repository/DataDrivenTest eTravel/Page_Company/input_User Name_username'), 'value', 'abc@abc.com', 10)

WebUI.verifyElementVisible(findTestObject('Object Repository/DataDrivenTest eTravel/Page_Company/input_Password_password'))
WebUI.setEncryptedText(findTestObject('Object Repository/DataDrivenTest eTravel/Page_Company/input_Password_password'), 
    'XHGUD38hmPndqa32/tI6yr==')
1 Like

Thank you @dineshh and @grylion54 for your reply and advice. I will modify the scripts then try run automation again and will update the post here on the status outcome.

2 Likes

Hi there @emlearn, :wave:

Just checking in to see if you have tried out the proposed workaround from the other members in this thread yet and whether they worked out for you.

As we are also running our Ask Katalon Anything activity this month, feel free to share your question with our Product Support team in the thread below :point_down:

1 Like

Hi @albert.vu and team,
Sincerely apologize for late response. Was held up with other urgent work. Am actually new with AUT and novice to coding, has been trying to search for samples in forum but having difficulty matching to my test case. As of now still stuck as same object. I have prepared the following screens, hopefully is easy for team to understand and able to assist. Thank you :pray:

1 Like
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 static com.kms.katalon.core.testobject.ObjectRepository.findWindowsObject
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.testng.keyword.TestNGBuiltinKeywords as TestNGKW
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 com.kms.katalon.core.windows.keyword.WindowsBuiltinKeywords as Windows
import internal.GlobalVariable as GlobalVariable
import org.openqa.selenium.Keys as Keys
import org.openqa.selenium.JavascriptExecutor as JavascriptExecutor
import org.openqa.selenium.WebDriver as WebDriver
import org.openqa.selenium.WebElement as WebElement
import com.kms.katalon.core.webui.driver.DriverFactory as DriverFactory

public static void scrollToObject(String FULL_NAME) {
	WebDriver driver = DriverFactory.getWebDriver()
	WebElement intermediaryName = driver.findElement(xpath('//span[contains(text(),"' + FULL_NAME +'"'))
	((JavascriptExecutor) driver).executeScript("arguments[0].scrollIntoView(true);", intermediaryName)
	Object topOffset = ((JavascriptExecutor) driver).executeScript("return window.pageYOffset")
	((JavascriptExecutor) driver).executeScript("window.scroll(0, " + ((int)topOffset-30) + ");")
}

WebUI.openBrowser('')

WebUI.maximizeWindow()

WebUI.navigateToUrl('https://ljsiej.sss')

WebUI.waitForPageLoad(5, FailureHandling.STOP_ON_FAILURE)

WebUI.waitForElementClickable(findTestObject('DataDrivenTest eTravel/Page_Company/input_User Name_username'), 
    5)

WebUI.setText(findTestObject('Object Repository/DataDrivenTest eTravel/Page_Company/input_User Name_username'), 
    'sdfjlsafjabc@htweknvabc.fhwuekfcom')

WebUI.waitForElementClickable(findTestObject('DataDrivenTest eTravel/Page_Company/input_Password_password'), 
    5)

WebUI.setEncryptedText(findTestObject('Object Repository/DataDrivenTest eTravel/Page_Company/input_Password_password'), 
    'XHGUD38hmPaf;djfi3wlefss;wdwsndqa32/tI6yr==')

WebUI.waitForElementClickable(findTestObject('DataDrivenTest eTravel/Page_Company/button_SIGN IN'), 
    5)

WebUI.click(findTestObject('Object Repository/DataDrivenTest eTravel/Page_Company/button_SIGN IN'))

WebUI.waitForElementClickable(findTestObject('DataDrivenTest eTravel/Page_Company/button_Proceed'), 
    5)

WebUI.click(findTestObject('Object Repository/DataDrivenTest eTravel/Page_Company/button_Proceed'), 
    FailureHandling.OPTIONAL)

//Below for section, some of the objects fetch data from excel file and loop until all rows in the file has been completed successfully

for (def rowNum = 1; rowNum <= findTestData('etRAVEL_TestData').getRowNumbers(); rowNum++) {

	WebUI.waitForElementClickable(findTestObject('DataDrivenTest eTravel/Page_Company/a_PRODUCTS'), 
        5)

    WebUI.mouseOver(findTestObject('Object Repository/DataDrivenTest eTravel/Page_Company/a_PRODUCTS'))

    WebUI.mouseOver(findTestObject('Object Repository/DataDrivenTest eTravel/Page_Company/a_Create New Quote'))

    WebUI.waitForElementClickable(findTestObject('Object Repository/DataDrivenTest eTravel/Page_Company/a_Create New Quote'), 
        5)

    WebUI.enhancedClick(findTestObject('DataDrivenTest eTravel/Page_Company/a_Create New Quote'))

    WebUI.waitForElementPresent(findTestObject('DataDrivenTest eTravel/Page_Company/input_Intermediary Name_mat-input-10 - Copy'), 
        5)

    WebUI.setText(findTestObject('DataDrivenTest eTravel/Page_Company/input_Intermediary Name_mat-input-10 - Copy'), 
        findTestData('eTravel_TestData').getValue(1, rowNum))
	
    WebUI.waitForElementClickable(findTestObject('DataDrivenTest eTravel/Page_Company/mat-option_AY000011 - AY000011-FULL_NAME - Copy'), 
        5)

    WebUI.scrollToElement(findTestObject('DataDrivenTest eTravel/Page_Company/mat-option_AY000011 - AY000011-FULL_NAME - Copy'), 
        5)

    WebUI.enhancedClick(findTestObject('DataDrivenTest eTravel/Page_Company/mat-option_AY000011 - AY000011-FULL_NAME - Copy'), 
        FailureHandling.STOP_ON_FAILURE)

    WebUI.waitForElementClickable(findTestObject('DataDrivenTest eTravel/Page_Company/span_CREATE NEW - Copy'), 
        5)

    WebUI.click(findTestObject('DataDrivenTest eTravel/Page_Company/span_CREATE NEW - Copy'))

    WebUI.waitForElementClickable(findTestObject('DataDrivenTest eTravel/Page_Company/input_Destination_mat-input-12 - Copy'), 
        5)

    WebUI.click(findTestObject('DataDrivenTest eTravel/Page_Company/input_Destination_mat-input-12 - Copy'))

    WebUI.waitForElementClickable(findTestObject('DataDrivenTest eTravel/Page_Company/mat-option_Zone A_1 - Copy'), 
        5)

    WebUI.click(findTestObject('DataDrivenTest eTravel/Page_Company/mat-option_Zone A_1 - Copy'))

    WebUI.waitForElementClickable(findTestObject('DataDrivenTest eTravel/Page_Company/button_Annual'), 
        5)

    WebUI.click(findTestObject('DataDrivenTest eTravel/Page_Company/button_Annual'))

    WebUI.waitForElementClickable(findTestObject('DataDrivenTest eTravel/Page_Company/input_Group_next - 1'), 
        5)

    WebUI.click(findTestObject('DataDrivenTest eTravel/Page_Company/input_Group_next - 1'))

    WebUI.waitForElementClickable(findTestObject('DataDrivenTest eTravel/Page_Company/span_SGD 170.00'), 
        5)

    WebUI.click(findTestObject('Object Repository/DataDrivenTest eTravel/Page_Company/span_SGD 170.00'))

    WebUI.waitForElementClickable(findTestObject('DataDrivenTest eTravel/Page_Company/input_Group_next - 2'), 
        5)

    WebUI.click(findTestObject('DataDrivenTest eTravel/Page_Company/input_Group_next - 2'))

    WebUI.waitForElementPresent(findTestObject('DataDrivenTest eTravel/Page_Company/input_NRICFIN Number_finNo'), 
        5)

    WebUI.setText(findTestObject('Object Repository/DataDrivenTest eTravel/Page_Company/input_NRICFIN Number_finNo'), 
        findTestData('eTravel_TestData').getValue(2, rowNum))

    WebUI.waitForElementPresent(findTestObject('DataDrivenTest eTravel/Page_Company/input_Given Name_givenName'), 
        5)

    WebUI.setText(findTestObject('Object Repository/DataDrivenTest eTravel/Page_Company/input_Given Name_givenName'), 
        findTestData('eTravel_TestData').getValue(3, rowNum))

    WebUI.waitForElementPresent(findTestObject('DataDrivenTest eTravel/Page_Company/input_Family Name_familyName'), 
        5)

    WebUI.setText(findTestObject('Object Repository/DataDrivenTest eTravel/Page_Company/input_Family Name_familyName'), 
        findTestData('eTravel_TestData').getValue(4, rowNum))

    WebUI.waitForElementPresent(findTestObject('DataDrivenTest eTravel/Page_Company/input_Date of Birth_mat-input-15'), 
        5)

    WebUI.setText(findTestObject('Object Repository/DataDrivenTest eTravel/Page_Company/input_Date of Birth_mat-input-15'), 
        findTestData('eTravel_TestData').getValue(5, rowNum))

    WebUI.waitForElementClickable(findTestObject('DataDrivenTest eTravel/Page_Company/button_MALE_1'), 
        5)

    WebUI.click(findTestObject('Object Repository/DataDrivenTest eTravel/Page_Company/button_MALE_1'))

    WebUI.waitForElementPresent(findTestObject('DataDrivenTest eTravel/Page_Company/input_Postal Code_postalCode'), 
        5)

    WebUI.setText(findTestObject('Object Repository/DataDrivenTest eTravel/Page_Company/input_Postal Code_postalCode'), 
        findTestData('eTravel_TestData').getValue(6, rowNum))

    WebUI.waitForElementPresent(findTestObject('DataDrivenTest eTravel/Page_Company/input_Phone Number_phoneNo'), 
        5)

    WebUI.setText(findTestObject('Object Repository/DataDrivenTest eTravel/Page_Company/input_Phone Number_phoneNo'), 
        findTestData('eTravel_TestData').getValue(7, rowNum))

    WebUI.waitForElementPresent(findTestObject('DataDrivenTest eTravel/Page_Company/input_Email_email'), 
        5)

    WebUI.setText(findTestObject('Object Repository/DataDrivenTest eTravel/Page_Company/input_Email_email'), 
        findTestData('eTravel_TestData').getValue(8, rowNum))

    WebUI.waitForElementClickable(findTestObject('DataDrivenTest eTravel/Page_Company/input_Group_next - 3'), 
        5)

    WebUI.click(findTestObject('DataDrivenTest eTravel/Page_Company/input_Group_next - 3'))

    WebUI.waitForElementClickable(findTestObject('DataDrivenTest eTravel/Page_Company/label_I accept the Terms and Conditions sta_fef253'), 
        5)

    WebUI.click(findTestObject('Object Repository/DataDrivenTest eTravel/Page_Company/label_I accept the Terms and Conditions sta_fef253'))

    WebUI.waitForElementClickable(findTestObject('DataDrivenTest eTravel/Page_Company/input_Group_next - 4'), 
        5)

    WebUI.click(findTestObject('DataDrivenTest eTravel/Page_Company/input_Group_next - 4'))

    WebUI.waitForElementClickable(findTestObject('DataDrivenTest eTravel/Page_Company/input_Group_next - 5'), 
        5)

    WebUI.click(findTestObject('DataDrivenTest eTravel/Page_Company/input_Group_next - 5'))

    WebUI.waitForElementClickable(findTestObject('DataDrivenTest eTravel/Page_Company/button_OK'), 
        5)

    WebUI.click(findTestObject('Object Repository/DataDrivenTest eTravel/Page_Company/button_OK'))

    WebUI.waitForElementClickable(findTestObject('DataDrivenTest eTravel/Page_Company/button_View Quotation'), 
        5)

    WebUI.click(findTestObject('Object Repository/DataDrivenTest eTravel/Page_Company/button_View Quotation'))

    WebUI.waitForPageLoad(5, FailureHandling.STOP_ON_FAILURE)

	}

WebUI.mouseOver(findTestObject('Object Repository/v/svg_FAQ_svg-inline--fa fa-user'))

WebUI.mouseOver(findTestObject('Object Repository/DataDrivenTest eTravel/Page_Company/button_Logout'))

WebUI.click(findTestObject('Object Repository/DataDrivenTest eTravel/Page_Company/button_Logout'))

WebUI.closeBrowser()

May I seek advice on how to use WebUI.verifyElementAttributeValue on object fetching value from excel test data. Also, if it is okay to request for some sample scripts on how to use ‘viewport’, ‘scrollToElement’, and ‘scrollToPosition’ based on my test case? Or if there are any other better ways of handling the issue, I am open to your expertise suggestions. Thank you so very much.

1 Like

So you have entered text from your Excel sheet into your “input-10 Copy” field and now you want to ensure it is entered the same as what you have in the spreadsheet. What you can do is test to see what is in the field to what you have in the spreadsheet. Copy the contents of the “setText” field into the verifyElementAttributeValue statement, or you can compare to Excel another way such as below:

WebUI.setText(findTestObject('DataDrivenTest - CREATE QUOTE eTravel 1/Page_Great American Insurance Company/input_Intermediary Name_mat-input-10 - Copy'), 
        findTestData('eTravel_TestData').getValue(1, rowNum))
// compare data matches to Excel
WebUI.verifyMatch(
    WebUI.getAttribute(findTestObject('DataDrivenTest - CREATE QUOTE eTravel 1/Page_Great American Insurance Company/input_Intermediary Name_mat-input-10 - Copy'), "value"),
    findTestData('eTravel_TestData').getValue(1, rowNum), false)
// or
WebUI.verifyElementAttributeValue(findTestObject('DataDrivenTest - CREATE QUOTE eTravel 1/Page_Great American Insurance Company/input_Intermediary Name_mat-input-10 - Copy'), "value", findTestData('eTravel_TestData').getValue(1, rowNum), 10)

I sometimes throw a “click” statement (onto a label or other text box) in between the “setText” and “verify” statement to allow the field to format properly if needed, such as for a dollar field or date field.