mirror of
https://github.com/appium/appium.git
synced 2026-02-07 01:58:55 -06:00
When setCompressedLayoutHeirarchy is enabled, views not marked as important to accessibility are discarded. This must be enabled for XPath and page source to work. If it's left enabled then it's not possible to find unimportant elements via other locator strategies. If discard is toggled back to false at the end of an XPath request it will break XPath. To safely set discard to false, the code waits for the next find request that doesn't use XPath. Thanks @paymand for figuring out how to make this work!