|
5#
楼主 |
发表于 2009-3-4 11:07:18
|
只看该作者
应该是解决了。。讲下我的思路:
首先,选中Display a notification about every script error 此项,已经知道其index为 8 ,print出其所有属性
Print Browser("Browser").Dialog("Internet Options").WinTreeView("Settings:").GetItemProperty(8,"selected")
Print Browser("Browser").Dialog("Internet Options").WinTreeView("Settings:").GetItemProperty(8,"state")
Print Browser("Browser").Dialog("Internet Options").WinTreeView("Settings:").GetItemProperty(8,"expanded")
Print Browser("Browser").Dialog("Internet Options").WinTreeView("Settings:").GetItemProperty(8,"firstchild")
Print Browser("Browser").Dialog("Internet Options").WinTreeView("Settings:").GetItemProperty(8,"haschildren")
Print Browser("Browser").Dialog("Internet Options").WinTreeView("Settings:").GetItemProperty(8,"imageindex")
Print Browser("Browser").Dialog("Internet Options").WinTreeView("Settings:").GetItemProperty(8,"nextsibling")
Print Browser("Browser").Dialog("Internet Options").WinTreeView("Settings:").GetItemProperty(8,"overlayimage")
Print Browser("Browser").Dialog("Internet Options").WinTreeView("Settings:").GetItemProperty(8,"parent")
Print Browser("Browser").Dialog("Internet Options").WinTreeView("Settings:").GetItemProperty(8,"path")
Print Browser("Browser").Dialog("Internet Options").WinTreeView("Settings:").GetItemProperty(8,"selected")
Print Browser("Browser").Dialog("Internet Options").WinTreeView("Settings:").GetItemProperty(8,"state")
Print Browser("Browser").Dialog("Internet Options").WinTreeView("Settings:").GetItemProperty(8,"text")
然后将其取消选中"Display a notification about every script error",再print一遍,可以得出imageindex这个属性前后不一样,选中的时候imageindex为0,未选中为1,则:
If Browser("Browser").Dialog("Internet Options").WinTreeView("Settings:").GetItemProperty("Browsing;Display a notification about every script error","imageindex") = 1 Then
Browser("Browser").Dialog("Internet Options").WinTreeView("Settings:").Select "Browsing;Display a notification about every script error"
End If
If Browser("Browser").Dialog("Internet Options").WinTreeView("Settings:").GetItemProperty("Browsing;Disable script debugging","imageindex") = 1 Then
Browser("Browser").Dialog("Internet Options").WinTreeView("Settings:").Select "Browsing;Disable script debugging"
End If
可以达到目标。。 |
|