question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature] Add accessor for easy access to CSS properties of Locator

See original GitHub issue

Please add an accessor for easy access to CSS properties. Now this: page.locator("div").evaluate("e => window.getComputedStyle(e).color")

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:9
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

6reactions
saurabh4888commented, Mar 21, 2022

It would be more helpful if possible to implement in same way as done in protractor ,

getCssValue(cssStyleProperty: string): promise.Promise<string>;

3reactions
unickqcommented, Aug 10, 2022

➕ for getCssValue()

@mxschmitt await expect(locator).toHaveCSS('display', 'flex'); is cool thing, but it can be good to check that value changed.

let beforeSize = await locator.getCssValue("size");
await expect(locator).toHaveCSS('size', beforeSize);
// do some actions
await expect(locator).not.toHaveCSS('size', beforeSize);
Read more comments on GitHub >

github_iconTop Results From Across the Web

Introduction to locator properties and options—ArcGIS Pro
Access the locator properties. Right-click the locator you want to modify in the Locators folder or in a folder connection in the Catalog...
Read more >
CSS Selectors Reference - W3Schools
Selector Example Example description .class.intro Selects all elements with class="intro" #id #firstname Selects the element with id="firstname" * * Selects all elements
Read more >
No value accessor for form control [duplicate] - Stack Overflow
You are adding the formControlName to the label and not the input. You have this: <div > <div class="input-field col s12"> <input id="email"...
Read more >
Features In-Depth | Less.js
This means that, unlike other CSS pre-processing languages, Less variables behave very much like CSS's. Properties as Variables (NEW!) v3.0.0. You can easily...
Read more >
Property binding - Angular
To bind the src property of an <img> element to a component's property, place src in square brackets followed by an equal sign...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found