Comments (8)
@kokujin Do you have a better idea for ensuring a unique path to the element? I'm sure there's a smarter way to do it, just haven't had time to think it over.
from daydream.
Maybe it would be smart to introduce a configuration where you can specify how the selectors will be calculated? With options like:
- the dept of the selector - something like
up to lvl 3 parents
, etc. - list of classes to ignore
- ignore parents at all if there is an
id
attr
from daydream.
I think that would open a can of worms @michalbe , It would be best it it would just automatically generate the shortest, most optimized selector.
Think about the scenario of allowing non technical users in a QA department.
from daydream.
Have you thought about using a third party lib to generate the electors @stevenmiller888 ? for example, https://www.npmjs.com/package/css-selector-generator, from the description:
it also generates shorter selectors and is faster and/or more robust than many other libraries - see this comparison and select the best alternative for your use case.
from daydream.
https://github.com/autarc/optimal-select is also an option to generate short selectors
from daydream.
Not sure if the first one is a good choice, apparently the lib has some infinite loops bugs inside.
There is a benchmark for this already: css-selector-generator-benchmark
from daydream.
RE @michalbe I'd love to also specify a black list of selectors.
A few "bad" selectors mess really mess my tests up.
from daydream.
@stevenmiller888 the pull request #32 has already solved this and I think this can be closed. In all my testing I haven't experienced any issues with long selectors.
from daydream.
Related Issues (20)
- error : TypeError: Path must be a string. Received undefined HOT 1
- Record mousemove and scrolling events? HOT 1
- Unable to record more than one action each time HOT 8
- why can't i see the code being gnereated inside the day dream icon while its working ? HOT 1
- Analytics.js
- Content script execution problem?
- Can I run daydream in electron app?
- add puppeteer support
- Cannot record login at cibc.com
- Add puppeteer inside the Chrome extension details
- not capturing typing on input or clicks on search buttons HOT 1
- Background page access errors
- ASI hazard in puppeteer output?
- Used to work great but not anymore HOT 18
- Support for additional input types. HOT 3
- I'm building a follow up to Daydream specifically for Puppeteer HOT 2
- Does not track events anymore HOT 1
- How to use your extension?
- Google Chrome Download link is broken HOT 7
- the extension is broken on the browser HOT 3
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 daydream.