Forum Discussion
powershell script to go to web site
We have to check Yes or No on the website but I thought it would be a great opportunity to automate it with powershell but I am having problem trying to understand how to get it to automatically click on the element. Here is what I have so far.
#<button class="btn no" id="noInit" type="button">No</button>
$ie = New-Object -ComObject 'internetExplorer.Application'
$ie.Visible= $true
$ie.ParsedHtml
$ie.Navigate("https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flnks.gd%2Fl%2FeyJhbGciOiJIUzI1NiJ9.eyJidWxsZXRpbl9saW5rX2lkIjoxMDEsInVyaSI6ImJwMjpjbGljayIsImJ1bGxldGluX2lkIjoiMjAyMTA1MTEuNDAyNjU1NjEiLCJ1cmwiOiJodHRwczovL3d3dy5mYWEuZ292L2Nvcm9uYXZpcnVzL3dlbGxuZXNzX2NoZWNrLyJ9.e4fctVtbkCtZ1yDQ2f2ZIyUCLgx3KceG4A0AIuiZTPk%2Fs%2F770634691%2Fbr%2F106182191351-l&data=04%7C01%7Csasha.tabib%40lstechllc.com%7Cb2bcd86b5a174ff6488108d914916338%7C93bb738069e94c7ca5fbfd30a5f59cc9%7C0%7C0%7C637563436952056800%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=0KULfdRzubnmWAdCqW94wE4%2F7fFTyuXSwNsCBSTGfkY%3D&reserved=0")
$document = $ie.Document