Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to click any widget onclick of a button in page.

Pankaj kr
Kilo Sage

Hi,

 

I have a requirement to open chatbot on click of a button and when I am trying to use document.getElementByID.click() it is giving me an error saying: Cannot read properties of null (reading 'click')

 

 

 

 

Thanks,

 

Pankaj Kumar

1 REPLY 1

Martin iTSM
Tera Guru

Hey there,

maybe just missing the brackets?
document.getElementByID
().click();

Cheers!

Martin