-
-
Notifications
You must be signed in to change notification settings - Fork 410
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
feat: CSS selector for iOS #1274
Conversation
It would make sense to add this locator to README |
@mykola-mokhnach the README.md doesn't talk about selectors. I'll add this to the Appium site docs. |
@@ -0,0 +1,61 @@ | |||
import chai from 'chai'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
*/ | ||
function parsePseudo (cssPseudo) { | ||
if (cssPseudo.valueType && cssPseudo.valueType !== 'string') { | ||
throw new Error(`'${cssPseudo.name}=${cssPseudo.value}'. ` + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TypeError
iosClassChainSelector += `/${parseCssRule(cssRule.rule)}`; | ||
} | ||
|
||
if (cssRule.nestingOperator === '>') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about using a ternary operator?
if (cssRule.nestingOperator === '>') { | ||
return iosClassChainSelector; | ||
} else { | ||
return `**/` + iosClassChainSelector; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
`**/${iosClassChainSelector}`
# [3.36.0](v3.35.1...v3.36.0) (2021-02-01) ### Features * CSS selector for iOS ([#1274](#1274)) ([047d3a8](047d3a8))
🎉 This PR is included in version 3.36.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
# [3.36.0](appium/appium-xcuitest-driver@v3.35.1...v3.36.0) (2021-02-01) ### Features * CSS selector for iOS ([appium#1274](appium#1274)) ([047d3a8](appium@047d3a8))
Copies the same logic as what was done in UiAutomator2 Driver but makes some changes to make it work with iOS Class Chain.