Comments (2)
Maybe you need smth like a Shadow DOM selector library?
If I search on NPM, I find a few. Does any of them solve it for you?
https://www.npmjs.com/search?q=shadow%20dom%20selector
from web.
@bashmish, thanks a lot!
Sometimes you just need someone to help you mind think in the right direction, today you were that person to me 😀
I tried both the packages below and they work in similar ways, making it possible to query for a nested element inside the shadowDom like so:
elmButtn1 = querySelectorDeep('my-button') as MyButtonElement;
query-selector-shadow-dom
https://www.npmjs.com/package/query-selector-shadow-dom
kagekiri
https://www.npmjs.com/package/kagekiri
As for the other thing that I was looking for, basically to be able to ask "is this text on the screen", it seems to be possible with this API: https://developer.mozilla.org/en-US/docs/Web/API/Window/find
window.find('ashowdialog',false,false,true,false,true,true)
Feels like I just need to add some wrappers to make the tests more readable.
Thanks for helping out!
from web.
Related Issues (20)
- mergeConfigs should merge objects recursively HOT 1
- Cannot find module web-dev-server.config.mjs
- msw dependency throws error HOT 1
- Browserstack launcher: "WebDriver Error: Timed out waiting for asyncrhonous script" on iOS devices
- [rollup-plugin-html] Expose `html-minifier-terser` options HOT 1
- babel-plugin-istanbul plugin is not identified when running web-test-runner command HOT 4
- getBoundingClientRect() gives different values on test run vs. in browser HOT 1
- Coverage not generated when we are using babel with custom browser [locally]
- Test Runner config rootPath is resolved relative to cwd, not the path of the config
- Test Runner 'manual' mode import path is not relative to rootPath
- Update @web/dev-server-esbuild dependencie esbuild to v0.21 HOT 2
- Contributing guide uses npm, GitHub actions use Yarn HOT 1
- [@web/test-runner] Tests do not finish when asserting frozen objects
- Node tests failing on Windows
- Out-of-date instruction to use run-playwright-tests HOT 1
- @web/rollup-plugin-import-meta-assets: Types not part of the exports declaration in package.json
- How can I set the browser's locale when using the Web Test Runner with Playwright?
- TypeError: URL.canParse is not a function HOT 1
- [dev-server] CVE-2024-29415: "ip SSRF improper categorization in isPublic" HOT 16
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 web.