Comments (5)
Sounds good to me, admc?
from wd.
Yeah all of these sound reasonable, any idea of ruby and python do this? I would overall like to have similar behavior between the projects.
from wd.
I googled around the ruby behavior, and It probably throws a 'Not Found' exception. That would make sense since sending exception around has a big impact on performances (even more when using Sauce Labs), the whole page being included, so best not to encourage users to do it.
So best would probably to keep the element methods as if, and add hasElement and elementOrNull methods which are implemented using the elements (with s) method which just return an empty if the element do not exists.
Concerning the parameter default, this is part of JsonWire spec. I didn't noticed, but those kind of issues where fixed 2 days ago when I reformatted the code. This was due to the callback being identified as the 4th argument (in moveTo) before, and now the builder automatically looks in the last argument and finds it, no matter how many arguments. So I just wrote extra unit tests for these case and that's it.
from wd.
Fantastic, I agree that sending entire exceptions and page content across the wire is a terrible idea. So lets keep things the way they are and go with adding a couple methods (hasElement and elementOrNull) to take care of the needed functionality.
Thanks for starting the convo!
from wd.
Ok done, added see element/elements section in the doc.
Also made it generic to add/test this kind of element function in the future.
Seb.
from wd.
Related Issues (20)
- waitForElementByXPath/id/name does not poll as per the poll frequency provided.
- I need help getting Android to Scroll WD Appium HOT 14
- How to select spinner value in wd
- synchronous REPL mode?
- promiseChainRemote does not allow https HOT 1
- execute script with arguments not work
- 404 HTTP appium No route found HOT 1
- Running test suites
- promiseChainRemote do not work
- can't work with selenium grid
- WaitForElement -functions do not apply timeout on element lookup
- Consider removing request (as it is deprecated) HOT 1
- Two vulnerabilities are introduced in the package HOT 3
- client.moveTo() is not working on latest version of word 2106 HOT 1
- WD does not get the session id with appium. HOT 1
- is v1.14.0 tag missing?
- Getting 'npm ERR! Cannot read properties of null (reading 'pickAlgorithm')' when running `npm install wd` HOT 1
- [Appium] W3C capabilities should be provided HOT 1
- Missing typescript support HOT 1
- Request has been deprecated and is raising security vulnerabilities HOT 1
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 wd.