vendredi 29 mars 2019

How to acess javascript-based dialog window in web page with Windows Powershell?

I'm accessing an old web page, poorly scripted, with poorly identified elements. Until now, I could access all objects it gave me. But now, I'm stucked.

When I click this button, it opens a JavaScript dialog, in which the user must insert some values. And I just click at it. But when the window opens, I just can't focus at it.

This is the code that creates it:

<INPUT onclick="javascript: openCosts(document.forms[0], 'COMPANY');" 
title="Include values" 
style="BORDER-LEFT-WIDTH: 1px; CURSOR: hand; FONT-SIZE: 11px; FONT-FAMILY: Tahoma; BORDER-RIGHT-WIDTH: 1px; 
BORDER-TOP-COLOR: #007041; BORDER-BOTTOM-WIDTH: 1px; BORDER-LEFT-COLOR: #007041; FONT-WEIGHT: bold; 
COLOR: #fff; PADDING-BOTTOM: 1px; BORDER-BOTTOM-COLOR: #007041; PADDING-TOP: 1px; PADDING-LEFT: 3px; 
BORDER-RIGHT-COLOR: #007041; PADDING-RIGHT: 3px; BORDER-TOP-WIDTH: 1px; BACKGROUND-COLOR: #0080ff" 
type=button value="Costs - SAP" name=btn_show_costs></INPUT>

I tried to send TABS and ENTERS; tried to get all open IExplorer open windows -- $shell = New-Object -ComObject Shell.Application and Get-Process | Where-Object ... doesn't work.

Can somebody help me??

Thank you in advance!




Aucun commentaire:

Enregistrer un commentaire