-2

I have a gif image on my webpage that looks as below :

enter image description here

The html code generated is shown below :

enter image description here

How do i write a script in javascript that trigger click on home or help or signoff page? Please help

EDIT :

I am very new to JavaScript and this website was developed by client developers. I am trying to automate the business process using Robotic Process Automation tool called UiPath.

One of the feature in UiPath is injecting JavaScript on a webpage which can be used to fill in the User-forms and navigate to different screen.

vDs1
  • 156
  • 1
  • 2
  • 10
  • are you using jQuery? – Rohit Agrawal Dec 14 '17 at 12:00
  • 1
    href tag is there,it will navigate you there if you click. If you want you can use onclick to call a javascript function – Durga Dec 14 '17 at 12:01
  • Could you provide generated HTML, rather than image? And, out of curiosity, why map for links? And, shouldn't this work without javascript, too? – sinisake Dec 14 '17 at 12:01
  • use `$("area[alt='home']").click()` if you are using jQuery – Rohit Agrawal Dec 14 '17 at 12:05
  • 1
    Possible duplicate of [can i have an onclick event on a imagemap area element](https://stackoverflow.com/questions/29921696/can-i-have-an-onclick-event-on-a-imagemap-area-element) – RQman Dec 14 '17 at 12:05
  • -1 Please provide code that you have produced to show that you have had an attempt so that we can help you on where to go from there. This isn't a tutorial website. Also JavaScript and Java are not the same – Emobe Dec 14 '17 at 12:10

1 Answers1

0

You can use the querySelectorAll function of javascript.

document.querySelectorAll('area[alt="Home"]').click = function(){
   window.location.href = "your path";
}

Same you can apply for other also.

Code Lღver
  • 15,573
  • 16
  • 56
  • 75