Why don’t you find the ‘Do Laundry’ element and then just click then next check box. There are 2 solutions in this link, I’m sure you can search up more:
+1 the suggestion by @wreed to get the next element after the “Do Laundry” text. You might ask the developers to dynamically add ID’s if this list never really changes. But for this kind of listing job, it should be stable enough to select element “next to”, since if it ever breaks, it will break for all the elements in the grid anyway.
Hi Wreed thanks for the reply. I just started appium learning. I know how it works in selenium but not getting in appium. Could you please eloborate the ‘Do laundry’ element ?
you want to go and open inspector and show us the xml for the 2 elements, basically the outer element will be a row I suspect - like I highlight in yellow
Then you need to read up on the specific selectors. This is one of the better “short guides” https://www.lambdatest.com/blog/most-exhaustive-xpath-locators-cheat-sheet/ , just scroll down a ways. If you “paste” the XML for the nodes into the thread, we can take a guess at an xpath that will give you some clues. Inspector lets you test an xpath, so you can build one and try it. It’s going to look a lot like :
Thank you Somehow i am able to achieve it by using Xpath
driver.find_element(By.XPATH, “//*[@class=‘android.widget.CheckBox’ and @bounds=’[525,865][615,949]’]”)
But my question is bound value is constant for device to device? As i am testing it on a real device.
@wreed yes i read and tried, but could not succeed. I am still learning appium. In Selenium somehow i can able to use all the above methods. But in mobile it’s a little difficult. I am learning and thanks for the response.