Hello!!
first at all, Sorry for my bad inglish, im Brazillian.
So… I need create a automated script that creates an IE object and handles the elements in web page…
$ie = new-object -ComObject “InternetExplorer.Application”
My problem is: I can create that object in all other pages, i can get elements by Id, Tag, Class, etc … but, in determined page i can’t. Looks like the object after addressing the page “$ie.navigate($page)”, that is null or empty.
give me an error:
PS C: \ Users \ thalys> $ ie.Document | get-Member
get-Member: You must specify an object for the Get-Member cmdlet.
In the line: 1 character: 16
+ $ ie.Document | get-Member
+ ~~~~~~~~~~
+ CategoryInfo: CloseError: (:) [Get-Member], InvalidOperationException
+ FullyQualifiedErrorId: NoObjectInGetMember, Microsoft.PowerShell.Commands.GetMemberCommand
PS C: \ Users \ thalys> $ ie.Document.getElementById ("abrirModalLogin"). Click
You cannot call a method on a null value expression.
In line: 1 character: 1
+ $ ie.Document.getElementById ("abrirModalLogin"). click
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~
+ CategoryInfo: InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId: InvokeMethodOnNull
if need know what that page, ask me.