I would like to acces on my neteller account by Invoke-WebRequest .
I have found the fields to be filled
<input type="password" name="password" id="form-login-password" maxlength="32" placeholder="Password" autocomplete="off" pattern=".*" required="" value="Welcome 123">
I have tried this code things .
$content=Get-Content "$home\Downloads\test log\NETELLER » Signin.html"
$qw=Invoke-WebRequest https://member.neteller.com -Method Post -Body $content -SessionVariable test
with password and loggin inside of the file but same issue.
I would like to get the page after the login is done .
Moving from the comment section to be more specific for the OP.
As for your comments...
How can i get the button event and how to use it ?
I have found this
input type="submit" name="btn-login" class="button radius" value="Sign in" id="btn-login"
There are several ways, but again, the site, the way it is coded, actually prevents some automation actions. So, my point is, it appears that they do not want folks using automation at / on their site.
Clicking buttons, links and the like, require the browser UI be visible. You seem to be wanting to do this non-visible, but I could be wrong.
All things considered, there are a few ways to get to click. Totally dependent on the site designers and what they made available to act on. Here are a few examples from sites, I've had to deal with, single and multi-page/form sites, that allowed automation.
# Starting here...
$ie.Document.getElementsByName('commit').Item().Click();
# Or
$ie.document.IHTMLDocument3_getElementsByTagName("button") |
ForEach-Object { $_.Click() }
# Or
($ie.Document.IHTMLDocument3_getElementsByTagName('button') |
Where-Object innerText -eq 'SIGN IN').Click()
# Or
($ie.document.getElementById('submitButton') |
select -first 1).click()
# Or ...
$Link=$ie.Document.getElementsByTagName("input") |
where-object {$_.type -eq "button"}
$Link.click()
# Or ...
$Submit = $ie.document.getElementsByTagName('INPUT') |
Where-Object {$($_.Value) -match 'Zaloguj'}
$Submit.click()
# Or
$ie.Document.getElementById("next").Click()
# Or
$SubmitButton=$Doc.IHTMLDocument3_getElementById('button') |
Where-Object {$_.class -eq 'btn btn-primary'}
$SubmitButton.Click()
# Or
Invoke-WebRequest ("https://portal.concordfax.com/Account/LogOn" +
$R.ParsedHtml.getElementsByClassName("blueButton login").click
Here is a full example of what I mean.
$url = 'https://pwpush.com'
($FormElements = Invoke-WebRequest -Uri $url -SessionVariable fe)
($Form = $FormElements.Forms[0]) | Format-List -Force
$Form | Get-Member
$Form.Fields
$IE = New-Object -ComObject "InternetExplorer.Application"
$FormElementsequestURI = "https://pwpush.com"
$Password = "password_payload"
$SubmitButton = "submit"
$IE.Visible = $true
$IE.Silent = $true
$IE.Navigate($FormElementsequestURI)
While ($IE.Busy) {
Start-Sleep -Milliseconds 100
}
$Doc = $IE.Document
$Doc.getElementsByTagName("input") | ForEach-Object {
if ($_.id -ne $null){
if ($_.id.contains($SubmitButton)) {$SubmitButton = $_}
if ($_.id.contains($Password)) {$Password = $_}
}
}
$Password.value = "1234"
$SubmitButton.click()