I'm stuck with my automation where when I enter wrong username and password it will pop up saying "Unable to login. Try different username"
def test_logonWrongUserName(self):
self.setUpClass() # Initialize the driver
self.sh.navigateToUrl("http://test.com")
self.sh.member_Login("Foo", "asd")
Now need to test the Alert or popup (Not sure it is an alert or popup window) which has the text "Unable to login. Try different username". If it's find the text then the test pass. If not then the test has to fail.
Note:Just want to add, We can't access the html dom until we close the alert/popup window