-
Posts
313 -
Joined
-
Last visited
Content Type
Forums
Downloads
Forum Articles
Events
Everything posted by System Tester
-
Thanks trancexx! As a tester, I just need to report the connection condition, This is not only an indicator of the software operation, but also whether it's been installed & configured correctly. So in my simple (and it really is!) universe, all I want to do is read the text of the IE dialogue File>>Properties. JLogan3o13 mentioned there was an "easy" way to capture this info, but didn't mention what it was. 184525-internet-explorer-properties Thanks again!
-
Hi @Danyfirex. Many thanks for the reply, Unfortunately, as a tester I find developer-speak a bit of a nightmare! All I'm trying to get is a single line of text describing the connection state. I can get it displayed on the screen using File>>Properties in Internet explorer, I just can't get AutoIT to capture it! I'll have my developer take a look, but your answer is over my head! Cheers Pete
-
@trancexx Hi, can you please give me a healthy shove in the right direction? I'm a Systems Tester, automating testing of web based applications. As part of the output I log as much as I can concerning the system-under-test. This code is for example. #include <_sql.au3> FileOpen("Server Versions.txt") Local $ServerAddress = "xx.xx.xx.xx" Local $ServerUserName = "name" Local $ServerPassword = "PWPWPW" Local $DatabaseName = "DbName" ;names changed to protect the innocent. func SQLConnect() _SQL_RegisterErrorHandler();register the error handler to prevent hard crash on COM error $OADODB = _SQL_Startup() If $OADODB = $SQL_ERROR Then MsgBox(0 + 16 + 262144, "Error", _SQL_GetErrMsg()) If _sql_Connect(-1, $ServerAddress, $DatabaseName, $ServerUserName, $ServerPassword) = $SQL_ERROR Then MsgBox(0 + 16 + 262144, "Error 1", _SQL_GetErrMsg()) _SQL_Close() Exit EndIf EndFunc Func _NETFramework4_Win8() Local $sRegKey, $iKey, $sHold, $sNETRegKey $sRegKey = "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Dependencies\" $iKey = 1 While 1 $sHold = RegEnumKey($sRegKey, $iKey) If @error Then ExitLoop $iKey += 1 If RegRead($sRegKey & $sHold, "DisplayName") = 'Microsoft .NET Framework 4.5 Multi-Targeting Pack' Then $sNETRegKey = RegRead($sRegKey & $sHold, "Version") If Not @error Then ExitLoop EndIf EndIf WEnd ;MsgBox(4096, "Result", "Microsoft .NET Framework 4.5.2" & @CRLF & "version: " & $sNETRegKey) FileWrite("Server Versions.txt","Microsoft .NET Framework "& @CRLF & $sNETRegKey & @CRLF & @CRLF) EndFunc Local $SQLVersion SQLConnect() _SQL_QuerySingleRow (-1,"select @@VERSION", $SQLVersion) ;MsgBox(4096, "Result", "SQL Version" & @CRLF & "version: " & $SQLversion[0]) FileWrite("Server Versions.txt","SQL Version "& @CRLF & $SQLversion[0] & @CRLF & @CRLF) $IEVersion = FileGetVersion(@ProgramFilesDir & "\Internet Explorer\iexplore.exe") ;MsgBox(4096, "Result", "Microsoft IE" & @CRLF & "version: " & $IEversion) FileWrite("Server Versions.txt","IE Version "& @CRLF & $IEversion & @CRLF & @CRLF) $version = @OSVersion ;MsgBox(4096, "Result", "Microsoft OS" & @CRLF & "version: " & $version) FileWrite("Server Versions.txt","Microsoft OS Version " & @CRLF & $version & @CRLF & @CRLF) $build = @OSBuild ;MsgBox(4096, "Result", "Microsoft OS Build" & @CRLF & "Build: " & $build) FileWrite("Server Versions.txt","Microsoft OS Build " & @CRLF & $build & @CRLF & @CRLF) $ComputerName = @ComputerName ;MsgBox(4096, "Result", "Computer Name" & @CRLF & $ComputerName) FileWrite("Server Versions.txt","Computer Name " & @CRLF & $ComputerName & @CRLF & @CRLF) $IPAddy = @IPAddress1 ;MsgBox(4096, "Result", "IP Address" & @CRLF & $IPAddy) FileWrite("Server Versions.txt","IP Address "& @CRLF & $IPAddy & @CRLF & @CRLF) if $version = 'WIN_81' Or $version = 'WIN_8' Or $version = 'WIN_2012' Or $version = 'WIN_2012R2' Then _NETFramework4_win8() EndIf I need to log the IE connection state, as recorded in the properties of the web page... Easy to display, impossible to capture! e.g. #include <IE.au3> #include <MsgBoxConstants.au3> Opt("WinDetectHiddenText", 1) Opt("TrayIconDebug",1) Local $oIE = _IECreate("bbc.co.uk") _IELoadWait($oIE) Sleep(2000) Send("!f") Sleep(500) Send("r") I'm expecting "TLS 1.2, AES with 256 bit encryption (High); DH with 1024 bit exchange" or whatever the page under test reports. Any assistance greatly appreciated! Pete
-
Internet explorer "properties"
System Tester replied to System Tester's topic in AutoIt General Help and Support
Hi, I need the connection string for my test results, e.g. "TLS 1.2, AES with 256 bit encryption (High); DH with 1024 bit exchange" Thanks! -
Gentlemen, Please help! I wish to open an IE session, browse to a page & inspect the properties. All this I can do! #include <IE.au3> Local $oIE = _IECreate("bbc.co.uk") _IELoadWait($oIE) Sleep(2000) Send("!f") Sleep(500) Send("r") Sleep(1000) What I can't do is use autoIt to extract the text to a file. What's failed so far... _IEPropertyGet - can't see which, if any option to use. WinGetText - returns the text of the buttons. ControlGetText - Returns blank. _IEDocRead - the text of the main HTLM page _IEAction - can't see which, if any option to use. Is this even Possible? Thanks Pete
-
Attempting to extract data from a table....
System Tester replied to System Tester's topic in AutoIt General Help and Support
OK! solved. "GetSelected" [, option]Returns a string containing the item index of selected items.So, to look at Column 4.. ControlListView("Correction","","SysListView321","SelectAll") $itemcount = ControlListView("Correction","","SysListView321","GetItemCount") $i=1 While $i < $itemcount MsgBox($MB_SYSTEMMODAL, $i, ControlListView("Correction","","SysListView321","GetText",$i,4)) $i=$i+1 WEnd -
Hi Guys, I'm a Noob trying to create test scripts using AutoIt. I want to read a 5x12 table Output from the Window info tool... >>>> Window <<<< Title: Correction Class: #32770 Position: 774, 182 Size: 1014, 646 Style: 0x94C000CC ExStyle: 0x00050101 Handle: 0x00000000002C06A8 >>>> Control <<<< Class: SysListView32 Instance: 1 ClassnameNN: SysListView321 Name: Advanced (Class): [CLASS:SysListView32; INSTANCE:1] ID: 1002 Text: List2 Position: 287, 240 Size: 687, 112 ControlClick Coords: 141, 54 Style: 0x50218001 ExStyle: 0x00000204 Handle: 0x000000000023020C >>>> Mouse <<<< Position: 1210, 511 Cursor ID: 0 Color: 0xFFFFFF >>>> StatusBar <<<< >>>> ToolsBar <<<< >>>> Visible Text <<<< &Modify &Clear &Quit R&efresh F&ilter Filter Type : PCD Filter Value : 888886 &1 Counting Correction C&urrent &Key-In Machine C&ount &Reject F1 Notes F2 Coin F3 Other F12 All F4 Number F5 Amount F6 Package 3 F7 Package 2 F8 Package 1 F9 Genuine Ro&ll Up List2 F10 False List4 Counterfei&t F11 Other List6 888886_000000000235_026_100715 Reference : Denomination Type Total : 20.00 Total : 0.00 Total : 0.00 Key-In Mode Total Display Counter Online Client : 1ST National Bank 15 0 0 0.00 0.00 20.00 >>>> Hidden Text <<<< &Search C&heques OK Cancel Help ---------------------------------- My code. ControlListView("Correction","","SysListView321","SelectAll") MsgBox($MB_SYSTEMMODAL, "", ControlListView("Correction","","SysListView321","GetSelected",1)) results in "0|1|2|3|4|5|6|7|8|9|10|11" being displayed ----------------------------------- What am I doing wrong?
-
Change SciTe character set
System Tester replied to System Tester's topic in AutoIt General Help and Support
Unfortunatly I've made no futher progress on this so any help would be appreciated! Cheers! -
Change SciTe character set
System Tester replied to System Tester's topic in AutoIt General Help and Support
Thanks Jos. I'm set to "code page property" I admit to being a total noob in all this! Can't get it to work though! -
Change SciTe character set
System Tester replied to System Tester's topic in AutoIt General Help and Support
and "character.set=186" I can now paste into the SciTE window & preserve the special characters, but ALT+0219 still gives me "?" when I want "U-bar" Grrrrr!!! (the help was from here.... http://wgl.typ.pl/help/enintro.htm#enc.cp) -
Change SciTe character set
System Tester replied to System Tester's topic in AutoIt General Help and Support
ok, I've changed "CODE.PAGE=0" to "CODE.PAGE=1257" in the Global.preperties file, & restarted the editor no joy. Any offers? -
Hi I'm currently working on a test project for the Baltic states, and I need to change the character set SciTe uses to ISO-8859-13 Can anyone tell me how please? I'm not a Developer, just a tester! Tks.
-
Want to SEND keyboard scan code
System Tester replied to System Tester's topic in AutoIt General Help and Support
No, I just need an AutoIT command to send a specific scan-code to the application. The app can be menu driven, mouse driven or keyboard driven. Obviously mouse and menu are easy, but this custom keyboard is proving to be a pain.... -
Hi Chaps I'm testing an application that uses a non-standard keyboard, and I need to send scan codes. Is there an easy way to do this? Thanks Pete
-
SQL (M$) help please!
System Tester replied to System Tester's topic in AutoIt General Help and Support
OK! Thanks to Chris I have what i'm after. it works. I don't pretend to understand it, but it works. (Monkey-see, monkey-do!) RESOLVED! -
SQL (M$) help please!
System Tester replied to System Tester's topic in AutoIt General Help and Support
Thanks. Made some progress. 1. in the SQL.AU3 include file, move the GLOBAL definition out of the function definitions, thus CODE Global $adCN ;<==Declare variable Func _SQLConnect($server, $db, $username, $password) $adCN = ObjCreate ("ADODB.Connection") ;<==Create SQL connection $adCN.Open ("DRIVER={SQL Server};SERVER=" & $server & ";DATABASE=" & $db & ";uid=" & $username & ";pwd=" & $password & ";") ;<==Connect with required credentials EndFunc Func _SQLClose () $adCN.Close ;==>Close the database EndFunc Func _SQLExecute( $query ) $adCN.Execute ( $query ) EndFunc 2. Edit the Select statement to remove the double quotes, replaceing with two-singlw quotes, thus _SQLExecute ( 'select OFFEREDDATETIME, callstatus from cid_t_VJcallinformation where offereddatetime > ''2007-09-11 00:00:01''') (OK, I had some help!) So now things run ok, but how do I get my data? where is it? -
Hi. AutoIt Version = 3.2.8.1 Have copied SQL.AU3 to the ...include directory. SQL.AU3 Topic Link - http://www.autoitscript.com/forum/index.ph...&hl=sql.au3 Attempting to run the following code.... CODE#include <sql.au3>_SQLConnect ( 'server_name', 'db_name', 'user', 'password' ) _SQLExecute ( 'select OFFEREDDATETIME, callstatus from cid_t_VJcallinformation where offereddatetime > "2007-09-11 00:00:01"') _SQLClose() Getting the following error..... CODE>"C:\Program Files\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:\Documents and Settings\petes\My Documents\sqltest.au3" /autoit3dir "C:\Program Files\AutoIt3" /UserParams +> Starting AutoIt3Wrapper v.1.7.3 >Running AU3Check (1.54.9.0) params: from:C:\Program Files\AutoIt3 C:\PROGRA~1\AutoIt3\Include\sql.au3(14,36) : WARNING: $adCN: possibly used before declaration. $adCN.Close ;==>Close the database ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\PROGRA~1\AutoIt3\Include\sql.au3(9,35) : WARNING: $adCN: declared global in function only. Prefer top of file. Global $adCN ;<==Declare variable ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\petes\My Documents\sqltest.au3 - 0 error(s), 2 warning(s) ->AU3Check ended.rc:1 >Running:(3.2.8.1):C:\Program Files\AutoIt3\autoit3.exe "C:\Documents and Settings\petes\My Documents\sqltest.au3" C:\PROGRA~1\AutoIt3\Include\sql.au3 (17) : ==> The requested action with this object has failed.: $adCN.Execute ( $query ) $adCN.Execute ( $query )^ ERROR ->AutoIT3.exe ended.rc:1 >Exit code: 1 Time: 4.608 Can anyone help? I need to clear the error and then I need the two variables to be available for comparison. Please note - I'm a Systems Tester, not a Developer, so please bear with me!
-
Hi All, Sorry to drag this one up from the past, but I found a solution, Doesn't involve AutoIT, but it does work. I too am an audio book addict, so it's vital to get the tracks in the right order. Using CDEX to rip the CDs to MP3s, there is an option to add an offset to the track number. (so all the tracks accross multiple CDs have consequtive track numbers) Also, it's possible to name the files using this track id. >> options >> settings >> Filenames %1\%2\%1-%2-%3 %1=artist %2=album %3=trackid So, As you have the original CDs (you didn't of course download anything, did you?) you can recreate the MP3s with fully correct ID3 tags & filenames. :-)
-
Patience, Grasshopper. Try some of these - research the functions called in the help file, modity as you need to. HTH $SEARCH = FileFindFirstFile("c:\oasis\log\*.xml") ; Check if the search was successful If $SEARCH = -1 Then $FILENOTFOUND="TRUE" MsgBox(0,"file not found","NOT HERE!") Exit EndIf Dim $aRecords $FILE = FileFindNextFile($SEARCH) MsgBox(4096,"FILENAME", $file) If Not _FileReadToArray($FILE,$aRecords) Then MsgBox(4096,"Error", " Error reading log to Array error:" & @error) Exit EndIf ;read in each line....& blat it out to the screen. For $x = 1 to $aRecords[0] ToolTip($aRecords[$x],0,0) Next Results not guranteed. You use this at your own risk. I'm a noob.
-
-
But the method I describe does not rely on a connection between the extension and an App. You either launch the app first, then use the app to open the file, or launch the app with command-line parameters to open the desired file. I think I'm missing part of the picture here.
-
Diz, don't use explorer unless you have to! ; CD to required directory FileChangeDir("C:\oasis\log") ;FIND File - first .XML file in this case. $SEARCH = FileFindFirstFile("c:\oasis\log\*.xml") ; Check if the search was successful If $SEARCH = -1 Then MsgBox(0,"file not found","File not found") EndIf ;get file name $FILE = FileFindNextFile($SEARCH) ;run application - notepad will do here. Run("notepad") ;now use SEND commands to open the file, or use STRING commands to build a command line, and use that string in the RUN command. A totally different way of getting the file open in the correct application without explorer.
-
Trouble scripting a IE window
System Tester replied to Bert's topic in AutoIt General Help and Support
You're going to hate this...... open the url 17 TABs CTRL+V 7 Tabs Enter. Not the answer you wanted, but it works. -
Send "RETURN" when you have navigated the focus over the desired option. BUT I would only use this method as a last resort. There is more than one way to your objective. Don't use explorer! Use the functions I listed after the "BUT" check if the file is there. open the application you wish to use. use the keystrokes to open the file --- If you can use the command line parameters, you can combine the last two steps.
-
I generally attempt to emulate the keyboard - then use the SEND function.Make the set of keystrokes a function. Make functions for all the operations you need, then just call them as necessary. I think you're going for the right-mouse-click in your example. <I THINK!> you want SEND ("{APPSKEY}") ;<------- More experienced members pls check & correct! sleep(100) ; 10mS delay SEND("7") ; 7 is the first letter - might be a different key - depends on the application. ;or Send("{DOWN 6}") ;Presses the DOWN key 6 times sleep(100) and so on. BUT you could also check the file exists.... FileFindFirstFile open the application you wih to use.....Run then open the file in the application (keystrokes for File.....Open using SEND) HTH http://support.microsoft.com/kb/126449 <-------- Keyboard shortcuts for Windows