summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2018-07-03 21:34:28 +0000
committerintrigeri <intrigeri@boum.org>2018-07-03 23:23:53 +0000
commit9e307d9c4cd9748d4bf3b878440b61a941f77543 (patch)
treeadd347911c8eeab69b632a6162e04676aab4cbab
parent9294b7d6ddef170eca6dc790f9475a98cadfb094 (diff)
Test suite: fix clicking the Print button in Tor Browser (refs: #15023)
Mixing Dogtail and Sikuli is tricky: in this case, Dogtail pretended it had clicked the Print button, but that was before the output file selection dialog had disappeared, so that click did nothing. So let's do the same as in the Evince test, that works in a robust manner.
-rw-r--r--features/step_definitions/common_steps.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/features/step_definitions/common_steps.rb b/features/step_definitions/common_steps.rb
index 13d014a..5638b04 100644
--- a/features/step_definitions/common_steps.rb
+++ b/features/step_definitions/common_steps.rb
@@ -787,7 +787,7 @@ When /^I can print the current page as "([^"]+[.]pdf)" to the (default downloads
$vm.set_clipboard(output_dir + '/' + output_file.sub(/[.]pdf$/, ''))
@screen.type('v', Sikuli::KeyModifier.CTRL)
@screen.type(Sikuli::Key.ENTER)
- print_dialog.button('Print').click
+ @screen.wait_and_click("Gtk3PrintButton.png", 10)
try_for(30, :msg => "The page was not printed to #{output_dir}/#{output_file}") {
$vm.file_exist?("#{output_dir}/#{output_file}")
}