Я успешно использую свой сценарий на приведенном ниже сценарии powershell для автоматического входа на сайт xyz.com через IE, но некоторые функции не работают должным образом, тогда как Firefox отлично выполняет ту же работу.следовательно, нужна помощь для преобразования того же скрипта для выполнения той же работы в браузере Firefox с использованием powershell.
$ie = New-Object -ComObject 'internetExplorer.Application'
$ie.Visible= $true # Make it visible
$username="username"
$password="password"
$Tenant="abcdefgh"
$ie.Navigate("htt:/xyz.com/login") ## website is taken as example
While ($ie.Busy -eq $true) {Start-Sleep -Seconds 3;}
$usernamefield = $ie.document.getElementByID('txtudsr')
$usernamefield.value = "$username"
$passwordfield = $ie.document.getElementByID('txtpswd')
$passwordfield.value = "$password"
$Tenantfield = $ie.document.getElementByID('txttfenant')
$Tenantfield.value = "$Tenant"
$Link = $ie.document.getElementByID('btn_login')
$Link.click()
While ($ie.Busy -eq $true) {Start-Sleep -Seconds 30;}
$Link = $ie.document.getElementByID('btn_Continue')
$Link.click()
While ($ie.Busy -eq $true) {Start-Sleep -Seconds 10;}
$Link = $ie.document.getElementByID('statusUnAvailable')
$Link.click()
$ie.Quit()