Bug #10288: Fix newly identified issues to make our test suite more robust and faster
"Persistent browser bookmarks" is fragile
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?
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 about 2 months ago
- File 05_07_57_Persistent_browser_bookmarks.png View added
- File 05_07_57_Persistent_browser_bookmarks.mkv added
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.