Closed mlipok closed 1 year ago
What is the current behavior? you need to check which version of Chrome browser you have and specify this by choosing chrome or chrome_legacy
True, which is by design. The chrome_legacy
entry will be removed in the near future once everyone has had the opportunity to upgrade to newer versions of Chrome.
Since this check can be easily performed by the executing script, I don't see why _WD_UpdateDriver
needs to be "bastardized" by adding these browser specific changes.
P.S. I suggest that you start using draft PRs until they are ready for review. 😛
So as I understand your statement user should check it by his own route, for example with such a snippet:
Local $sBrowserVersion = _WD_GetBrowserVersion($sBrowser)
If Not @error And $sBrowser = "chrome" Then
Local $i_Check = _VersionCompare("115.0.0.0", $sBrowserVersion)
If Not @error And $i_Check = 1 Then $sBrowser = "chrome_legacy"
EndIf
_WD_UpdateDriver($sBrowser, Default, Default, True)
EDIT: or even better:
_Example('chrome')
Func _Example($sBrowser)
Local $sBrowserVersion = _WD_GetBrowserVersion($sBrowser)
If Not @error And $sBrowser = "chrome" Then
Local $i_Check = _VersionCompare("115.0.0.0", $sBrowserVersion)
If Not @error And $i_Check = 1 Then $sBrowser = "chrome_legacy"
EndIf
_WD_UpdateDriver($sBrowser)
EndFunc
The
chrome_legacy
entry will be removed in the near future once everyone has had the opportunity to upgrade to newer versions of Chrome.
Why in near future ? I would like to prospose to leave this functionality as long as chromedriver.exe download links are available/active.
So as I understand your statement user should check it by his own route
There are several way to tackle this problem --
chrome
and chrome_legacy
chrome
vs chrome_legacy
. Then use this stored value throughout the rest of the script.Why in near future ? I would like to prospose to leave this functionality as long as chromedriver.exe download links are available/active.
For multiple reasons --
Ok. I have one more concept to check and propose here, and we will be able to close this PR in max next 2 days.
As for now it can be closed.
Pull request
Proposed changes
chrome >> chrome_legacy - should be automatically supported user should not bother about this
Checklist
Types of changes
What is the current behavior?
you need to check which version of Chrome browser you have and specify this by choosing chrome or chrome_legacy
What is the new behavior?
chrome >> chrome_legacy - automatically done
Additional context
https://www.autoitscript.com/forum/topic/208640-webdriver-udf-help-support-iv/?do=findComment&comment=1521299
https://www.autoitscript.com/forum/topic/208640-webdriver-udf-help-support-iv/?do=findComment&comment=1521377
System under test
Chrome Browser v114... v115
REMARK
consider to check for
$_WD_SupportedBrowsers
if there is a need to add accordingly some additionall checking