【发布时间】:2012-04-02 16:16:21
【问题描述】:
有没有办法在iFrame 中读取body 的style 属性?
我尝试过使用Body、NativeElement、Frame 和其他Properties 的多种组合,但到目前为止我没有运气。
<iframe id="iFrame" width="100%" height="500" frameborder="0" src="some source">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body style="margin: 0px; padding: 0px;height:500px;">
</body>
</html>
</iframe>
例子:
_browser.Frame(Find.ById(frameId)).Body.GetAttributeValue("style")
【问题讨论】:
-
你试过了吗:_browser.Frame(Find.ById(frameId)).Body.Style;
标签: c# attributes frame watin