Xpath error while entering email addres in Compose email at GMAIL.
Test Cases/Login/Login FAILED because (of) Unable to set text ‘bw847@aol.com’ of object ‘Object Repository/ComposeEmail/ToTxtBox’ (Root cause: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: ‘Object Repository/ComposeEmail/ToTxtBox’ located by 'By.xpath: ’ not found)
Test Cases/Login/Login.run:49
XPATH using for TO email address:-//textarea[@id=‘:8p’]
Here is 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.checkpoint.CheckpointFactory as CheckpointFactory
import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as MobileBuiltInKeywords
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.testcase.TestCaseFactory as TestCaseFactory
import com.kms.katalon.core.testdata.TestData as TestData
import com.kms.katalon.core.testdata.TestDataFactory as TestDataFactory
import com.kms.katalon.core.testobject.ObjectRepository as ObjectRepository
import com.kms.katalon.core.testobject.TestObject as TestObject
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WSBuiltInKeywords
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUiBuiltInKeywords
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
import internal.GlobalVariable as GlobalVariable
import org.openqa.selenium.Keys as Keys
WebUI.openBrowser(‘’)
WebUI.navigateToUrl(‘Gmail’)
WebUI.maximizeWindow()
WebUI.sendKeys(findTestObject(‘LoginPage/InputEmail’), findTestData(‘excel/InputGmail’).getValue(1, 1))
WebUI.waitForElementClickable(findTestObject(‘LoginPage/NextBtn’), 4)
WebUI.click(findTestObject(‘LoginPage/NextBtn’))
WebUI.delay(5, FailureHandling.CONTINUE_ON_FAILURE)
WebUI.sendKeys(findTestObject(‘LoginPage/Page_Gmail/input_password’), findTestData(‘excel/InputGmail’).getValue(2, 1))
WebUI.waitForElementClickable(findTestObject(‘LoginPage/NextBtnAfterPwd’), 4)
WebUI.click(findTestObject(‘LoginPage/NextBtnAfterPwd’))
WebUI.delay(14, FailureHandling.CONTINUE_ON_FAILURE)
WebUI.click(findTestObject(‘ComposeEmail/Page_Inbox - margaretthomas2566gmai/div_COMPOSE’))
WebUI.delay(18, FailureHandling.CONTINUE_ON_FAILURE)
WebUI.setText(findTestObject(‘ComposeEmail/ToTxtBox’), findTestData(‘excel/ProspectsEmail’).getValue(1, 1))