I tried to upload a file to a sharepoint library, my code fails to properly detect if ie is still waiting for an ajax response or not. What is the proper way to do this ?
ok here is how I've done : the trick was to look each iframes, select the one with the correct location
for($i=0;$i -lt $ie.Document.frames.length;$i++){
if( $ie.Document.frames.item($i).location.href -match 'upload.aspx' ){ $frm=$ie.Document.frames.item($i)}
}
then wait for my input to show
while( ($frm.document.body.getElementsbytagname("input") |?{$_.type -eq 'file'}) -eq $null){
echo "waiting ..."
start-sleep -milliseconds 100
}