java.lang.IllegalArgumentException: Object is null

//*[@id=‘footerDivissue’] [not(contains(@style,‘display’))]//button[@id=‘save’]

the above xapth is working fine in chrome elements inspect but in katalon studio throwing Illegal argument Exception. Could you please help on this.

Hi @lramadass ,

Please make sure that this is not the dynamic element which will differ every time loading. You can refer to this thread (not focus on the uploadFileWithDragAndDrop but the approaches).

Thank you!

1 Like

So, in what context are you using the xpath. By itself, it would just be a commented line, so are you trying to use it like,

myItem = CustomKeywords.'com.Tools.newTestObject'('//*[@id="footerDivissue"] [not(contains(@style,"display"))]//button[@id="save"]')

or is it the xpath of an element in the Object Repository or something else?

While I’m on it, since id are supposed to be unique, why are you moving from one unique id to another unique id? Why not just have?

id("save")