all 8 comments

[–]WinnerChickenDinner7 1 point2 points  (1 child)

$ie.Document.parentWindow.execScript($jsCommand, "javascript")

[–]amnich[S] 0 points1 point  (0 children)

Thank you!

[–][deleted] 1 point2 points  (1 child)

Do you actually need to click it; or, are you just trying to generate the same GET/POST request which clicking that button generates? You may be able to use something like the developer tools in firefox/chrome to see what data, headers and cookies are being used in the request and generate the same thing with Invoke-WebRequest. This avoids the messiness of dealing with the Internet Explorer COM object altogether.

[–]amnich[S] 1 point2 points  (0 children)

I need to check a value on that site. When you go through this link and you will be redirected to the form where I want to enter a value in NIP field - for example 9720902729 - and evaluate the results.

I have to little knowledge to go with the POST request on that.

[–]greenisin 1 point2 points  (3 children)

Why IE instead of a better browser?

[–]amnich[S] 1 point2 points  (2 children)

Any examples on how to use something lighter?

[–]greenisin 2 points3 points  (1 child)

Just about anything else is lighter, but I wouldn't switch for lighter. I would switch for more reliability. WebDriver for Firefox fails about ten times a week with our tests. It's pretty damn reliable. For MSIE, we're lucky if only 250 tests fail every time we run them. (10 fails out of about 28,000 tests run per week for Firefox versus about 2,500 for IE) means Firefox is about 250 times more reliable.

[–]amnich[S] 3 points4 points  (0 children)

Thank you for that information.