Skip to main content

How to compare the Text on Web Page

In this Article i am explaining you how you can match the Text available in the  Web page. This is useful because it may be possible suppose that you test the "Sign In" text should be present in the Login page and in later build that text may be change so you case write the Test Case to compare that text at any time and provide you the Test Case Pass or fail.
Suppose below mark text need to verified
Automation Testing, Selenium Web Driver, equals(),EqualsIgnoreCase()



 Here i can use two method to compare the strings.
 equals() is used to compare the string but matching is case sensitive while equalsIgnoreCase() is used to compare string in which it ignore the Case Sensitivity.

Comments

Popular posts from this blog

What is API?

In general way, API (Application Programming Interface) is the intermediate software which is useful for two applications to communicate. API is the tool which is used for interaction of two applications. If developer developing any software which have multiple blocks (Modules) than developer use APIs to put them together.

Ad-Hoc Testing

Ad-Hoc Testing is the testing type which is performed without any proper procedure and without any Requirement Specification. Ad-Hoc testing is totally informal testing which have intension to break the application as early as possible and found important defect early.  In Ad-hoc testing tester do not have any test cases so only the users who have very high knowledge regarding the application only they can perform Ad-Hoc Testing.

XPath Expression to locate Web Element

In last article i mentioned you how to locate the Web Element with id, Name, LinkText, Partial LinkText, CSS Selectors, Class Name and Tag Name. We use FireBug add-one to use these 7 locators to locate the Web Element on Web Page. Now we are talking about XPath expression. Which is also a type of Locator. We need FirePath add-ons to use it.