I'm currently working with Robotframework 4 / Selenium 4.0b1 / 4.0b2 / 4.0b2post1 and seleniumLibrary 5.1.3
It's not possible do perform a click / sendkeys / ... etc with opera (v75 or v74) and their associate driver on selenium >= 4.0b1.
This works well with Selenium 4.0a7
To Reproduce
Open Opera browser , go to url, and then perform a click or a send keys with Robotframework :
Click should be perform. Instead it raised an error :
20210409 11:00:13.319 : INFO : Opening browser 'Opera' to base url 'https://github.com/SeleniumHQ/'.
20210409 11:00:16.475 : INFO : Clicking element '//span[@title='selenium']'.
20210409 11:00:16.846 : INFO :
20210409 11:00:16.848 : FAIL : AttributeError: 'dict' object has no attribute 'click'
and here is the TRACE :
11:00:16.848 FAIL AttributeError: 'dict' object has no attribute 'click'
11:00:16.848 DEBUG Traceback (most recent call last):
File "c:\python\lib\site-packages\SeleniumLibrary__init__.py", line 492, in run_keyword
return DynamicCore.run_keyword(self, name, args, kwargs)
File "c:\python\lib\site-packages\robotlibcore.py", line 103, in run_keyword
return self.keywords[name](*args, **(kwargs or {}))
File "c:\python\lib\site-packages\SeleniumLibrary\keywords\element.py", line 658, in click_element
self.find_element(locator).click()
Test script or set of commands reproducing this issue
OS: Windows 10
Browser: Opera
Browser version: v74 or v75
Browser Driver version: v88.0.4324.104 or v89.0.4389.82
Language Bindings version: Python 3.7.4 / 3.9.1
Selenium 4 bindings are only using W3C, not JSON Wire Protocol anymore. Opera and the OperaDriver are not able to use W3C so far, that it is why you are getting that error.
I opened this issue some weeks ago, asking about W3C support, but so far we've gotten no reply.
I'll close this issue as it is external to this project's scope. For now, if someone needs to use Opera, they'll need to use the latest stable release of Selenium 3.
🐛 Bug Report
I'm currently working with Robotframework 4 / Selenium 4.0b1 / 4.0b2 / 4.0b2post1 and seleniumLibrary 5.1.3 It's not possible do perform a click / sendkeys / ... etc with opera (v75 or v74) and their associate driver on selenium >= 4.0b1. This works well with Selenium 4.0a7
To Reproduce
Open Opera browser , go to url, and then perform a click or a send keys with Robotframework :
Open Browser https://github.com/SeleniumHQ/ Opera click Element //span[@title='selenium']
Expected behavior
Click should be perform. Instead it raised an error :
20210409 11:00:13.319 : INFO : Opening browser 'Opera' to base url 'https://github.com/SeleniumHQ/'. 20210409 11:00:16.475 : INFO : Clicking element '//span[@title='selenium']'. 20210409 11:00:16.846 : INFO :
and here is the TRACE :
11:00:16.848 FAIL AttributeError: 'dict' object has no attribute 'click'
11:00:16.848 DEBUG Traceback (most recent call last): File "c:\python\lib\site-packages\SeleniumLibrary__init__.py", line 492, in run_keyword return DynamicCore.run_keyword(self, name, args, kwargs) File "c:\python\lib\site-packages\robotlibcore.py", line 103, in run_keyword return self.keywords[name](*args, **(kwargs or {})) File "c:\python\lib\site-packages\SeleniumLibrary\keywords\element.py", line 658, in click_element self.find_element(locator).click()
Test script or set of commands reproducing this issue
Open Browser https://github.com/SeleniumHQ/ Opera click Element //span[@title='selenium']
Environment
OS: Windows 10 Browser: Opera Browser version: v74 or v75 Browser Driver version: v88.0.4324.104 or v89.0.4389.82 Language Bindings version: Python 3.7.4 / 3.9.1
What happens if you use Firefox or Chrome?
It's works with FF / Edge / Chrome - It also works with opera if i downgrade Selenium to 4.0a7.
Selenium 4 bindings are only using W3C, not JSON Wire Protocol anymore. Opera and the OperaDriver are not able to use W3C so far, that it is why you are getting that error.
I opened this issue some weeks ago, asking about W3C support, but so far we've gotten no reply.
I'll close this issue as it is external to this project's scope. For now, if someone needs to use Opera, they'll need to use the latest stable release of Selenium 3.