-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
element.getCSSProperty(property) returns null for Firefox #6161
Comments
As the protocol states:
which means the browser tries to run the following script: getComputedStyle(document.querySelector('.fixedHeaderContainer')).background which results in Chrome to:
and in Firefox to and empty string ( I agree here, that the behavior is inconsistent though not caused by WebdriverIO as it is not defined in the CSS spec. See also this bugzilla ticket. I will propose a change to default to |
The related issue in the CSS-WG spec is w3c/csswg-drafts#2529. I will close this. I don't think my idea mentioned above isn't a sufficient solution given this doesn't only apply for |
Actually this is stated in the docs:
|
Created a pull request to improve the behavior. |
@christian-bromann Hi, can you please help out?
Then I am trying to verify the color with
The test passes. But it returns null. How would you do it? |
Environment:
"@wdio/cli": "^6.5.2",
"@wdio/local-runner": "^6.5.2",
"@wdio/mocha-framework": "^6.4.0",
"@wdio/sauce-service": "^6.6.7",
"@wdio/spec-reporter": "^6.4.0",
"@wdio/sync": "^6.4.5",
]
Config of WebdriverIO
Describe the bug
The method
element.getCSSProperty('background')
returns null for Firefox instead of the object with expected properties.The firefox output
The same test to run on Chrome 86.0.4240.198 Windows 10
The text was updated successfully, but these errors were encountered: