Fixed tests with opened 'RCPTT Debug' window

Signed-off-by: Viktoria Dlugopolskaya <viksnsk@gmail.com>
diff --git a/rcpttTests/platform_tests/Contexts/Launch Context/Apply/ClearBreakpointsInLaunchContext.test b/rcpttTests/platform_tests/Contexts/Launch Context/Apply/ClearBreakpointsInLaunchContext.test
index 628ea57..b62dac5 100644
--- a/rcpttTests/platform_tests/Contexts/Launch Context/Apply/ClearBreakpointsInLaunchContext.test
+++ b/rcpttTests/platform_tests/Contexts/Launch Context/Apply/ClearBreakpointsInLaunchContext.test
@@ -1,14 +1,13 @@
 --- RCPTT testcase ---
 Format-Version: 1.0
-Q7-vendor: www.xored.com/q7
 Contexts: _wFTf0KDsEeKGc-nsvHJqGA,_ZQYygK2sEeCqBbDEJWufvQ,_0_PAAKDoEeKGc-nsvHJqGA
 Element-Name: ClearBreakpointsInLaunchContext
 Element-Type: testcase
 Element-Version: 3.0
 External-Reference: 
 Id: _ruogQKsNEeKPyJLvtvYvAw
-Q7-Runtime-Version: 1.5.0.201406131029
-Save-Time: 6/13/14 7:04 PM
+Runtime-Version: 2.2.0.201704071302
+Save-Time: 5/18/17 3:44 PM
 Tags: Context, LaunchContext, selfAUT
 Testcase-Type: ecl
 
@@ -37,19 +36,35 @@
 Content-Type: text/ecl
 Entry-Name: .content
 
+proc waitForTaskToComplete {
+	loop {
+		if [get-view "Execution View" | get-label ".*/1"
+			| get-property caption -raw | not-eq "1/1"] {
+			wait 500
+			recur
+		}
+	}
+}
+
 get-view "Test Explorer" | get-tree | select "TestQ7Prj/PrefContext" | double-click
 get-editor PrefContext | get-button Apply | click
 get-view "Test Explorer" | get-tree | select "TestQ7Prj/JavaProgram" | double-click
 get-editor JavaProgram | get-button Apply | click
+waitForTaskToComplete
+
 with [get-editor LaunchContextTest] {
     click
     get-button Apply | click
 }
+waitForTaskToComplete
+
 get-view "Test Explorer" | get-tree | select "TestQ7Prj/EmptyLaunchContext" | double-click
 get-editor EmptyLaunchContext | get-section Options | get-button "Clear breakpoints" | get-property selected | equals true | verify-true
 get-editor EmptyLaunchContext | get-section Options | get-button "Terminate existing launches" | click
 get-button "Save (M1+S)" | click
 get-editor EmptyLaunchContext | get-button Apply | click
+waitForTaskToComplete
+
 get-view "Test Explorer" | get-tree | select "TestQ7Prj/EmptyLaunchContext2" | double-click
 get-editor EmptyLaunchContext2 | get-button Capture | click
 get-editor EmptyLaunchContext2 | get-section "Launch configurations" | get-tree | verify-error { get-item Breakpoints }
@@ -64,6 +79,8 @@
 get-button "Save (M1+S)" | click
 get-editor EmptyLaunchContext | get-section Options | get-button "Clear breakpoints" | get-property selected | equals false | verify-true
 get-editor EmptyLaunchContext | get-button Apply | click
