mykola-mokhnach / Appium-iOS-Inspector

Apache License 2.0
145 stars 60 forks source link

popup message element can not be found #24

Closed BeggarMainFact closed 6 years ago

BeggarMainFact commented 6 years ago

Env:

  1. Xcode: 8.3
  2. Appium1.6.5
  3. Appium-iOS-Inspector
  4. iphone7(ios10.2)

can not find element which is a pop up message.

in my application, when I click one button, there is a message will be pop up, and it has a Accessibility ID: leftPopupMessage , when I try to find this element by id or xpath, it can not be found.

BeggarMainFact commented 6 years ago

elementid

BeggarMainFact commented 6 years ago

the scenario is: when click button (2), the (1) pop up message will showup. I could find element2 by id by appium, but I can not element1 by appium.

mykola-mokhnach commented 6 years ago

There might be a race condition. Try to wait until the element is present (because, as you can see, it's visible attribute is false).

BeggarMainFact commented 6 years ago

@mykola-mokhnach Thanks for quick response! I wait for about 80s, the visible is still false, and you could see the element have been there indeed. do you have any advise about when the visible will be true? I am thinking whether the developer code has some problem that did not change correct attribute for this element. whether it need developer to set the visible attribute when the element is loaded?

mykola-mokhnach commented 6 years ago

Yes, it's more likely a dev issue that visible property of this element is set to false.