本文介绍了使用 powershell 单击超链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用 powershell 单击 aspx 网络表单中的超链接.我怎样才能做到这一点?该链接还显示了一个下拉菜单,我必须从该链接中选择正确的选项.

I need to click on a hyperlink in a aspx webform using powershell. How can I achieve this?Also that link shows a drop down menu and I have to select the right option from that link.

推荐答案

$ie = new-object -com internetexplorer.application
$ie.visible=$true
$ie.navigate('http://www.somewhere.com')
while($ie.busy) {sleep 1}
$link = $ie.Document.getElementsByTagName('A') | where-object {$_.innerText -eq 'Click here'}
$link.click()

这篇关于使用 powershell 单击超链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 09:22
查看更多