bito-code-review[bot] commented on PR #44898:
URL: https://github.com/apache/superset/pull/44898#issuecomment-5956477780

   <!-- Bito Reply -->
   The flagged issue is correct. In the current implementation, 
`kwargs.update(webdriver_config)` is called before 
`webdriver_config.pop("binary_location", "")`. Because `kwargs` is a 
dictionary, updating it with `webdriver_config` copies the `binary_location` 
key into `kwargs`. Popping it from `webdriver_config` afterwards does not 
remove it from `kwargs`, leading to an unexpected argument error in newer 
Selenium versions.
   
   To resolve this, you should pop `binary_location` from `webdriver_config` 
*before* updating `kwargs`.
   
   ```python
   # Extract binary_location first
   binary_location = webdriver_config.pop("binary_location", "")
   
   # Update kwargs with the remaining config
   kwargs.update(webdriver_config)
   
   # Set the binary location on options
   options.binary_location = binary_location
   ```
   
   There are no other comments on this PR to address.
   
   **superset/utils/webdriver.py**
   ```
   binary_location = webdriver_config.pop("binary_location", "")
   
   kwargs.update(webdriver_config)
   
   options.binary_location = binary_location
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to