# Unable to Click on Salesforce Lightning Web element

**URL:** <https://forum.katalon.com/t/unable-to-click-on-salesforce-lightning-web-element/52452>\
**Category:** Web Testing\
**Tags:** katalon-studio\
**Created:** [February 24, 2021, 8:51pm UTC](https://forum.katalon.com/t/unable-to-click-on-salesforce-lightning-web-element/52452 "2021-02-24T20:51:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rahanuma.progga1](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/rahanuma.progga1/32/16104_2.png) [@rahanuma.progga1](https://forum.katalon.com/u/rahanuma.progga1)\
**Post date:** [February 24, 2021, 8:51pm UTC](https://forum.katalon.com/t/unable-to-click-on-salesforce-lightning-web-element/52452/1 "2021-02-24T20:51:16Z")

</div>

Hi,

I have this test for Salesforce Lightning Test-

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.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://uat.lightning.force.com](https://uat.lightning.force.com)%252Flightning%252Fpage%252Fhome’)

WebUI.setText(findTestObject(‘Object Repository/Delta Credit/Page\_Login Salesforce/input\_Username\_username’), ‘rahanuma.progga@consultant.kkr.com’)

WebUI.setEncryptedText(findTestObject(‘Object Repository/Delta Credit/Page\_Login Salesforce/input\_Password\_pw’), ‘1LocSWEqcFbw7wd9q1G7sg==’)

WebUI.click(findTestObject(‘Object Repository/Delta Credit/Page\_Login Salesforce/input\_Password\_Login’))

WebUI.delay(30)

WebUI.waitForElementVisible(findTestObject(‘Object repository/Delta Credit/Page\_HomeSalesforce/span\_Relationships’), 30)

WebUI.delay(30)

WebUI.click(findTestObject(‘Object repository/Delta Credit/Page\_HomeSalesforce/span\_Relationships’))

But I’m getting this error - Caused by: java.lang.IllegalArgumentException: Object is null

Here I’m trying to click on the span\_Relationships element but in Test it’s actually throwing this error just after it launched the Homepage.

Looking forward for help.

Thanks,  
Raha

---

<div class="post-metadata">

**Author:** ![grylion54](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/grylion54/32/16265_2.png) [@grylion54](https://forum.katalon.com/u/grylion54)\
**Post date:** [February 24, 2021, 10:06pm UTC](https://forum.katalon.com/t/unable-to-click-on-salesforce-lightning-web-element/52452/2 "2021-02-24T22:06:00Z")

</div>

How about taking a look at the **xpath** that you have to the span\_Relationships element? It seems that the path is not valid and therefore you get a null.

Another thing is to fix the URL (if it looks like you have copied above):  
`WebUI.navigateToUrl('https://uat.lightning.force.com/lightning/page/home')`

Actually, you may have to **double** slash every single slash so it looks like:  
`WebUI.navigateToUrl('https:///uat.lightning.force.com//lightning//page//home')`

And you may opt for hitting CTRL + SHIFT + o to lessen the mismatch of import statements you have–Mobile, Web Services and Web.
