The verifyConfirmation command was not working in our tests and we found that in our confirmation message there was a new line character. This new line character resulted in an error, saying that it did not match.
 
As a result, we came up with the following code that can be included in the selenium-api.js file:
 
 /*
     Added parts variable and split and join functions to get rid of newline which was breaking the matching of expected
     confirmation to received confirmation
  */      
         var parts = receivedConfirmation.split('\n');
         receivedConfirmation = parts.join('');
         if ( receivedConfirmation != expectedConfirmation ) {
            fail("The confirmation message was [" + receivedConfirmation + "]");  
         }
         if ( receivedConfirmation != expectedConfirmation ) {
            assert.fail("The confirmation message was [" + receivedConfirmation + "]");
         }
                          
     } else {
         assert.fail("There were no confirmations");
     }
  };
 
I thought this might be helpful to others that might run into this type of problem.


Start your day with Yahoo! - make it your home page
_______________________________________________
Selenium-users mailing list
[email protected]
http://lists.public.thoughtworks.org/mailman/listinfo/selenium-users

Reply via email to