robotframework-appiumlibrary icon indicating copy to clipboard operation
robotframework-appiumlibrary copied to clipboard

[iOS] Keyword "page should contain element" return true but keywords "get element location" and "get element size" did not match any elements.

Open lolotoms opened this issue 8 years ago • 2 comments

Hi,

I use robotframework 3.0.2, appiumLibrary 1.4.5, python 3.5 and I have to run tests on iOS 10.3. Each time I validate a page, I take a screenshot. So I have to be sure that researched element is completely visible on the screen before take the screenshot. To do this I have to recover element coodinates and size to calculate that it is on the screen.

So my first step is to call "Page should contain element" keyword. If this keyword return True, then I have to recover element coordinates and size. But if the element is on top of the screen and appear just a little bit then coordinates are negatives and "get element size" and ''get element location" return

ValueError: Element locator '[LOCATOR]' did not match any elements.

and the test fails.

I don't have this issue with android which works fine.

lolotoms avatar Sep 04 '17 08:09 lolotoms

I have addressed this issue with new keyword

Element Should Be Visible

can you test with this instead of Page Should Contain element

serhatbolsu avatar Sep 26 '17 20:09 serhatbolsu

@lolotoms would you be able to share your code for all the keywords? Especially Open Application.

FullStackChad avatar Oct 06 '17 20:10 FullStackChad

Closing due to inactivity

serhatbolsu avatar Oct 27 '22 08:10 serhatbolsu