Replies: 2 comments 1 reply
-
I dont like globals that much ... What about putting the line So, when the user starts typing $ui5 vscode imports it automatically by adding import { $ui5 } from "wdio-ui5-service" For the programmer it is no real difference for the shorthand but we avoid the global. |
Beta Was this translation helpful? Give feedback.
-
ui5$(selector), so that we follow what looks like a standard placement for $. Personally i dont mind a global or not global short hand selector. The only comment on that would be that if you have worked with react$ and it is global, it may be a bit confusing that ui5$ is not. I find it more important to follow the standards that are set. |
Beta Was this translation helpful? Give feedback.
-
Hi colleagues,
recently some v-Coffee-Hall™ discussions happened around the primary entry into the
wdi5
API:browser.asControl()
.The original (and still valid) notion was to be DevX-compatible with UIveri5's
element(by.control(selector))
.Yet there is
wdio
's$(...)
shorthand forbrowser.findElement(...)
https://webdriver.io/docs/api/element/$$(selector).react$()
for querying React Components https://webdriver.io/docs/api/element/react$$(selector).shadow$(selector)
for getting into the shadow DOM of web components https://webdriver.io/docs/api/element/shadow$Now here's the q:
Should we do
ui5$(selector)
or$ui5(selector)
forbrowser.asControl(selector)
?Thanks for your opinions @ArnaudBuchholz @dominikfeininger @nicoschoenteich @monavari-lebrecht @hmanchev @aiopa @SebastianWolf-SAP !
Beta Was this translation helpful? Give feedback.
All reactions