RohanM Posted June 28, 2022 Share Posted June 28, 2022 I have used webdriverUDF with Edge browser to access a website in AutoIt. The issue is When I open the website in the Edge browser there is no captcha. But when I open it in the AutoIT Webdriver UDF (using Edge), The captcha appeared. can anyone help me on this? Link to comment Share on other sites More sharing options...
Danp2 Posted June 28, 2022 Share Posted June 28, 2022 Since you haven't shown us any code, it's difficult to know if this behavior is truly caused by webdriver. It's possible that it is profile related. Have you tried launching the webdriver session using your existing profile? There may be ways to avoid webdriver detection, but that discussion may violate the forum rules. Let's see what the admins have to say about it. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
RohanM Posted June 28, 2022 Author Share Posted June 28, 2022 @Danp2 thank you for your reply, please see my coding #include <wd_helper.au3> #include <wd_capabilities.au3> #include <CSV.au3> #include <Array.au3> #include <_HtmlTable2Array.au3> #include <Date.au3> #include <DTC.au3> Global $Desired_Capabilities = Null, $Session = Null, $District_Code = StringLeft(@UserName, 3), $PID = Null Initiate_Browser() _WD_Navigate($Session, "https://www.hapag-lloyd.com/en/online-business/tracing/tracing-by-container.html?container") _WD_LoadWait($Session, Default, 10 * 1000) Func Initiate_Browser() SetupEdge() $PID = _WD_Startup() $_WD_DEBUG = $_WD_DEBUG_None ;DISABLE FOR DEBUGGING For $Temp = 1 To 10 Global $Session = _WD_CreateSession($Desired_Capabilities) If $Session <> '' Then ExitLoop Else If $Temp = 10 Then MsgBox(0,"Error","Session fail") Else Sleep(500) EndIf EndIf Next _WD_ConsoleVisible(False) _WD_Window($Session, 'Maximize') EndFunc ;==>Initiate_Browser 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"],"args": ["-guest"],"useAutomationExtension": false}}}}' EndFunc ;==>SetupEdge Func End_Browser() _WD_DeleteSession($Session) _WD_Shutdown($PID) EndFunc ;= Link to comment Share on other sites More sharing options...
Developers Jos Posted June 28, 2022 Developers Share Posted June 28, 2022 2 hours ago, RohanM said: The captcha appeared. can anyone help me on this? Don't think so as that Captcha there for a reason and there is a pretty clear statement about this in our forum rules! Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Recommended Posts