Skip to content
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

Could not find selector error for element which is present. #82

Open
Eshakk opened this issue Feb 18, 2020 · 1 comment
Open

Could not find selector error for element which is present. #82

Eshakk opened this issue Feb 18, 2020 · 1 comment

Comments

@Eshakk
Copy link

Eshakk commented Feb 18, 2020

Hi,

In Mac desktop app, I'm trying to right click on an element using below code:

actions = new Actions(driver);

WebElement participantElement = driver.findElementByXPath("/AXApplication/AXWindow[@AXTitle='application name' and @AXSubrole='AXStandardWindow']/AXSplitGroup[0]/AXScrollArea[0]/AXOutline[0]/AXRow[@AXSubrole='AXOutlineRow']/AXCell[0]/AXStaticText[@AXValue='" + pName + "' and @AXIdentifier='plist_" + pName + "']");
actions.moveToElement(participantElement).contextClick();
actions.perform();

I'm getting this error:

[HTTP] --> POST /wd/hub/session/5e81a7de-3904-4e2d-8661-db5a58ca398c/actions
[HTTP] {"actions":[{"id":"default mouse","type":"pointer","parameters":{"pointerType":"mouse"},"actions":[{"duration":100,"x":0,"y":0,"type":"pointerMove","origin":{"ELEMENT":"17","element-6066-11e4-a52e-4f735466cecf":"17"}},{"button":2,"type":"pointerDown"},{"button":2,"type":"pointerUp"}]}]}
[W3C (5e81a7de)] Driver proxy active, passing request on via HTTP proxy
[debug] [WD Proxy] Matched '/wd/hub/session/5e81a7de-3904-4e2d-8661-db5a58ca398c/actions' to command name 'performActions'
[debug] [WD Proxy] Proxying [POST /wd/hub/session/5e81a7de-3904-4e2d-8661-db5a58ca398c/actions] to [POST http://127.0.0.1:4622/wd/hub/session/wzFFaQv4/actions] with body: {"actions":[{"id":"default mouse","type":"pointer","parameters":{"pointerType":"mouse"},"actions":[{"duration":100,"x":0,"y":0,"type":"pointerMove","origin":{"element-6066-11e4-a52e-4f735466cecf":"17","ELEMENT":"17"}},{"button":2,"type":"pointerDown"},{"button":2,"type":"pointerUp"}]}]}
[debug] [WD Proxy] Got response with status 200: {"status":9,"sessionId":"wzFFaQv4","value":{"message":"Could not find selector (post_actions:data:) for path '/session/wzFFaQv4/actions'."}}
[WD Proxy] The response has an unknown format
[debug] [W3C (5e81a7de)] Encountered internal error running command: ProxyRequestError: Could not proxy command to remote server. Original error: The request to /wd/hub/session/5e81a7de-3904-4e2d-8661-db5a58ca398c/actions has failed
[debug] [W3C (5e81a7de)]     at JWProxy.proxy (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/lib/jsonwp-proxy/proxy.js:222:13)
[debug] [W3C (5e81a7de)]     at ProtocolConverter.proxyPerformActions (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/lib/jsonwp-proxy/protocol-converter.js:187:9)
[debug] [W3C (5e81a7de)]     at ProtocolConverter.convertAndProxy (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/lib/jsonwp-proxy/protocol-converter.js:218:16)
[debug] [W3C (5e81a7de)]     at JWProxy.proxyCommand (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/lib/jsonwp-proxy/proxy.js:258:12)
[debug] [W3C (5e81a7de)]     at JWProxy.proxyReqRes (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/lib/jsonwp-proxy/proxy.js:308:36)
[debug] [MJSONWP] Matched JSONWP error code 9 to UnknownCommandError
[HTTP] <-- POST /wd/hub/session/5e81a7de-3904-4e2d-8661-db5a58ca398c/actions 404 4 ms - 647

Can someone please help me figure out how to perform a right click in Mac using appium ?

Thanks!

@milindmaha
Copy link

I'm struggling with similar issue. Did you find a way to get rid of this @Eshakk?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants