iOS XCUITest predicate strings

Im executing iOS XCUITest predicate strings using webdriverIO for Browser stack sample ios app.
but this method seems to not work to find elements/Interact .

My code :
et selector = type == 'XCUIElementTypeLink' && enabled==1 && visible==0 && rect.width==20;
let Switch = await $(-ios predicate string:${selector})
(await Switch).waitForDisplayed({ timeout: 30000 });
(await Switch).click();

Error :ReferenceError in “Text Verification should match displayed text with input text”
Cannot access ‘Switch’ before initialization.
Can anyone help me with this
Thanks in advance :slight_smile:error1

  1. try replace && -> AND
  2. ‘rect.width’ is some strange attribute

there is ‘width’ e.g. what i see from pageSource of some el:

<XCUIElementTypeScrollView type="XCUIElementTypeScrollView" enabled="true" visible="true" x="52" y="379" width="271" height="44">