"WebDriver' object has no attribute 'w3c'" error is raised when using ActionChains
I am tying to call to ActionChains method called move_to_element, but fortunately error is raised after a successful alloc of ActionChains:
AttributeError: 'WebDriver' object has no attribute 'w3c'
My python libs are:
Appium-Python-Client==2.4.1
selenium==3.141.0
Capabilities:
app = <path to my app>
winAppDriverHost = 127.0.0.1:4723
platformName = Windows
platformVersion = 10
automationName = Windows
appArguments = <my app args>
appWorkingDir = <my app working dir>
@Shakevg can you please help with that issue?
@anunay1
The WinAppDriver version which I am using is 1.2.1.0, I also tried with 1.2.99 but I got the same error.
https://github.com/microsoft/WinAppDriver/issues/1686#issuecomment-1048632954
@liljohnak what do you mean by saying downgrade the Appium version to 4.3.1? Appium latest version is 1.22.3
Current 5.0 Appium is using w3c. It is a TODO for the next WinAppDriver release. To fix your problem you'll need to downgrade.
@liljohnak sorry, but I am not sure I understood your answer,
when I type appium --version I get 2.0.0-beta.43.
When I type appium driver list I get:
- Listing available drivers
√ Listing available drivers
- [email protected] [installed (NPM)]
- uiautomator2 [not installed]
- xcuitest [not installed]
- youiengine [not installed]
- mac [not installed]
- mac2 [not installed]
- espresso [not installed]
- tizen [not installed]
- flutter [not installed]
The driver of what you are referring to?
Thanks!
@liljohnak can you please advise on that issue? thanks
@liljohnak coding lang is Python, and my current webdriver (wd) is 1.14.0, I was installing it with npm.
I tried version 1.12.1 but it did not help, same error
@liljohnak Python client does not have any 5 version, that is only for C#. @bwomsm1 please downgrade the appium python client to version 2.3.0 and check. Also what argument are you passing in the action chain webelement or driver.
I think you need to downgrade to appium version 1.

more information can be found at
@anunay1 tried as you suggested but I'm getting the following error message:
failed: ModuleNotFoundError: No module named 'selenium.webdriver.common.options'
Python modules: Appium-Python-Client==2.3.0 selenium==3.141.0
Please advise how to proceed
@anunay1 downgrading to appium 1.3.0 or 2.3.0 did not solve the issue, when downgrading to these low releases I am getting errors that some webdriver libraries are not supported, like AppiumBy or options, my framework is based on these libs.
Can you please advise? Thanks.
@bwomsm1 It sounds stupid but can you try uninstalling and reinstalling the python appium client.
:) not stupid at all, I think I understand why you are saying so.
I tried this as well, but it did not help.
I have a feeling that is has to do with my setuptools==65.3.0 version, does this version is correct?
@bwomsm1 Can you please check from appium.webdriver.common.touch_action import TouchAction import the library
actions = TouchAction(driver)
actions.move_to(ele).perform()
actions.tap(ele)
@anunay1 tried as you suggested but I'm getting the following error message:
failed: ModuleNotFoundError: No module named 'selenium.webdriver.common.options'
Python modules: Appium-Python-Client==2.3.0 selenium==3.141.0
Please advise how to proceed
For what purpose you need this module?
from appium.webdriver.common.touch_action import TouchAction import the library
@anunay1 with TouchAction it did work :-) but not exactly to what I was referring to.
I wanted to move the mouse pointer to some element, your suggestion did work but also performed click on the element. I also tried with removing the last line actions.tap(ele)
What is the rule here? when do I use TouchAction and when ActionChains
as far as I know TouchAction is for Appium and mobile.
There is no rule as such, this is just a work around unless win app driver is W3C compliant
There is no rule as such, this is just a work around unless win app driver is W3C compliant
ok, but still I was not able to perform "mouse pointer move" with TouchAction, it seems like I still need ActionChains.
Are you able to use ActionChains on your local?
I don't understand what you are referring to, you need to move to the element and click the element or else something else or just move to the element.
Just move the mouse on some element, without clicking.
My test case is that I have some element that once the mouse is on it, a popover is being presented, I would like to simulate that case.
For example the text "Click or press alt+enter", it's showing only when a mouse is on some element
In addition, I am not sure how I can perform right click with TouchAction?
S @.***
Sent from my Galaxy
-------- Original message -------- From: ANUNAYA THAKUR @.> Date: 9/11/22 8:35 AM (GMT-08:00) To: microsoft/WinAppDriver @.> Cc: Jonathan Neal @.>, Mention @.> Subject: Re: [microsoft/WinAppDriver] "WebDriver' object has no attribute 'w3c'" error is raised when using ActionChains (Issue #1784)
@bwomsm1https://github.com/bwomsm1 Can you please check from appium.webdriver.common.touch_action import TouchAction import the library
actions = TouchAction(driver)
actions.move_to(ele).perform()
actions.tap(ele)
— Reply to this email directly, view it on GitHubhttps://github.com/microsoft/WinAppDriver/issues/1784#issuecomment-1242989476, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AE6MNO4IGJC2URDVVVZU36DV5X32VANCNFSM6AAAAAAQEGQRQU. You are receiving this because you were mentioned.Message ID: @.***>
@anunay1 @liljohnak any updates about this ticket?
Can we say that currently ActionChains is not supported for WinAppDriver testing?
So I've spent entirely too long working on this, you'll need to move back to at least appium-python-client 1.3.0 and selenium 3.14.1. You'll need to revert your AppiumBy back to MobileBy and options back to desired capabilities. They've completely removed the ability to use the old json format in the new versions and you won't be able to upgrade one without the other (some converters have been completely ripped out)
Hopefully when they one day update the WinAppDriver it'll support the new w3c standard.
@anunay1 any news about this ticket?
As I said in the past I cannot downgrade to older versions of Python.
Are you guys about to solve the w3c issue?
Current 5.0 Appium is using w3c. It is a TODO for the next WinAppDriver release. To fix your problem you'll need to downgrade.
@liljohnak can you share when the next release with w3c fix will be available?
Per @DHowett: https://github.com/microsoft/WinAppDriver/issues/1610#issuecomment-944544522 fix is in the works... But, this project had a fast start and now hasn't had any updates since. @DHowett could get us a better guess than I can.
(This is in a shelved changeset on my machine, as things have been unexpectedly busy since I started working on it.)