Bug #11585

"Persistent browser bookmarks" is fragile

Added by intrigeri 2016-07-21 05:38:19 . Updated 2019-10-18 17:32:51 .

Status:
Confirmed
Priority:
Normal
Assignee:
Category:
Test suite
Target version:
Start date:
2016-07-21
Due date:
% Done:

0%

Feature Branch:
wip/test/11585-persistent-browser-bookmarks-fragile
Type of work:
Code
Blueprint:

Starter:
Affected tool:
Browser
Deliverable for:

Description

calling as amnesia: echo '#!/usr/bin/python
from dogtail import tree
from dogtail.config import config
config.searchShowingOnly = True
application = tree.root.application('"'"'gnome-shell'"'"')
application.child('"'"'Tor Browser'"'"', roleName='"'"'label'"'"').click()' >> '/tmp/tmp.KAOPeEREqc'
call returned: [0, "", ""]
calling as amnesia: /usr/bin/python '/tmp/tmp.KAOPeEREqc'
call returned: [0, "Creating logfile at /tmp/dogtail-amnesia/logs/tmp.KAOPeEREqc_20160721-102235_debug ...\nClicking on [label | Tor Browser]\nMouse button 1 click at (297,336)\n", ""]
calling as root: rm -f '/tmp/tmp.KAOPeEREqc'
call returned: [0, "", ""]
[log] CLICK on (542,385)
[log] CLICK on (620,456)
    And I start the Tor Browser in offline mode                                                                   # features/step_definitions/common_steps.rb:572
    And the Tor Browser has started in offline mode                                                               # features/step_definitions/common_steps.rb:416
[log] Alt+TYPE "b"
    Then the Tor Browser has a bookmark to eff.org                                                                # features/step_definitions/common_steps.rb:429
      FindFailed: can not find TorBrowserEFFBookmark.png on the screen.
      Line ?, in File ? (RuntimeError)
      features/torified_browsing.feature:146:in `Then the Tor Browser has a bookmark to eff.org'

Maybe we need to wait more than 10 seconds for the bookmarks page to appear, or to deal with the “Maximizing Tor Browser” warning, or to wait a bit between when the browser has started and when we type ALT+b?


Files


Subtasks


History

#1 Updated by intrigeri 2016-07-21 05:39:41

  • Feature Branch set to test/11585-persistent-browser-bookmarks-fragile

Marked as fragile.

#3 Updated by intrigeri 2016-07-22 05:51:42

  • Feature Branch changed from test/11585-persistent-browser-bookmarks-fragile to wip/test/11585-persistent-browser-bookmarks-fragile

#4 Updated by intrigeri 2019-08-30 12:20:26

In the last 2 months, this scenario failed 8 times on Jenkins:

  • 7 × at Step: I start the Tor Browser in offline mode
  • 1 × at Step: I add a bookmark to eff.org in the Tor Browser

#5 Updated by intrigeri 2019-09-08 15:28:41

Here’s another failure mode, this time in the “The persistent Tor Browser directory is usable” scenario: after pressing CTRL+q, a “Cancel All Downloads?” dialog appears. We don’t interact with it so when we start another Tor Browser via the Overview, and then try to click the new tab button, our click is lost because this dialog is still stealing the focus. Checking for the existence of index.html is not sufficient to guarantee that the whole page was saved and that we can quit the browser: the video shows that the download down arrow did not indicate that the download was completed. I think we should wait for that button to tell us that saving the page is done.

    And "Tails - About" has loaded in the Tor Browser                                                             # features/step_definitions/browser.rb:140
04:40:08.337612838: [log] ( Ctrl )  TYPE "s"
04:40:08.337878785: Sikuli: calling wait("Gtk3SaveFileDialog.png")...
04:40:11.739436198: Sikuli: calling wait("GtkTorBrowserPersistentBookmark.png")...
04:40:11.934514700: Sikuli: calling click(M[17,476 132x18]@S(S(0)[0,0 1024x768]) S:1.00 C:83,485 [193 msec])...
04:40:12.660009582: [log] CLICK on L(83,485)@S(0)[0,0 1024x768]
04:40:12.661347766: Sikuli: calling wait("GtkTorBrowserPersistentBookmarkSelected.png")...
04:40:13.428537172: [log] ( Alt )  TYPE "n"
04:40:13.428707115: Sikuli: calling wait("TorBrowserSaveOutputFileSelected.png")...
04:40:14.233488724: [log]  TYPE "index"
04:40:14.274868373: Remote shell: calling as root: test -e '/home/amnesia/Persistent/Tor Browser/index.html'
04:40:14.293817323: [log]  TYPE "#ENTER."
04:40:15.658157534: call returned: [0, "", ""]
    Then I can save the current page as "index.html" to the persistent Tor Browser directory                      # features/step_definitions/common_steps.rb:739
04:40:15.724290650: [log] ( Ctrl )  TYPE "q"
    When I close the Tor Browser                                                                                  # features/step_definitions/browser.rb:13

#6 Updated by intrigeri 2019-10-18 17:32:51

Another failure mode (see attached picture and video): one keystroke is lost and the bookmark is called “https:/www.eff.org” (note the missing second “/”) so thankfully, Sikuli won’t find it on the screen.