-
Posts
223 -
Joined
-
Last visited
PoojaKrishna's Achievements

Polymath (5/7)
7
Reputation
-
PoojaKrishna reacted to a post in a topic: Time and Date Conversion UDF
-
PoojaKrishna reacted to a post in a topic: Get the time difference from 2 times
-
Hi, I am trying to save the whole content of a Firefox pop-up window to a text file. >>>> Window <<<< Title: Mozilla Firefox Class: MozillaWindowClass >>>> Control <<<< ClassnameNN: MozillaCompositorWindowClass1 $HWND =WinGetHandle("[TITLE:Mozilla Firefox]") WinSetState($HWND, "", @SW_MAXIMIZE ) WinActivate($HWND) sleep(3000) ;ControlSend($HWND, "", "[CLASS:MozillaCompositorWindowClass; INSTANCE:1]", "^s") ;send("^s") sleep(2000) $hSaveAs = WinGetHandle("[TITLE:Save As]") $hCtrl = ControlGetHandle ( $hSaveAs, "", "[CLASS:Edit; INSTANCE:1]" ) ControlSetText ( $hSaveAs, "", $hCtrl, "C:\Test\new.txt" ) sleep(3000) ControlClick ( $hSaveAs, "", "[CLASS:Button; INSTANCE:2]" ) In attended mode the Send method works fine to initiate the save as dialog but in un attended mode nothing seems to work. The content type of the page is: text/plain Any input is highly appreciated. I am stuck on it for many hours.
-
SQL Server Connectivity
PoojaKrishna replied to PoojaKrishna's topic in AutoIt General Help and Support
@robertocm, Thank you! Your solution also fixed the problem. -
SQL Server Connectivity
PoojaKrishna replied to PoojaKrishna's topic in AutoIt General Help and Support
Thank you! It worked! -
PoojaKrishna reacted to a post in a topic: SQL Server Connectivity
-
PoojaKrishna reacted to a post in a topic: SQL Server Connectivity
-
SQL Server Connectivity
PoojaKrishna replied to PoojaKrishna's topic in AutoIt General Help and Support
Removing the database name from the connection string made it work. $oConn = ObjCreate ("ADODB.Connection") $DSN = 'DRIVER={SQL Server};SERVER=' & $sServer & ';DATABASE=' & '' & ';UID=' & $sUID &';PWD=' & $sPWD & ';' $oConn.ConnectionTimeout = 10 ; default is 15 s (must be supported by data provider DSN) $oConn.Open($DSN) Please specify the database name in the sql queries that you execute. Local $sQuery = "INSERT INTO Database.dbo.[TABLENAME]([ColName1],[ColName2],[ColName3]) VALUES('TEST STRING',2,1)" Thank you. -
Hi, I am trying to connect to a remote SQL Server. But it return the error: [Microsoft][ODBC SQL Server Driver] Cannot open database "data base" requested by the login. The login failed. I could connect to the remote server and view the database and tables through MS SQL Server management studio using the server name and credentials. Please help. $objErr = ObjEvent("AutoIt.Error","MyErrFunc") $sServer = 'server_name' $sDatabase = 'databse_name' $sUID = 'user' $sPWD = 'pwd' $oConn = ObjCreate ("ADODB.Connection") $DSN = 'DRIVER={SQL Server};SERVER=' & $sServer & ';DATABASE=' & $sDatabase & ';UID=' & $sUID &';PWD=' & $sPWD & ';' $oConn.ConnectionTimeout = 10 ; default is 15 s (must be supported by data provider DSN) $oConn.Open($DSN) If @error Then Exit $oConn.Close MsgBox(64, 'OK', 'Finished') Func MyErrFunc() MsgBox(48, 'COM Error', $objErr.description) SetError(1) EndFunc #cs With $oConn .Provider = "SQLOLEDB" .Properties("Initial Catalog") = $sDatabase .Properties("Data Source").Value = $sServer .Properties("Integrated Security").Value = "SSPI" .Properties("Persist Security Info").Value = "True" .Properties("User ID").Value = $sUID .Properties("Password").Value = $sPWD .Open EndWith If @error then Exit #ce
-
Velislav reacted to a post in a topic: WebDriver UDF - Help & Support
-
duzers reacted to a post in a topic: WebDriver UDF - Help & Support
-
duzers reacted to a post in a topic: WebDriver UDF - Help & Support
-
PoojaKrishna reacted to a post in a topic: [Resolved] GUICtrlCreateInput Limit Characters
-
PoojaKrishna reacted to a post in a topic: [Solved] Get Full Path of process - both x86 & x64.
-
PoojaKrishna reacted to a post in a topic: How to remove new line ?
-
PoojaKrishna reacted to a post in a topic: How do I pause a script?
-
WebDriver UDF - Help & Support (II)
PoojaKrishna replied to Danp2's topic in AutoIt General Help and Support
All files updated, but not working with: Func SetupGecko() _WD_Option('Driver', 'geckodriver.exe') ;_WD_Option('DriverParams', '--log trace') _WD_Option('DriverParams', '--log trace > "' & @ScriptDir & '\geckodriver.log"') _WD_Option('Port', 4444) $sDesiredCapabilities = '{"desiredCapabilities":{"javascriptEnabled":true,"nativeEvents":true,"acceptInsecureCerts":true}}' EndFunc _WD_IsLatestRelease: True _WD_IsLatestRelease ==> Success _WDStartup: OS: WIN_10 WIN32_NT 17763 _WDStartup: AutoIt: 3.3.14.5 _WDStartup: WD.au3: 0.2.0.9 (Up to date) _WDStartup: WinHTTP: 1.6.4.2 _WDStartup: Driver: geckodriver.exe _WDStartup: Params: --log trace > "D:\Pooja Projects\Tim\geckodriver.log" _WDStartup: Port: 4444 __WD_Post: URL=HTTP://127.0.0.1:4444/session; $sData={"desiredCapabilities":{"javascriptEnabled":true,"nativeEvents":true,"acceptInsecureCerts":true}} __WD_Post: StatusCode=0; ResponseText=0... __WD_Post ==> Send / Recv error _WD_CreateSession: 0 _WD_CreateSession ==> Webdriver Exception: HTTP status = 0 __WD_Delete: URL=HTTP://127.0.0.1:4444/session/ __WD_Delete: StatusCode=0; ResponseText=0... __WD_Delete ==> Webdriver Exception _WD_DeleteSession: 0 _WD_DeleteSession ==> Webdriver Exception: HTTP status = 0 -
WebDriver UDF - Help & Support (II)
PoojaKrishna replied to Danp2's topic in AutoIt General Help and Support
Just tried and failed. Copying the console out. _WDStartup: OS: WIN_10 WIN32_NT 17763 _WDStartup: AutoIt: 3.3.14.5 _WDStartup: WD.au3: 0.2.0.4 _WDStartup: WinHTTP: 1.6.4.1 _WDStartup: Driver: geckodriver.exe _WDStartup: Params: --log trace > "D:\Pooja Projects\Tim\geckodriver.log" _WDStartup: Port: 4444 __WD_Post: URL=HTTP://127.0.0.1:4444/session; $sData={"desiredCapabilities":{"javascriptEnabled":true,"nativeEvents":true,"acceptInsecureCerts":true}} __WD_Post: StatusCode=0; ResponseText=0 __WD_Post ==> Send / Recv error _WD_CreateSession: 0 _WD_CreateSession ==> Webdriver Exception: HTTP status = 0 -
WebDriver UDF - Help & Support (II)
PoojaKrishna replied to Danp2's topic in AutoIt General Help and Support
Hi, I am trying to push geckodriver's output to a .log file. But I couldn't find any geckodriver.log file in the script folder after execution. Am I missing any parameters in the setup method? Please help. Func SetupGecko() _WD_Option('Driver', 'geckodriver.exe') _WD_Option('DriverParams', '--log trace') ;_WD_Option("DriverParams", '-vv >' & @ScriptDir & '\geckodriver.log') ;_WD_Option('DriverParams', '--log trace --marionette-port 3687') _WD_Option('Port', 4444) $sDesiredCapabilities = '{"desiredCapabilities":{"javascriptEnabled":true,"nativeEvents":true,"acceptInsecureCerts":true}}' EndFunc -
PoojaKrishna reacted to a post in a topic: Z-Order, how to restore a window's position ?
-
WebDriver UDF - Help & Support (II)
PoojaKrishna replied to Danp2's topic in AutoIt General Help and Support
@Danp2, Yes, I checked out the Developer Tools on the open Chrome browser. I have tried with Firefox and it worked fine. Thank you so much for your help. -
PoojaKrishna changed their profile photo
-
WebDriver UDF - Help & Support (II)
PoojaKrishna replied to Danp2's topic in AutoIt General Help and Support
Hi, I am trying to login to a bank's web page to download some documents automatically. But it looks like the page is aware of the automation script. It always navigates to an error page. The same error is shown for good and bad credentials. The iMacros script is working well on the page. The error message is also attached. Is there anything else I need to take care of while automating a login page using web driver? #include "wd_core.au3" #include "wd_helper.au3" Local $sDesiredCapabilities, $sSession SetupChrome() _WD_Startup() $sSession = _WD_CreateSession($sDesiredCapabilities) _Login() _WD_DeleteSession($sSession) _WD_Shutdown() Func _Login() $sURL = "https://secure.chase.com" $iRet = _WD_Navigate($sSession, $sURL) $iRet = _WD_LoadWait($sSession, 500, 5000) Sleep(1500) $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//iframe[@id='logonbox']") _WD_FrameEnter($sSession, $sElement) Sleep(1500) $sElement = _WD_FindElement($sSession, "xpath", "//input[@id='userId-text-input-field']") ;_WD_ElementAction($sSession, $sElement, 'click') ;Sleep(1500) _WD_ElementAction($sSession, $sElement, 'value',"username" ) Sleep(1500) $sElement = _WD_FindElement($sSession, "xpath", "//input[@id='password-text-input-field']") ;_WD_ElementAction($sSession, $sElement, 'click') ;Sleep(1500) _WD_ElementAction($sSession, $sElement, 'value',"password" ) Sleep(1500) $sElement = _WD_FindElement($sSession, "xpath", "//button[@id='signin-button' and @type='submit']") _WD_ElementAction($sSession, $sElement, 'click' ) Sleep(1500) msgbox(0,"Done", "Done") EndFunc Func SetupChrome() _WD_Option('Driver', 'chromedriver.exe') _WD_Option('Port', 9515) _WD_Option('DriverParams', '--log-path="' & @ScriptDir & '\chrome.log"') $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"goog:chromeOptions": {"w3c": true }}}}' EndFunc -
PoojaKrishna reacted to a post in a topic: Extracting just the filename and extension from a full path?
-
Water, thank you so much for giving an idea of installing a new printer which saves the file without prompting . Please refer to the following link to see how to add a new printer to save the file to the given name without prompt. https://support.microsoft.com/en-in/help/2528405/how-to-print-to-file-without-user-intervention In the above information, I used PDF as the file extension for the file name(port), selected Microsoft as the manufacturer and Print to PDF as the printer.
- 10 replies
-
Thank you for sharing the link. I am new to Powershell script but will give a try and will update. The last post on the given page says that the script was printing only blank files as the PDFs.
- 10 replies
-
Yes, I am executing the AutoIt script on the Citrix machine. In my Windows10 machine, the script is working perfect but in the Citrix machine, it is unable to handle the dialog boxes.
- 10 replies
-
Thanks for the reply Water. The _OL_Warnings.exe is not able to handle the warning window in the Citrix machine, I am manually closing that warning window. The win, control, and send commands have no effect in the Citrix environment. I am searching for a solution to handle the dialog appearing on the Citrix machine. I will post back if I get any.
- 10 replies
-
Yes, the default printer is set as 'Microsoft Print to PDF' and it initiates a 'Save Print Output As' dialog on saving the file. I am not able to handle that dialog on the Citrix machine.
- 10 replies