-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Opera browser support #187
Comments
Recently it was started/mentioned here #166 |
Correct. Here we can discuss the issue and track the progress. Let me know if there are any other steps / tasks that should be included above. |
Please create separate branch on your side for this project. |
For reference: |
Please add new task to the list in OP. |
@mlipok @sven-seyfert Your feedback would be appreciated on the above draft PR. FYI, the existing extraction code in Also would like your input on how we can further eliminate hardcoding of browser names, paths, etc. |
I will take a look on |
Please add new task to the list in OP. |
Question: for each task mentioned in OP ? |
Yes, I think that's a good idea. If you target the |
Please use different name for this issue and for PR#213: Add support for Opera browser |
Why? What would you propose instead? |
FWIW, the icons indicate the type of item (PR, issue, etc). |
Please merge: #215 |
You mean all kinds of browser properties outside of the several Do we need it to be configurable without adjusting AutoIt code?
Why not simple create a |
I was actually referring to functions like I seem to recall that there was resistance from others (I think it was on the forum) to usage of external files due to the need to remember to distribute them.
|
You already provide some changes with EDIT: This was my plan. Do you wanted something more from me in this regards. |
Not yet. |
It would be great if we could eliminate the hard coded browser names in _WD_UpdateDriver. Maybe if you, @sven-seyfert & I can come up with a good solution if we put our heads together. |
Instead of trying to traverse the complete zip file structure, couldn't we just extract the entire file to a temp directory and then grab a list of any executables with _FileListToArrayRec? |
Sure. |
And my plan is to move extracting to separate internall function. |
Found operasoftware/operachromiumdriver#97 (comment). Given this and #220, I wonder if we should alter our plans? |
Agreed. In my opinion we should revert almost all Opera support actions and notify the users in the ReadMe file what they can do if they want to use Opera. But maybe @mlipok disagrees? |
Give some time. Max 1 week. |
I reviewed the current solution to be flexible regarding finding the values of
The idea is not bad and I like the generic approach 😀 . Unfortunately I have to say it's also quite hard to understand and a bit of redundant 🤔 . I would suggest something like the following which doesn't need the enum values and could be a bit simpler. #include-once
#include <Array.au3>
Global $_WD_SupportedBrowsers[][8] = _
[ _
["BrowserName", "BrowserExe", "DriverExe", "IsBrowserArchX64", "BrowserOptionsKey", "BrowserLatestUrl", "BrowserZipDownloadUrl", "BrowserZipPrefix"], _
["chrome", "chrome.exe", "chromedriver.exe", False, "goog:chromeOptions", "https://chromedriver.storage.googleapis.com/LATEST_RELEASE_", "https://chromedriver.storage.googleapis.com/", "/chromedriver_"], _
["firefox", "firefox.exe", "geckodriver.exe", True, "moz:firefoxOptions", "https://github.com/mozilla/geckodriver/releases/latest", "https://github.com/mozilla/geckodriver/releases/download/v", "/geckodriver-v"], _
["msedge", "msedge.exe", "msedgedriver.exe", True, "ms:edgeOptions", "https://msedgedriver.azureedge.net/LATEST_RELEASE_", "https://msedgedriver.azureedge.net/", "/edgedriver_"], _
["opera", "opera.exe", "operadriver.exe", True, "operaOptions", "https://github.com/operasoftware/operachromiumdriver/releases/latest", "https://github.com/operasoftware/operachromiumdriver/releases/download/v.", "/operadriver_"] _
]
_ArrayDisplay($_WD_SupportedBrowsers)
ConsoleWrite('Example 1: ' & _GetBrowserProperty('CHROME', 'BrowserOptionsKey') & @CRLF)
ConsoleWrite('Example 2: ' & _GetBrowserProperty('FireFox', 'IsBrowserArchX64') & @CRLF)
ConsoleWrite('Example 3: ' & _GetBrowserProperty('opera', 'DRIVEREXE') & @CRLF)
ConsoleWrite('Example 4: ' & _GetBrowserProperty('Msedge', 'BrowserZipPrefix') & @CRLF)
Func _GetBrowserProperty($sBrowserName, $sProperty)
Local $iRowCount = UBound($_WD_SupportedBrowsers, 1) - 1
For $i = 0 To $iRowCount Step 1
If StringLower($_WD_SupportedBrowsers[$i][0]) == StringLower($sBrowserName) Then
Local $iRow = $i
ExitLoop
EndIf
Next
Local $iColumnCount = UBound($_WD_SupportedBrowsers, 2) - 1
For $i = 0 To $iColumnCount Step 1
If StringLower($_WD_SupportedBrowsers[0][$i]) == StringLower($sProperty) Then
Local $iColumn = $i
ExitLoop
EndIf
Next
Return $_WD_SupportedBrowsers[$iRow][$iColumn]
EndFunc
The different upper or lower case for the I hope this will provide the best of the two approaches to get the browser property 🤞 . |
No stress and pressure at all from my perspective 😇 . |
@mlipok @sven-seyfert Crisis averted. 😆 See my latest post in #220. |
Please elaborate. Which part was difficult to understand? Which part would you consider redundant?
That's an interesting concept where you are embedding the equivalent of the enums in the first row. I'm unsure which I prefer. One downside to your method is that each lookup requires to search for the browser in the array instead of looking up the index once and then reusing it as needed. I also think that it is important to remember who will be using either of these methods... us!! The user of these UDFs don't need to access $_WD_SupportedBrowsers directly; they simple call the functions that we provide. 🙂 |
Confirmed. Your capabilites strings works for me. {
"capabilities":{
"alwaysMatch":{
"goog:chromeOptions":{
"w3c":true,
"excludeSwitches":[
"enable-automation"
],
"binary":"C:\\Users\\Szef\\AppData\\Local\\Programs\\Opera\\opera.exe"
}
}
}
} I start my works on fixes to UDF. |
Just FYI: I am a bit sad 😔 . Why? Unfortunately I am not able to provide such quick responses or reactions like you both do. In case of questions or "mentions" within my daily work time, I can only response few hours or sometimes even few days later. Nevertheless I will respond to your questions Dan, today. Will be a bit of explanation effort, but I guess it is worthy 😅 . |
Yes, I noticed that this occurs if you don't change |
I'm using |
btw. And the last task will be |
That's what I'm doing as well. I just handle the "exception" outside of |
Unfortunately, sometimes this will be impossible. As for now, it's just one extra line. Alternatively, we can parse the path to get only the directory and then put the filename from the variable: $_WD_SupportedBrowsers Like this: $sPath = StringRegExpReplace($sPath, '(.+\\)(.*exe)', '$1' & $sEXE) ; Registry entries can contain "Launcher.exe" instead "opera.exe" And this will fit all cases. |
But on the other hand. |
Yes, that would be a better solution in my mind
This isn't how |
So all is merged. Tomorow I take a look on _WD_UpdateDriver Now going to bed. |
As you merege my latest PR is that mean that this task list is completed ? |
The text was updated successfully, but these errors were encountered: