diff --git a/android_tests/lib/android/specs/android/helper.rb b/android_tests/lib/android/specs/android/helper.rb
index 40890da9..0a680cbe 100644
--- a/android_tests/lib/android/specs/android/helper.rb
+++ b/android_tests/lib/android/specs/android/helper.rb
@@ -63,7 +63,15 @@ def id_value
t 'find by id' do
wait { find('accessibility').click }
wait { find('accessibility node provider').click }
- wait { id 'accessibility_node_provider' } # Accessibility/Accessibility Node Provider
+
+ if !automation_name_is_uiautomator2?
+ wait { text 'Accessibility/Accessibility Node Provider' }
+ else
+ # With string.xml
+ # Only for uiautomator1
+ wait { id 'accessibility_node_provider' }
+ end
+
2.times { back }
end
diff --git a/android_tests/lib/android/specs/common/patch.rb b/android_tests/lib/android/specs/common/patch.rb
index beb42178..19824cac 100644
--- a/android_tests/lib/android/specs/common/patch.rb
+++ b/android_tests/lib/android/specs/common/patch.rb
@@ -48,9 +48,16 @@
end
t 'id success' do
- wait do
- el = id 'autocomplete_3_button_7' # Text
- el.name.must_equal 'Text'
+ if !automation_name_is_uiautomator2?
+ wait do
+ el = id 'autocomplete_3_button_7' # Text
+ el.name.must_equal 'Text'
+ end
+ else
+ wait do
+ el = text 'text' # Text
+ el.name.must_equal 'Text'
+ end
end
end