How to use “if” operator for Appium tests
问题 I need to check if button with title "title_I_need" exist. And if exist to press it if not press another one. All this stuff in javaScript. What I did I recorded in Appium.App test and added verification if button exist. As I'm not familiar with JavaScript to much I started with Objective-C. But as a result it always clicks title_I_need button but my expectation is else branch with other_title button. Can I do such check with Appium? If yes, How can I do this with JavaScript (node.js)?