When attempting to set a value in the
<input type="file" name="file007">
element using QTP, I encountered an issue. The element is located within an iframe
, making it inaccessible through xpath on the page.
<iframe id="file_007" src="javascript:''" style="position:absolute;width:0;height:0;border:0">
#document
<html>
<head>
</head>
<body>
<form action="/file/upload" method="POST" target="_self" enctype="multipart/form-data">
<input name="files" type="text">
<input type="hidden" name="name1" value="1">
<input type="hidden" name="name2" value="2">
<input type="hidden" name="name3" value="3">
<input type="hidden" name="name4" value="4">
<input type="hidden" name="name5" value="5">
<input type="hidden" name="name6" value="6">
<input type="hidden" name="name7" value="false">
<input type="file" name="file007">
</form>
</body>
</html>
</iframe>
Although I was able to locate the iframe using //iframe[contains(@id, 'File')]
, the elements within the #documents
section remain invisible.
If anyone can provide guidance on how to access this particular element on the page, it would be greatly appreciated. Thank you