I'm going to be perfectly honest and say in my 30 years of manual and automated testing I find automating manual test cases for mobile devices a waste of time. The time and $$ involved in creating and maintaining the test suites, considering their relatively short shelf life, is better spent buying a few of the most popular devices and writing comprehensive ...
If you want to click the element, then you have use the button tag:
the xpath for the highlighted '+' sign is
(//div[@class="traveler-selector-room-data target-clone-field"]//button[@class="uitk-step-input-button uitk-step-input-plus"] )
you can just change the number to 2, or 3 to get the other two.
Approach i took:
1) Find the parent element which ...
Welcome to the site.
It seems the structure is a bit unclear because with "Adults" there's no "div wrapper" like there's with e.g. "Children":
So I found it easier to define it using not():
//div[@class="traveler-selector-room-data target-clone-field"]/div[not(contains(@class, "children")) and not(contains(@class, "infants"))]//button[contains(@class, "...
Just as a general advice, try to subdivide your application when lookin for selectors. I'll try to explain using the css selector since those tend to be a) more performant, b) more readable and c) allow you to transfer it to xpath on your own.
#traveler-selector-hp-package .traveler-selector-room-data>div:not(.children-wrapper):not(.infants-wrapper) ...
When querying Android apps with Xpath there is no id attribute. There is a resource-id attribute instead. Appium is doing work behind the scenes to still provide By.id as a locator despite this.
If you don't use contains here, you'll need to put in the full resource-id, which is very long.