
omarjr16
Active Members-
Posts
33 -
Joined
-
Last visited
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
omarjr16's Achievements

Seeker (1/7)
0
Reputation
-
@Danp2 thank you i will test it later
-
i will be happy if u help me as soon as possible ... i want something that detect if a page is still loading or not ...
-
there is anyway to run "pageLoadStrategy":"eager" in chrome ?! only none and normal work for me... also there is anyway to check if the page is loading or no ?!
-
omarjr16 reacted to a post in a topic: WebDriver UDF - Help & Support (III)
-
yay chromedriver 2.42 is Released Thank you for helping me Dan <3
-
@Danp2 i could not guess help me im noob
-
omarjr16 reacted to a post in a topic: WebDriver UDF - Help & Support
-
omarjr16 reacted to a post in a topic: WebDriver UDF (W3C compliant version) - 2024/09/21
-
omarjr16 reacted to a post in a topic: WebDriver UDF - Help & Support
-
omarjr16 reacted to a post in a topic: WebDriver UDF - Help & Support
-
thank you again c: but ididnt guess yet how to solve my first problem i dont know where to put "pageloadstrategy":"none" in what part ?? '{"capabilities": {"alwaysMatch":{"chromeOptions":{"w3c": true,"args":["disable-infobars","user-data-dir=/Custom/Profile' & $i & '"]}}}}'
-
i want the script to skip"findelement" in case that the page still loading but _WD_FindElement function wait the page until it complete loading then try to find the element ... can _WD_Timeouts or pageLoadStrategy solve this problem? _WD_Timeouts dont work at the moment in chromedriver and idk how to change pageloadstrategy in chrome :c _WD_ExecuteScript($sSession, "location.reload();") ;reload the page _WD_Alert($sSession, 'accept') ;skip alert sleep(2000) _WD_FindElement(...) ; Find An Element . . . Also how to perform keyboard +pointer actions? https://w3c.github.io/webdriver/#perform-actions
-
WebDriver UDF (W3C compliant version) - 2024/09/21
omarjr16 replied to Danp2's topic in AutoIt Example Scripts
This Function helped me alot so i decided to share it with u ;Add this to wd-core.au3 #Region Global Variables Global $_WD_ResolveTimeout = Default, _ $_WD_ConnectTimeout = Default, _ $_WD_SendTimeout = Default, _ $_WD_ReceiveTimeout = Default, _ #EndRegion Global Variables ;Add this ligne to wd-core.au3 under "_WinHttpOpen()" in (__WD_Get/__WD_Post/__WD_Delete) Functions _WinHttpSetTimeouts($hOpen, $_WD_ResolveTimeout, $_WD_ConnectTimeout, $_WD_SendTimeout, $_WD_ReceiveTimeout) ;Add this function to wd-core.au3 or wd-helper.au3 or in ur own script ; #FUNCTION# ;=============================================================================== ; Name...........: _WD_WinHttpTimeouts ; Description ...: ; Syntax.........: _WD_WinHttpTimeouts([, $sResolveTimeout = '' [, $sConnectTimeout = '' [, $iSendTimeout = '' [, $iReceiveTimeout = '' ]]]]) ; Parameters ....: $sResolveTimeout - [optional] Time-out value, in milliseconds, to use for name resolution. ; $sConnectTimeout - [optional] Time-out value, in milliseconds, to use for server connection requests. ; $sSendTimeout - [optional] Time-out value, in milliseconds, to use for sending requests. ; $sReceiveTimeout - [optional] Time-out value, in milliseconds, to receive a response to a request. ; Return values .: Success - Timeouts ; Author ........: OmarJr16 ; Modified ......: ; Remarks .......: Initial values are: ; |- $sResolveTimeout = 0 ; |- $sConnectTimeout = 60000 ; |- $sSendTimeout = 30000 ; |- $sReceiveTimeout = 30000 ; Related .......: ; Link ..........: http://msdn.microsoft.com/en-us/library/aa384116.aspx ; Example .......: No ;============================================================================================ Func _WD_WinHttpTimeouts($sResolveTimeout = '', $sConnectTimeout = '', $sSendTimeout = '', $sReceiveTimeout = '') If $sResolveTimeout <> '' Then _ $_WD_ResolveTimeout = $sResolveTimeout If $sConnectTimeout <> '' Then _ $_WD_ConnectTimeout = $sConnectTimeout If $sSendTimeout <> '' Then _ $_WD_SendTimeout = $sSendTimeout If $sReceiveTimeout <> '' Then _ $_WD_ReceiveTimeout = $sReceiveTimeout $Timeouts =('{"timeout":{"resolve":' & $_WD_ResolveTimeout & ',"connect":' & $_WD_ConnectTimeout & ',"send":' & $_WD_SendTimeout & ',"receive":' & $_WD_ReceiveTimeout) If $_WD_DEBUG = $_WD_DEBUG_Info Then _ ConsoleWrite($Timeouts) Return $Timeouts EndFunc -
omarjr16 reacted to a post in a topic: WebDriver UDF - Help & Support
-
its work correcttly thx again bro
-
omarjr16 reacted to a post in a topic: WebDriver UDF - Help & Support
-
using windows task manager + ram growing in the script ...also dont care about the function its an other exemple who take alot more ram then the first script just run the first script and u will see that ram usage will increase by time its small maybe in that one but very big in some other scripts
-
#include <wd_core.au3> HotKeySet("{F4}", "iWeirdo") Local $iWeirdo = 1 $_WD_Capabilities = '{"capabilities": {"alwaysMatch": {"chromeOptions": {"w3c": true,"args":["disable-infobars"] }}}}' $_WD_DEBUG = False _WD_Option('Driver', 'chromedriver.exe') _WD_Option('DriverParams', '--verbose --log-path=' & @ScriptDir & '\secretlog-shhhhhh.log') _WD_Option('Port', 9515) _WD_Startup() $sSession = _WD_CreateSession($_WD_Capabilities) do _WD_Navigate($sSession, "https://google.com") $iElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//input[@class='gsfi']") _WD_ElementAction($sSession, $iElement , 'value', "hot 6 years old girls") $ibutton = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//input[@value='Google Search']") _WD_ElementAction($sSession, $iElement , 'click') consolewrite("you are added to 'fbi weirdo registry' shame on u danp2") until $iWeirdo = 0 _WD_Window($sSession,'close') _WD_DeleteSession($sSession) _WD_Shutdown() Func iWeirdo() $iWeirdo = 0 Endfunc this simple script need +0.2mb of ram every 3s (no stop) running this awkward function in loop will need 2mb of ram every 1s (depend on ur cpu) no problems in my script fix ur broken udf Func _WD_ClickWaitElement($Session, $Strategy, $Selector, $Timeout, $poi) $hWaitTimer = TimerInit() While 1 $sElement = _WD_FindElement($Session, $Strategy, $Selector) If not @error Then if $poi = 1 then _WD_ElementAction($Session,$sElement,'click') $p = 1 ExitLoop EndIf If TimerDiff($hWaitTimer) > $Timeout Then $p = 0 Exitloop EndIf WEnd Return $p EndFunc
-
@Danp2 i noticed that using this udf will take alot of ram (+0.2mb everysec) when i put a loop even if i close the window the session and windows driver everytime .. do u know how to fix that ?! is the problem from ur udf or from my script or maybe from winhttp.au3 /json.au3
-
i must stop asking u everytime ...i wrote __WD_Alert($sSession, 'accept') instead of _WD_Alert($sSession, 'accept')
-
when i want to navigate to other page he show me an alert how to skip it ?!:c
-
@Danp2 screenshot dont work correctly (_WD_Window func) Case 'screenshot' $sResponse = __WD_Get($_WD_BASE_URL & ":" & $_WD_PORT & "/session/" & $sSession & $sCommand) you need to change it to Case 'screenshot' $sResponse = __WD_Get($_WD_BASE_URL & ":" & $_WD_PORT & "/session/" & $sSession &"/"& $sCommand) also "_WD_Timeouts" dont work with chromedriver u can only get the timeouts but not edit them...