diff --git a/tests/p_abrt-cli/_expect b/tests/p_abrt-cli/_expect
index d1248c3..da5b382 100755
--- a/tests/p_abrt-cli/_expect
+++ b/tests/p_abrt-cli/_expect
@@ -5,6 +5,7 @@ set dir [lindex $argv 0]
 spawn abrt-cli report $dir
 
 set timeout 10
+set workflow_no 3
 
 # timeout handler
 proc itstime {args} {
@@ -19,6 +20,10 @@ while {1} {
 
         timeout { itstime }
 
+        -regexp {[[:space:]]+([[:digit:]]+)[[:space:]]+Report to CentOS Bug Tracker} {
+            set workflow_no $expect_out(1,string)
+        }
+
         "Ok to upload core dump? (It may contain sensitive data)." {
             send "N\n"
         }
@@ -38,7 +43,7 @@ while {1} {
             send "\n"
         }
         "Select a workflow to run" {
-            send "3\n"
+            send "$workflow_no\n"
         }
     }
 }
diff --git a/tests/p_abrt-cli/_expect_report b/tests/p_abrt-cli/_expect_report
index e144634..423dd3e 100755
--- a/tests/p_abrt-cli/_expect_report
+++ b/tests/p_abrt-cli/_expect_report
@@ -5,6 +5,7 @@ set dir [lindex $argv 0]
 spawn report-cli -e report_CentOSBugTracker $dir
 
 set timeout 100
+set workflow_no 3
 
 # timeout handler
 proc itstime {args} {
@@ -19,6 +20,10 @@ while {1} {
 
         timeout { itstime }
 
+        -regexp {[[:space:]]+([[:digit:]]+)[[:space:]]+Report to CentOS Bug Tracker} {
+            set workflow_no $expect_out(1,string)
+        }
+
         "Ok to upload core dump? (It may contain sensitive data)." {
             send "N\n"
         }
@@ -35,7 +40,7 @@ while {1} {
             send "aaa\n"
         }
         "Select a workflow to run" {
-            send "3\n"
+            send "$workflow_no\n"
         }
     }
 }