Autopilot does not type : (colon) on devices

Bug #1181216 reported by Omer Akram
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Autopilot
Fix Released
Critical
Ricardo Mendoza

Bug Description

While running webbrowser-app tests on device it seems autopilot is not able to type colon into the address bar. To type a web link "htpp://invalid" it rather types it as "htpp//invalid" (note the missing colon). That makes four autopilot tests to fail. Below test is an example to reproduce the bug on a device:

webbrowser_app.tests.test_errorsheet.TestErrorSheet.test_invalid_url_triggers_error_message

Omer Akram (om26er)
description: updated
Changed in autopilot:
assignee: nobody → Christopher Lee (veebers)
Martin Mrazik (mrazik)
Changed in autopilot:
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Gema Gomez (gema) wrote :

Hi, I need this bug fixed to be able to user the browser tests to do a battery discharge measurement of the nexus'. This is a request from management and this bug is a blocker. Thanks!

Changed in autopilot:
importance: High → Critical
Changed in autopilot:
status: Confirmed → In Progress
Revision history for this message
Chris Gagnon (chris.gagnon) wrote :

The input method for ubuntu-touch is heavily modified, /dev/uinput does not work. It should work after the container flip, which will happen shortly.

We are also working on using using the OSK as the input method and have already fixed a bug in autopilot-qt to allow us to introspect the maliit-server

Revision history for this message
Thomas Voß (thomas-voss) wrote :

We could circumvent this issue temporarily by calling, e.g., www.cnn.com, not http://www.cnn.com.

Revision history for this message
Javier Collado (javier.collado) wrote :

That would allow autopilot to enter the URL in the browser. However, there's a check later to make sure that the address is equal to the one that was entered that wouldn't pass.

This check would fail in this case anyway because there's a redirection to http://edition.cnn.com, so the check is actually too strict. I think that the best workaround would be to provide both the url to type and the expected url after any redirection.

Revision history for this message
Javier Collado (javier.collado) wrote :

My previous comment wasn't completely correct. There are already two methods (go_to_url and assert_page_eventually_loaded) and it will be enough to pass in the the test case a different url rather than removing the check.

Revision history for this message
Olivier Tilloy (osomon) wrote :

Please do not modify test expectations to work around an issue that can be fixed otherwise.

Revision history for this message
Thomi Richards (thomir-deactivatedaccount) wrote :

Olivier,

Usually I'd agree with you, but this bug is due to a deficiency in the platform, that cannot be (easily) fixed until certain large features land in the future. In the mean time, but problem is causing several people to be blocked, and there's a very simple workaround.

In this case, I'd suggest applying the workaround, and tracking the status of the larger changes required before the issue can be fixed properly. At that stage, we can revert the tests to their old, stricter behavior.

Cheers,

Revision history for this message
Olivier Tilloy (osomon) wrote :

Right, I guess that’s acceptable if properly documented in the code as a temporary workaround.

Revision history for this message
Olivier Tilloy (osomon) wrote :

Just had a test run on the device, and I don’t think the workaround suggested by Thomas will work: for the autopilot tests, some URLs entered are local URLs (e.g. file:///tmp/blah.html). I’m afraid the browser is not clever enough to rewrite "/tmp/blah.html" to prepend "file://", at least not yet, until we teach it how to do so.

Revision history for this message
Olivier Tilloy (osomon) wrote :

The tests also run a custom HTTP server on port 8129, and its resources are accessed through URLs that look like "http://localhost:8129/blah". Even if we omit the leading "http://", we’ll still need a colon for the port number.

Ricardo Mendoza (ricmm)
Changed in autopilot:
assignee: Christopher Lee (veebers) → Ricardo Mendoza (ricmm)
status: In Progress → Fix Committed
Revision history for this message
Javier Collado (javier.collado) wrote :

Thanks for the fix.

Tested successfully in a nexus4.

[ro.build.id]: [JOP40D]
[ro.build.display.id]: [cm_mako-userdebug 4.2.1 JOP40D eng.ubuntu.20130721.053802 test-keys]

Changed in autopilot:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.