Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Need Help in getting XPath expression for span inside an Iframe popup

Need to get an xpath expression for the span inside the iframe. Need Help in getting XPath expression for span inside an Iframe popup.

i can get the iframe but getting /html/body inside iframe is not happening any help would be appreciated

<div class="gwt-PopupPanelGlass" style="position: absolute; left: 0px; top: 0px; visibility: visible; display: block; width: 1680px; height: 222px;"></div>
<div class="gwt-PopupPanel" style="left: 439px; top: 0px; visibility: visible; position: absolute; overflow: visible;">
<div class="popupContent">
<div class="ph-PopupDialog" style="position: relative; width: 800px; height: 220px;">
<div style="position: absolute; z-index: -32767; top: -20ex; width: 10em; height: 10ex;">&nbsp;</div>
<div style="position: absolute; overflow: hidden; left: 0px; top: 0px; right: 0px; bottom: 0px;">
<div style="position: absolute; left: 0px; top: 0px; right: 0px; bottom: 0px;">
<div style="position: absolute; z-index: -32767; top: -20ex; width: 10em; height: 10ex;">&nbsp;</div>
<div style="position: absolute; overflow: hidden; left: 0px; top: 0px; right: 0px; height: 32px;">
<div style="position: absolute; overflow: hidden; left: 0px; top: 32px; right: 0px; bottom: 0px;">
<div class="ph-PopupDialog-content" style="position: absolute; left: 0px; top: 0px; right: 0px; bottom: 0px;">
<div style="position: absolute; z-index: -32767; top: -20ex; width: 10em; height: 10ex;">&nbsp;</div>
<div style="position: absolute; overflow: hidden; left: 5px; top: 5px; right: 5px; bottom: 5px;">
<div style="position: absolute; left: 0px; top: 0px; right: 0px; bottom: 0px;">
<div>
<iframe class="gwt-Frame ph-PaymentFrame" name="paymentFrame" src="javascript:''">
<html>
<head>
<body onload="pageLoaded();">
<div class="ph-View">
<div class="container_24 form-grid">
<div class="container_24 form-grid">
<div class="container_24 form-grid">
<div class="container_24 form-grid">
<div class="container_24 form-grid">
<div class="grid_12">
<div class="ph-ButtonPanel ph-ButtonPanel-undecorated">
<a class="ph-Button ph-Button-button" onclick="submit();return false;" style="float: right; margin-left: 5px;" href="#">
<a class="ph-Button ph-Button-button" onclick="cancel();return false;" style="float: right; margin-left: 5px;" href="#">
<span>Cancel</span>
</a>
</div>
</div>
</div>
</div>
</body>

`

like image 591
Maalamaal Avatar asked Oct 27 '11 23:10

Maalamaal


People also ask

Can I get element inside iframe?

contents() can get both text nodes and HTML elements. That's why one can get document contents of an iframe by using it. Note that the iframe and page have to be on the same domain.

How do I use iframe tags?

Definition and UsageThe <iframe> tag specifies an inline frame. An inline frame is used to embed another document within the current HTML document. Tip: Use CSS to style the <iframe> (see example below). Tip: It is a good practice to always include a title attribute for the <iframe> .


1 Answers

Elements in iframe are in fact in another page. so you should first find address of that page which is value of src value of iframe and load it and then access the element in that page.

like image 60
meebee Avatar answered Sep 21 '22 14:09

meebee