-
Recently Browsing 0 members
No registered users viewing this page.
-
Similar Content
-
By Sachs
I have a few questions:
BACKGROUND
I am using Oracle Application Testing Suite's OpenScript 13 (Eclipse IDE), Oracle Java 6, and AutoIt.
My goal is to access a given Internet Explorer browser window (`$ieTitle`), send the keystroke of "shift-control-s" for "Save As" functionality to be invoked, so that I can download a (PDF) file to a given location ($fileName).
The code within the script `DownloadPdfFile.au3` is
$ieTitle = $CmdLine[1] $ieControl = "AVL_AVView31" $fileName = $CmdLine[2] ControlFocus($ieTitle, "", $ieControl) ControlSend($ieTitle, "", $ieControl, "+^s") ; Save as dialog $winTitle = "Save As" ; wait for Save As window WinWait($winTitle) ; activate Save As window If Not WinActive($winTitle) Then WinActivate($winTitle) ControlFocus($winTitle,"","Edit1") ControlSetText($winTitle,"","Edit1",$fileName) Sleep(2000) ControlClick($winTitle,"","Button3") Exit 0 So I compiled it with SciTE-Lite (32-bit Version 4.4.6 , creating `DownloadPdfFile.exe`, and so within my Java code, I have
String command = autoItExePath + " " + scriptPath + " \"" + winTitle + "\" " + directoryPath.toFile().toString() + "\\Form9Report" + sdf_ddmmmyyyy.format(new Date()) + ".pdf"; try { Process process = Runtime.getRuntime().exec(command); process.waitFor(); } catch (Exception e) { logger.error("Exception " + e.getMessage(), e); } The output would be like `C:\Program Files (x86)\AutoIt3\AutoIt3.exe C:\...\AutoItScripts\DownloadPdfFile.au3 "https://****.com/****.exe?temp_id=**** - Internet Explorer" C:\...\Report05Apr2022.pdf"` which does run without the $cmdLine successfully.
When executed by Java, I see in the taskbar an icon, which I right-click has "[Check] Script Paused" and "Exit".
Questions:
(1) How do I unpause the script?
(2) How do I avoid having the script paused?
Any help is appreciated.
-
By Steviep
Hi all,
I've been using the following code for many years for the sole purpose of tracking my app usage via Google Analytics:
;GOOGLE ANALYTICS $AppStatsName = @ScriptName $GA = _IECreate("https://mywebserver/apps/stats/" & $AppStatsName & ".html", 0, 0, 0, 0) The app simply calls a blank .html page on my webserver which only contains the GA tracking code.
The $iVisible parameter is set to "0" in my case, which means the IE browser is invisible to the user.
I noticed in Windows 11, the URL is called in the Edge browser and is not invisible.
So, I wonder if anyone out there has any suggestions on calling a URL invisibly on any operating system?
Thanks!
-
By izmegna
I am trying to auto login to web app that has the following HTML for the username, password and submit button:
USERNAME:
<input name="usernameField" tabindex="0" class="inp" id="usernameField" type="text" value="" message="FND_SSO_USER_NAME">
Password:
<input name="passwordField" tabindex="0" class="inp" id="passwordField" type="password" value="" message="FND_SSO_PASSWORD">
Login:
<button tabindex="0" class="OraButton left" style="padding-right: 6px; padding-left: 6px;" onclick="submitCredentials()" message="FND_SSO_LOGIN">Log In</button>
Following is the AutoIT script I am using I am passing the username and password via cmd but it is not working, any suggestion?
#include <IE.au3>
Local $url ="https://www.Intra.edwa.com"
Local $oIE =_IECreate($url)
_IELoadWait($oIE)
Local $oUser =_IEGetObjById($oIE,"usernameField")
Local $oPass =_IEGetObjById($oIE,"passwordField")
_IEFormElementSetValue($oUser, $CmdLine[1])
_IEFormElementSetValue($oPass, $CmdLine[2])
_IELoadWait($oIE)
$oLinks = _IETagNameGetCollection($oIE, "input")
For $oLink In $oLinks
If String($oLink.type) = "submit" And String($oLink.value) = "Sign In" Then
_IEAction($oLink, "click")
ExitLoop
EndIf
Next
-
By Ascer
Hello,
I would like to ask if there is an GUI function that allow create control like this?
-
By XGamerGuide
I'm trying to assign a faint text in the background to an input field that disappears after the input has started. This should have a certain color such as gray.
-
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now