Today I am stuck up with a new task where I need to access a url.
The url redirects me to a webpage where I have two input boxes and a submit button.
After inputting values I need to click on submit then I get a text string on the webpage.I need to capture that for my task.
Have gone through invoke-uri but got few errors in it.Any solution with simple example can help me out..
Am new to powershell automation. I was trying to use the following code for my task
PS C:\> $ie = new-object -com "InternetExplorer.Application"
PS C:\> $ie.navigate("http://servername/somelocation/Default.aspx")
PS C:\> $ie.visible = $true
PS C:\> $doc = $ie.document
PS C:\> $tb1 = $doc.getElementByID("TextBox1") ##Here i got error as below
Cannot find an overload for "getElementById" and the argument count: "1".
At line:1 char:27
+ $tb1 = $doc.getElementByID <<<< ("Textbox1")
+ CategoryInfo : NotSpecified: (:) , MethodException
+ FullyQualifiedErrorId : MethodCountCouldNotFindBest
Keep in mind you may receive an array of elements with the same name Textbox1 so handle as array to start.. Single row array logic the same as many row array logic, but not the same at all as single string logic.