+waitForTaskToComplete
+
 with [get-editor EmptyLaunchContext2] {
     click
     get-button Capture | click
diff --git a/rcpttTests/platform_tests/Contexts/Launch Context/Apply/FilteringAtClearingLaunchConfiguration.test b/rcpttTests/platform_tests/Contexts/Launch Context/Apply/FilteringAtClearingLaunchConfiguration.test
index d8d04ad..460b187 100644
--- a/rcpttTests/platform_tests/Contexts/Launch Context/Apply/FilteringAtClearingLaunchConfiguration.test
+++ b/rcpttTests/platform_tests/Contexts/Launch Context/Apply/FilteringAtClearingLaunchConfiguration.test
@@ -6,8 +6,8 @@
 Element-Version: 3.0
 External-Reference: 
 Id: _nLU3oKvSEeKhFfhAE-FJzg
-Runtime-Version: 1.5.0.201407281253
-Save-Time: 7/29/14 7:29 AM
+Runtime-Version: 2.2.0.201704071302
+Save-Time: 5/18/17 3:54 PM
 Tags: Context, LaunchContext, selfAUT
 Testcase-Type: ecl
 
@@ -36,12 +36,28 @@
 Content-Type: text/ecl
 Entry-Name: .content
 
+proc waitForTaskToComplete {
+	loop {
+		if [get-view "Execution View" | get-label ".*/1"
+			| get-property caption -raw | not-eq "1/1"] {
+			wait 500
+			recur
+		}
+	}
+}
+
 get-view "Test Explorer" | get-tree | select "TestQ7Prj/PrefContext" | double-click
 get-editor PrefContext | get-button Apply | click
+waitForTaskToComplete
+
 get-view "Test Explorer" | get-tree | select "TestQ7Prj/JavaProgram" | double-click
 get-editor JavaProgram | get-button Apply | click
+waitForTaskToComplete
+
 get-view "Test Explorer" | get-tree | select "TestQ7Prj/FilteringLCTestContext" | double-click
 get-editor FilteringLCTestContext | get-button Apply | click
+waitForTaskToComplete
+
 get-view "Test Explorer" | get-tree | select "TestQ7Prj/EmptyLaunchContext" | double-click
 with [get-editor EmptyLaunchContext] {
     with [get-section Options] {
@@ -54,6 +70,8 @@
     }
     get-button Apply | click
 }
+waitForTaskToComplete
+
 get-view "Test Explorer" | get-tree | select "TestQ7Prj/EmptyLaunchContext2" | double-click
 get-editor EmptyLaunchContext2 | get-button Capture | click
 with [get-editor EmptyLaunchContext2 | get-section "Launch configurations" | get-tree] {
@@ -83,14 +101,17 @@
     click
     get-button Apply | click
 }
+
 with [get-editor EmptyLaunchContext] {
     click
     get-button Apply | click
 }
+
 with [get-editor EmptyLaunchContext2] {
     click
     get-button Capture | click
 }
+
 with [get-editor EmptyLaunchContext2 | get-section "Launch configurations" | get-tree] {
     get-item "Launch configurations/RCPTT Test Suite" | get-property childCount | equals 1 | verify-true
     get-item "Launch configurations/RCPTT Test Suite/Empty Test Suite" | get-property caption | equals "Empty Test Suite" | verify-true
@@ -109,6 +130,7 @@
     click
     get-button Apply | click
 }
+
 with [get-editor EmptyLaunchContext] {
     click
     get-button Apply | click
diff --git a/rcpttTests/platform_tests/Contexts/Launch Context/Apply/NoLaunchDuplicates.test b/rcpttTests/platform_tests/Contexts/Launch Context/Apply/NoLaunchDuplicates.test
index 4802683..ac930b9 100644
--- a/rcpttTests/platform_tests/Contexts/Launch Context/Apply/NoLaunchDuplicates.test
+++ b/rcpttTests/platform_tests/Contexts/Launch Context/Apply/NoLaunchDuplicates.test
@@ -6,8 +6,8 @@
 Element-Version: 3.0
 External-Reference: 
 Id: _yOKkgaHCEeK_-IO-g05tUA
-Runtime-Version: 2.2.0.qualifier
-Save-Time: 4/30/16 12:04 PM
+Runtime-Version: 2.2.0.201704071302
+Save-Time: 5/18/17 5:58 PM
 Tags: Context, LaunchContext, selfAUT
 Testcase-Type: ecl
 
@@ -31,8 +31,20 @@
 Content-Type: text/ecl
 Entry-Name: .content
 
+proc waitForTaskToComplete {
+	loop {
+		if [get-view "Execution View" | get-label ".*/1"
+			| get-property caption -raw | not-eq "1/1"] {
+			wait 500
+			recur
+		}
+	}
+}
+
 get-view "Test Explorer" | get-tree | select "TestQ7Prj/JavaProgram" | double-click
 get-editor JavaProgram | get-button Apply | click
+waitForTaskToComplete
+
 get-editor LaunchContextTest | click
 get-editor LaunchContextTest | get-button Apply | click
 try {
diff --git a/rcpttTests/platform_tests/Contexts/Launch Context/Apply/TerminateExistingLaunches.test b/rcpttTests/platform_tests/Contexts/Launch Context/Apply/TerminateExistingLaunches.test
index f26f9d8..c07a097 100644
--- a/rcpttTests/platform_tests/Contexts/Launch Context/Apply/TerminateExistingLaunches.test
+++ b/rcpttTests/platform_tests/Contexts/Launch Context/Apply/TerminateExistingLaunches.test
@@ -6,8 +6,8 @@
 Element-Version: 3.0
 External-Reference: 
 Id: _yTuaYasMEeKPyJLvtvYvAw
-Runtime-Version: 2.2.0.qualifier
-Save-Time: 4/30/16 6:16 PM
+Runtime-Version: 2.2.0.201704071302
+Save-Time: 5/18/17 6:19 PM
 Tags: Context, LaunchContext, selfAUT
 Testcase-Type: ecl
 
@@ -36,17 +36,28 @@
 Content-Type: text/ecl
 Entry-Name: .content
 
+proc waitForTaskToComplete {
+	loop {
+		if [get-view "Execution View" | get-label ".*/1"
+			| get-property caption -raw | not-eq "1/1"] {
+			wait 500
+			recur
+		}
+	}
+}
+
 get-view "Test Explorer" | get-tree | select "TestQ7Prj/PrefContext" | double-click
 get-editor PrefContext | get-button Apply | click
 get-view "Test Explorer" | get-tree | select "TestQ7Prj/JavaProgram" | double-click
 get-editor JavaProgram | get-button Apply | click
+waitForTaskToComplete
+
 with [get-editor LaunchContextTest] {
     click
     get-button Apply | click
 }
-try {
-get-view "RCPTT Debug" | get-button "Yes" | click
-} -catch {}
+waitForTaskToComplete
+
 get-view "Test Explorer" | get-tree | select "TestQ7Prj/EmptyLaunchContext" | double-click
 get-editor EmptyLaunchContext | get-section Options | get-button "Terminate existing launches" | get-property selected 
     | equals true | verify-true
diff --git a/rcpttTests/platform_tests/Contexts/Launch Context/Edit/CaptureLaunchContext.test b/rcpttTests/platform_tests/Contexts/Launch Context/Edit/CaptureLaunchContext.test
index 597a9be..444c4b5 100644
--- a/rcpttTests/platform_tests/Contexts/Launch Context/Edit/CaptureLaunchContext.test
+++ b/rcpttTests/platform_tests/Contexts/Launch Context/Edit/CaptureLaunchContext.test
@@ -6,8 +6,8 @@
 Element-Version: 3.0
 External-Reference: 
 Id: _Z-gn0KDsEeKGc-nsvHJqGA
-Runtime-Version: 2.2.0.qualifier
-Save-Time: 4/30/16 12:06 PM
+Runtime-Version: 2.2.0.201704071302
+Save-Time: 5/18/17 6:19 PM
 Tags: Context, LaunchContext, selfAUT
 Testcase-Type: ecl
 
@@ -35,19 +35,29 @@
 Content-Type: text/ecl
 Entry-Name: .content
 
+proc waitForTaskToComplete {
+	loop {
+		if [get-view "Execution View" | get-label ".*/1"
+			| get-property caption -raw | not-eq "1/1"] {
+			wait 500
+			recur
+		}
+	}
+}
+
 get-view "Test Explorer" | get-tree | select "TestQ7Prj/EmptyLaunchContext" | double-click
 get-editor EmptyLaunchContext | get-section "Launch configurations" | get-tree | get-property itemCount | equals 0 
     | verify-true
 get-editor EmptyLaunchContext | get-button Apply | click
+
 get-view "Test Explorer" | get-tree | select "TestQ7Prj/JavaProgram" | double-click
 get-editor JavaProgram | get-button Apply | click
+waitForTaskToComplete
+
 get-editor LaunchContextTest | get-button Apply | click
 get-view "Execution View" | get-editbox -after [get-label "Message:"] | get-property text | equals "" | verify-true
-try {
-	get-window "RCPTT Debug" | get-button Yes | click
-}
--catch {
-}
+waitForTaskToComplete
+
 get-editor EmptyLaunchContext | get-button Capture | click
 get-view "Execution View" | get-editbox -after [get-label "Message:"] | get-property text | equals "" | verify-true
 get-editor  "EmptyLaunchContext" | get-property dirty | equals true | verify-true