SeleniumLibrary icon indicating copy to clipboard operation
SeleniumLibrary copied to clipboard

After upgrade from 4.5.0, cannot use SeleniumLibrary. Fails with error: TypeError: HybridCore.__init__() takes 2 positional arguments but 3 were given

Open HelioGuilherme66 opened this issue 5 months ago • 5 comments

Steps to reproduce the issue

Initial problem was found in Python 3.9, with upgrade from 4.5.0 to 6.1.1, and still happens in 6.6.1, also in Python 3.12.6. After downgrade to 4.5.0 in Python 3.12.6, test suite runs as expected.

On both IDEs, Visual Studio Code with Robotcode, and RIDE v2.1b1, the library is marked as failed to import documentation.

Simple test case:

*** Settings ***
Documentation   Suite description
Library         SeleniumLibrary

*** Test Cases ***
demo
  [Tags]  demo
  Open Browser  https://robotframework.org  chrome
  Sleep  3 seconds
  Capture Page Screenshot
  [Teardown]  close all browsers

Error messages and additional information

Output of test run (test suite with resources):

[ ERROR ] Error in file 'C:\Sander\GitHub\ronaldvandermolen\RFW\Experimental_Rinya\Mantis\Resources\Common\Common.robot' on line 3: Initializing library 'SeleniumLibrary' with no arguments failed: TypeError: HybridCore.__init__() takes 2 positional arguments but 3 were given
Traceback (most recent call last):
  File "C:\Sander\Python\Lib\site-packages\SeleniumLibrary\__init__.py", line 673, in __init__
    DynamicCore.__init__(self, libraries, translation_file)
TypeError: HybridCore.__init__() takes 2 positional arguments but 3 were given
[ ERROR ] Error in file 'C:\Sander\GitHub\ronaldvandermolen\RFW\Experimental_Rinya\Mantis\Resources\MantisKeywords\MantisKeywords.robot' on line 3: Initializing library 'SeleniumLibrary' with no arguments failed: TypeError: HybridCore.__init__() takes 2 positional arguments but 3 were given
Traceback (most recent call last):
  File "C:\Sander\Python\Lib\site-packages\SeleniumLibrary\__init__.py", line 673, in __init__
    DynamicCore.__init__(self, libraries, translation_file)
TypeError: HybridCore.__init__() takes 2 positional arguments but 3 were given

(I open this on behalf of user) Initial conversation happened in Slack #seleniumlibrary channel.

Expected behavior and actual behavior

Expected no errors and documentation loaded in IDEs and test run to proceed.

Environment

Browser: Chrome Browser driver: chromedriver Operating System: Windows 11 x64 Libraries

  • Robot Framework: 7.1
  • Selenium: ~~4.16.0~~ 4.25.0
  • SeleniumLibrary: 6.1.1 and 6.6.1 (was OK in 4.5.0)
  • Interpreter: Python 3.12.6

HelioGuilherme66 avatar Sep 25 '24 20:09 HelioGuilherme66