Jquery Xpath Selectors

Hello. I deal with a web page that contains subframes i.e. frameset doctyped document. When I use below code

$('/html/frameset')

it works accurately but for the topmost window. Now I need to work in subframe scope and use xpath selectors. I tried

$(window.parent.frames[1].document) 

to reach subframe document but dont know how to use xpath selectors with jquery for that frame document.

$(window.parent.frames[1].document).find('/html/body/p')

Abıve code didnt work , by the way. How can I solve this problem?

Thanks in advance.

$ is not a native method of ecmascript, try looking at a reference for the framework you’re using.

Maybe you’re not including jquery in the frame document, so it doesn’t know what “document.find” is?

Hello. Sorry for late reply. I have found that xpath expressions can be only used as selector with basic xpath plugin installed.