Page 1 of 1

iOS mobile web, button is clicked but nothing happens.

Posted: Sat Sep 16, 2017 11:34 pm
by Harsh
Hi,
My setup is mobile website on rxbrowser on a ipad.
I am attempting to click on a 'Login!' button. Ranorex clicks on this button successfully but no further action happens.

Snapshot is attached.

Thanks in advance to everyone for help.
Harsh

Re: iOS mobile web, button is clicked but nothing happens.

Posted: Mon Sep 18, 2017 3:47 pm
by asdf
Hi Harsh,

Unfortunately, there is not much you can do to analyze this issue without the application under test.
I would suggest requesting a support query to [email protected] and send them your *.ipa file.

Best regards,
asdf

Re: iOS mobile web, button is clicked but nothing happens.

Posted: Tue Sep 19, 2017 3:45 pm
by Harsh
Ok, Thank you.
I will do so.

Re: iOS mobile web, button is clicked but nothing happens.

Posted: Wed Sep 20, 2017 10:24 pm
by Harsh
Ok, Here's the update.

This is happening on rxbrowser(mobile website), not a mobile app.

I can enter the data in the input field (username and password fields) but the validator is finding the values empty.

The url is u2-ts5-qa.egatesoln.com

Username value: abc
Password value: abc

When I login manually with above values and click on login button, I get an error saying the credentials are incorrect (as expected).

But when I do the same with ranorex, it inputs the credentials and clicks on login button, but the validator sees no values and hence clicking on login button does not even gives the incorrect credentials error.

A new snapshot is attached.

Thank you, everyone, in advance for your help.

Re: iOS mobile web, button is clicked but nothing happens.

Posted: Thu Sep 21, 2017 7:20 am
by odklizec
Hi,

I think your problem is most probably caused by not triggered event while using SetValue action. I think there must some onsomething (oninput, ontype, etc...) script associated with the mentioned input fields? As far as I remember (I'm not doing mobile testing for some time), SetValue action simply enters the values, without triggering any event. I believe it works the same on desktop, so it must be used with caution.

Re: iOS mobile web, button is clicked but nothing happens.

Posted: Thu Sep 21, 2017 4:55 pm
by Harsh
Thank you for your reply.

The issue arises because an event listener is not properly getting fired when Ranorex interacts with the page, and this is not a problem because we can fire the event listener ourselves using ExecuteScript method.

This will work almost the same if you are working in a recording module, or if you are working in user code. You just need to perform the ExecuteScript after you enter the username, and the password.

public void ExecuteScriptOnPage()
{
var dom = repo.Browser.Dom;
dom.Self.ExecuteScript("$(\"#username\").change();");
dom.Self.ExecuteScript("$(\"#password\").change();");
}