-
-
Notifications
You must be signed in to change notification settings - Fork 6k
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
ActionChains perform returns exception 'value' must be a single unicode point #12255
Comments
I guess https://github.com/SeleniumHQ/selenium/blob/11c25d75bd7ed22e6172d6a2a795a1d195fb0875/py/selenium/webdriver/common/action_chains.py#L105-L106 is related to the error. What about below?
In Ruby client, for example, just call the command (does not call |
I have no idea why Python lib adds this unnecessary stuff into the call on its own. Try to build the actions chain on your own instead of using all these weird high-level wrapper methods |
Please create an issue to Python selenium lib or to chromedriver. There is nothing to do here in Appium for now. |
SeleniumHQ/selenium#7000 (comment)
as a log. thanks for reporting to the repo. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
The problem
While attempting to perform ActionChains(driver).move_to_element(element).click().perform()
I received the following exception:
selenium.common.exceptions.InvalidArgumentException: Message: invalid argument
from invalid argument: 'value' must be a single unicode point
Note that I was getting the same error as described in issue 12161
#12161
but when I moved up to 1.11.1, I now started getting this new error.
Environment
Details
In an Hybrid app my Move to element and click used to work and at some point stopped. I was getting the same error as described in issue#12161, but when I moved up to 1.11.1 where the fix
appium/appium-base-driver#302
was applied, I started getting this new error.
I am using Appium Python Client: 0.38
Link to Appium logs
https://gist.github.com/jvanyo/c0ac24ba076ddc6c8669a115d2e8cbf4
Code To Reproduce Issue [ Good To Have ]
Although the problem affects me in an Hybrid app, I can reproduce it by just using Chrome on the Android device using the following python code:
from appium import webdriver
from selenium.webdriver.common.action_chains import ActionChains
import time
import traceback
desired_caps = {}
desired_caps['platformName'] = 'Android'
desired_caps['platformVersion'] = '9'
desired_caps['deviceName'] = 'XXXX'
desired_caps['newCommandTimeout'] = '300'
desired_caps['automationName'] = 'UIAutomator2'
desired_caps['browserName'] = 'Chrome'
driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps)
driver.get('http://appium.io')
driver.context
element = driver.find_element_by_xpath("(//span[text()='Toggle navigation'])[1]")
element.text
The following click will fail because another element would receive the click
try:
print('Trying element.click(). It will fail as expected.')
element.click()
except Exception:
print(traceback.format_exc())
The following move_to_element click should work because I am moving to the location, but it fails.
try:
print('Trying move_to_element(element).click().perform() with W3C')
ActionChains(driver).move_to_element(element).click().perform()
except Exception:
print(traceback.format_exc())
time.sleep(5)
driver.close_app()
If I force JSON, the move_to_element.click will work.
desired_caps['forceMjsonwp'] = 'true'
driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps)
driver.get('http://appium.io')
driver.context
element = driver.find_element_by_xpath("(//span[text()='Toggle navigation'])[1]")
element.text
The following click will fail because another element would receive the click
try:
print('Trying element.click(). It will fail as expected.')
element.click()
except Exception:
print(traceback.format_exc())
The following move_to_element click now works because I am using JSON instead of default W3C
print('Trying move_to_element(element).click().perform() with JSON')
ActionChains(driver).move_to_element(element).click().perform()
time.sleep(5)
driver.close_app()
The text was updated successfully, but these errors were encountered: