Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, windows and java based applications. Get your 30 day free trial.

Discuss your Sahi Pro usage patterns, best practices, problems and solutions. Help others solve their problems and seek help from the community when needed. If you need specific support on your application, please email support @ sahipro.com

Case insensitive assertion in sahi

How can we achieve case insensitive assertion with sahi ?
for e.g: _assert(_isVisible(_cell("The user(s)")))
The above assert will return false when the text is "the User(s)". Is there a method which can ignore the case and return True for such cases?

Best Answer

  • Use a case insensitive regexp to access the cell.
    _cell(/the users/i) or something like that

Answers

  • In userdata.properties, add sahi.accessor.ignore_case=true and save your changes. That disables checking for upper/lower case in all scripts.
  • In userdata.properties, add sahi.accessor.ignore_case=true and save your changes. That disables checking for upper/lower case in all scripts.
Sign In or Register to comment.