0

i want to access a dom element through CSS Path inside the iframe. following is the direct CSS Path:

var dompath = "html body div div div div div div div ul li a:contains('Parks')";

$(dompath).click(); 

the above line is working fine if i am opening the page without iframe.

I want to open the same page inside the iframe and want to trigger click on the above element from outside the iframe. i have tried in this way, but its not working.

            $('#scaled_frame').contents().(domPath).click();        

how can i perform the click action from outside.

Best Regards,

user2674341
  • 277
  • 2
  • 6
  • 15

1 Answers1

0

Try this: $('#scaled_frame').contents().find(domPath).click();

Refilon
  • 3,334
  • 1
  • 27
  • 51