2121driver = appium_driver . start_driver
2222
2323wait = Selenium ::WebDriver ::Wait . new ( :timeout => 30 )
24- wait . until { driver . find_element ( :accessibility_id , "Log In" ) . displayed? }
25- login_button = driver . find_element ( :accessibility_id , "Log In" )
26- login_button . click
27-
28- wait . until { driver . find_element ( :accessibility_id , "Email address" ) . displayed? }
29- email_input = driver . find_element ( :accessibility_id , "Email address" )
30- email_input . send_keys ( "hello@browserstack.com" )
31-
32- wait . until { driver . find_element ( :accessibility_id , "Next" ) . displayed? }
33- driver . find_element ( :accessibility_id , "Next" ) . click
24+ wait . until { driver . find_element ( :accessibility_id , "Text Button" ) . displayed? }
25+ textButton = driver . find_element ( :accessibility_id , "Text Button" )
26+ textButton . click
27+
28+ wait . until { driver . find_element ( :accessibility_id , "Text Input" ) . displayed? }
29+ textInput = driver . find_element ( :accessibility_id , "Text Input" )
30+ textInput . send_keys ( "hello@browserstack.com" +"\n " )
31+
3432sleep 5
33+
34+ wait . until { driver . find_element ( :accessibility_id , "Text Output" ) . displayed? }
35+ result = driver . find_element ( :accessibility_id , "Text Output" )
3536
36- results = driver . find_elements ( :xpath , "//XCUIElementTypeStaticText" )
37- if results . map ( &:text ) . any? { |x | !x . nil? && x . match ( 'not registered on WordPress.com' ) }
37+ if ( !result . nil? ) && ( result . text . eql? "hello@browserstack.com" )
3838 puts "Test Passed"
3939else
4040 puts "Test Failed"
4141end
4242
43- driver . quit
43+ driver . quit
0 commit comments