Comments (13)
This is a workaround however an empty hash is returned instead of the expected WebDriver element.
> a = $driver.execute_script "au.lookup('secure').concat(au.lookup('textfield'));"
post
session/c208210e-59b3-4e58-bbb1-47b6feb5cd38/execute
{"script":"au.lookup('secure').concat(au.lookup('textfield'));","args":[]}
=> [{}, {}]
> a.first.value
NoMethodError: undefined method `value' for {}:Hash
> a
=> [{}, {}]
> a.first
=> {}
> a.first.class
=> Hash
from appium.
This sort of works, however it doesn't let me combine lookups.
s = %(
var e = au.lookup('textfield');
au._returnElems(e);
)
execute_script s
from appium.
I figured it out.
s = %(
var t = au.lookup('textfield');
var s = au.lookup('secure');
var r = $(t.concat(s));
au._returnElems(r);
)
execute_script s
from appium.
This is what I had to do to get textfield working cross platform.
from appium.
That's a clever workaround, however it would be nice to support |
in the subset of xpath syntax. I'm confused why you didn't get a more meaningful error--you should have gotten something like "XPath selector could not be parsed" or something like that. That's the first thing to fix, then we can talk about adding |
.
from appium.
That's a clever workaround, however it would be nice to support |
I agree. I just need something working immediately.
That's the first thing to fix, then we can talk about adding |.
👍 I was surprised that it crashed.
from appium.
It doesn't crash anymore now.
from appium.
Does it give a nice error?
from appium.
Does it give a nice error?
Yes. It's slightly different on iOS and Android.
Selenium::WebDriver::Error::XPathLookupError: Could not parse xpath data from //textfield | //secure
vs
Selenium::WebDriver::Error::XPathLookupError: An error occurred while searching for an element by XPath.
Much better than crashing.
from appium.
I think it might be better to turn this into a feature request by adjusting the issue title.
from appium.
Is this closed by f78cee9 et al?
from appium.
Yes
from appium.
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.
from appium.
Related Issues (20)
- Is there a way or any desired capabilities in which we can stop Appium from launching the app after installation. HOT 1
- How to get bundleId dinamically? HOT 2
- My automation tests are flaky- get alert text returns empty string sometimes HOT 7
- bug: updating appium, driver or plugin, is not synchronized in node_modules/.cache/appium/extensions.yaml HOT 6
- Issue when perform gestures on both Android and iOS HOT 3
- [Feat]: introduce getContextsWithDetails endpoint HOT 4
- bug: Scroll on Android don't work HOT 1
- [Feat]: Can I specify my own registry in "appium driver install --source=npm" HOT 4
- universal-xml plugin issue with webview mode HOT 7
- Appium server crashes and shuts down on first test HOT 20
- Real device architecture is not supported application after upgraded xcuitest driver to 7.15.1 HOT 6
- Nothing happen after Responding to client with driver.createSession() HOT 6
- Delete key on iOS keyboard is not working HOT 10
- [Feat]: Support for custom usbmuxd socket path or url HOT 1
- "Error:Appium Settings app is not running after 30000ms" while running emulator in headless in Android version 13 and 14 HOT 3
- bug: XCUITest-driver invalid platform detection when ipa have more than 1 bundle HOT 3
- Unable to resolve the launchable activity of 'com.google.android.youtube' HOT 8
- Appium accessibility id's different on android to iOS HOT 1
- bug: Appium Inspector loads some app screens slowly/not at all HOT 1
- Possible bug - I get certain errors ONLY when "isHeadless" is set to true HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from appium.