0
を使用してリンクをサイト上でのJavaのリンクをクリックすることができませんが、そのフレームのメニューバー内のフレームは、彼らのさであり、そのメニューバー5ボタンである彼らの例: -サイトを開いた後のPowerShell
検索( eは下線付きで、下向きの矢印も検索付き)とWindow(Wは下向き矢印でウィンドウも下線付き)検索をクリックします。
href,id
を使ってみましたが、検索をクリックすることはできませんでした。
$Url = “some site”
$Username=”xxx”
$Password=”xxx”
$IE = New-Object -com internetexplorer.application;
$IE.visible = $true;
$IE.navigate($url);
while ($IE.Busy -eq $true)
{
Start-Sleep -Milliseconds 2000;
}
$IE.Document.getElementById(“USERNAME”).value = $Username
$IE.Document.getElementByID(“PIN”).value=$Password
$IE.Document.getElementById(“HardcodedSub”).Click()
while($ie.busy) {sleep 5}
$Link = $ie.Document.getElementsByTagName("a") | where-object {$_.id -eq 'menu_2'}
$Link.click()
error:-You cannot call a method on a null-valued expression.
At line:25 char:1
+ $Link.click()
+ ~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
inspect element:-
<a id="menu_2" tabindex="2" class="menu_unselected_text" href="javascript:window.parent.role_main.cai_main.setActKeyMenuState(2)">S<u>e</u>arch<img border="0" src="/CAisd/img/arrow_asc_bk.png" width="15" height="10"></a>