Bug #11585

Bug #10288: Fix newly identified issues to make our test suite more robust and faster

"Persistent browser bookmarks" is fragile

Added by intrigeri over 3 years ago. Updated 3 months ago.

Test suite
Target version:
Start date:
Due date:
% Done:


Feature Branch:
Type of work:
Affected tool:


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                                                                # 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'

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?

02_28_52_Persistent_browser_bookmarks.mkv (1.41 MB) intrigeri, 07/21/2016 05:40 AM

04_40_37_The_persistent_Tor_Browser_directory_is_usable.mkv (889 KB) intrigeri, 09/08/2019 03:21 PM

05_07_57_Persistent_browser_bookmarks.png View (51.8 KB) intrigeri, 10/18/2019 05:31 PM

05_07_57_Persistent_browser_bookmarks.mkv (1.11 MB) intrigeri, 10/18/2019 05:31 PM

Associated revisions

Revision 695879c3 (diff)
Added by intrigeri over 3 years ago

Test suite: mark "Persistent browser bookmarks" as fragile (refs: #11585)

Revision 24ff9c29 (diff)
Added by intrigeri over 3 years ago

Revert "Test suite: mark "Persistent browser bookmarks" as fragile (refs: #11585)"

This reverts commit 695879c3f1fa149305f8fefeebd4a5dc11b78d13.


#1 Updated by intrigeri over 3 years ago

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

Marked as fragile.

#3 Updated by intrigeri over 3 years ago

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

#4 Updated by intrigeri 5 months ago

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 in the Tor Browser

#5 Updated by intrigeri 5 months ago

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 3 months ago

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

Also available in: Atom PDF