I have a worksite that I am trying to "browse".
Done it with this...
$login = Invoke-WebRequest -Uri 'http://www.privateworksite.com' -SessionVariable GetIP
$form = $login.Forms[0]
$Form.Fields['ctl00$ContentPlaceHolder1$RadTextBox7']= "*******" <-- User ID goes here
$Form.Fields['ctl00$ContentPlaceHolder1$RadButton1'] = "submit" <-- Submit button
$afterfirstclick Invoke-WebRequest -Uri 'http://www.privateworksite.com' -WebSession $GetIP -Method POST -Body $form.Fields
Now that I am at the page I need to click on a new button that appears. I have tried to add a -sessionvariable $afterfirstclick but I get the dreaded PS Red lines stating that you cannot have -WebSession and -SessionVariable together.
ADDED INFO: So how do I click on the button that is produced in $afterfirstclick? This is what I have for a button after the first click return.
ctl00$ContentPlaceHolder1$RadGrid1$ctl00$ctl04$GECBtnExpandColumn <-- a new button to create
a drop down table with the info I need. The table is not there prior to the
clicking the button so I need to click this button.
I have been all over and ever demo/post is about logging in to a site but after that how do you move around the site?
I have tried to feed $afterfirstclick into the -WebSession, bust... Also tried to repeat the whole thing with the next Field to click the button and that just results in a new site not the "continuation" of the current.
Where to go from here?
Oh and the URL never changes so I cannot submit VIA URL.