Hi,
I am having troubles on locate an element not on the screen using the following command
driver.ExecuteScript("seetest:client.swipeWhileNotFound(\"Down\", 0, 2000, \"NATIVE\", \"xpath=[elem_to_be_found]\", 0, 1000, 5, true)");
The problem is, the element is found but the click is not performed. So the command finds the element but is unable to click it.
I’ve tried a solution proposed on this discussion (I report a modified version of the code here)
AppiumWebElement elemToclick;
while(1==1)
{
driver.ExecuteScript("client:client.swipe(\"Down\", 30, 500)");
elemToclick = driver.FindElementByXPath(itemXPath)
if(elemToclick.Displayed)
break;
}
elemToclick.Click();
wait.Until(ExpectedConditions.ElementExists(By.XPath([Page_To_Appear_After_the_click])));
The element seems to be found and clicked but neither the element appear on the sceen nor the effect of the click is visible. Meaning the page that should appear after the click is not loaded on the sceen.
I know an element is found even if is not visible on the sceen but the condition
if(elemToclick.Displayed)
is supposed to make the swipe to continue until the element is actually visible, isnt’ it?
Anyway, this does not pruduce the effect I wanted, which is
swipe the screen until the element is actually visible
click on the element
make the click effect visible on the sceen
any ideas?