Jump to content

RohanM

Active Members
  • Posts

    38
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

RohanM's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. @Danp2 yes, your suggestion worked, I added Sleep before _WD_Shutdown(). thank you @Danp2 _WD_DeleteSession($Session) Sleep(8000) _WD_Shutdown()
  2. Hello @Danp2 yes without any parameter I tried, still the same result, these are the file that keep on creating.
  3. Hello Team, I am using webdriver with Edge browser, whenever script starts it will create temp file in the Temp folder(scoped_dir*), but once its shootdowns it will not delete those file automatically, its keep on creating and unnecessarily utilizing the HDD space. I am calling this function at the end of the script Func End_Browser()     _WD_DeleteSession($Session)     _WD_Shutdown($PID) EndFunc   ;==>End_Browser capabilities  Func SetupEdge()     _WD_Option('driver', "C:\Script_Resources\msedgedriver.exe")     _WD_Option('port', 9515)     _WD_Option('driverclose', True)     _WD_Option('driverparams', '--verbose --log-path="' & @LocalAppDataDir & '\msedge.log"')     $Desired_Capabilities = '{"capabilities": {"alwaysMatch": {"ms:edgeOptions": {"binary": "' & _             StringReplace(@ProgramFilesDir, "\", "/") & '/Microsoft/Edge/Application/msedge.exe", "excludeSwitches": [ "enable-automation"], "useAutomationExtension": false}}}}' EndFunc   ;==>SetupEdge
  4. thank you @mLipok and @Danp2 found help files.
  5. Yes, I checked in wd_demo.au3 file but couldn't find is there is any other help files?
  6. Hi @Danp2 thank you so much for you reply as always. I am sorry I bit confused with your reply since I am new to autoit and this function (_WD_CheckContext) is not in even https://www.autoitscript.com/wiki/WebDriver, can you kindly provide me a sample code?
  7. Hi Is there is a way to embed Microsoft Edge browser while using WebDriver?
  8. No, What I am trying to archive here is, I will open website till the login page and user has to enter credentials, for this script will wait till user successfully enter their credentials, once user got authenticated it will go to home page and then it will exit the loop, but if user closed the browser form "X" my script is still running but browser will close, so I want to access the users click activity before its close then I can stope the script. While 1 If $login = False Then $oInputBox = _WD_FindElement($Session, $_WD_LOCATOR_ByXPath, "//input[(@name='searchvaluerow1') and (@class='qstext searchVal')]") If $oInputBox <> '' Then $login = True ExitLoop EndIf EndIf if user pressed Close "X" I want to stop my loop WEnd
  9. Hi All, how to handle close button click event in edge browser while using webdriver, I want to detect from the script if user click Close "X" from the Edge Browser before its get close.
  10. Hi @mLipok I am not sure that I am doing right here, but after Navigating the URL I have call the _WD_DownloadFile with same URL and it did the trick for me. $DocUrlPdf = 'https://net.info.com/' & StringReplace($artHis[1], 'amp;', '') _WD_Navigate($Session, $DocUrlPdf) _WD_LoadWait($Session, 500) $iPdf = @ScriptDir & '\DownloadFiles\' & $sPO & '.pdf' _WD_DownloadFile($DocUrlPdf, $iPdf, 0)
  11. Hi @mLipok yes, if execute below lines, the PDF document will be open in the Edge browser, but it will not start automatically download option. $aUrlPs = 'https://ViewDocData?gdcustorgid=AT5672TDMLTCBGXFZ3W5XVEXTM&archid=IE6DEDFNKDZXSPRJ4V35JEQ4LE' _WD_Navigate($Session, $aUrlPs) _WD_LoadWait($Session, 500)
  12. Hi @Danp2 yes I have used _WD_DownoadFile function but its not getting download full file if I download the file manually file size is 35KB but using function file size is 30KB and downloaded file not able to open. $aUrlPs = 'https://network.infornexus.com/servlet/GDCViewDocData?gdcustorgid=AT5672TDMLTCBGXFZ3W5XVEXTM&archid=HFZOM5JQYGR7XUPDB6PTJMXDZU' $sPO = 'D6KO40A' $iPdf = @ScriptDir & '\' & $sPO & '.pdf' _WD_DownloadFile($aUrlPs, $iPdf, 0)
  13. Hello, can I use _WinINet_GetUrlCacheEntryInfoEx function to download files while using Webdriver, this was working when use IE browser and I have switiched to Edge browser using Web driver, now its not happening, can anyone fix this or suggest best way to download files to customized folder $aUrlPs = 'https://ViewDocData?gdcustorgid=AT5672TDMLTCBGXFZ3W5XVEXTM&archid=IE6DEDFNKDZXSPRJ4V35JEQ4LE' _WD_Navigate($Session, $aUrlPs) _WD_LoadWait($Session, 500) $sPO = 'D6KO40A' $iPdf = @ScriptDir & '\' & $sPO & '.pdf' Sleep(2000) Local $j = 0 While 1 Local $HttPArray = _WinINet_GetUrlCacheEntryInfoEx($aUrlPs) If Not @error Then Local $fPDF = StringStripWS($HttPArray[2], 3) If StringInStr($fPDF, '.pdf') > 0 And FileExists($fPDF) = 1 Then FileCopy($fPDF, $iPdf, 1) ExitLoop EndIf Else Sleep(500) $j = $j + 1 EndIft If $j = 20 Then $iErrorNote = 'DO Issued | Unable to download.' ExitLoop EndIf WEnd
  14. Hi @Danp2 thanks for your reply. _WD_GetTable function also will return only innerHTML of the table it will not return table as a object to iterate through. what I need here is: in this table there are multiple hrefs I want to click one of the link by checking table cell value Local $oTrs = $iTable.rows Local $iRows = $oTrs.length Local $DocType = False, $iLink = False For $oTr In $oTrs $oTds = $oTr.cells $iCol = 0 For $oTd In $oTds $sdf = String($oTd.innerText) If StringInStr($sdf, 'Financial Invoice') > 0 Then $DocType = True EndIf If $DocType Then If StringInStr($sdf, 'View') > 0 Then $oTd.innerHtml Local $aArray = StringRegExp($oTd.innerHtml, '(?m)"(.*?)"', 2) $iLink = True ExitLoop 2 EndIf EndIf Next Next $DocUrl = 'https://network.infornexus.com' & StringReplace($aArray[1], 'amp;', '') _IENavigate($oIE, $DocUrl, 1) _IELoadWait($oIE)
×
×
  • Create New...