The WebTest.IndexOf method is a function of the MonoTests.SystemWeb.Framework library in C#. This method is used to return the index position of the first occurrence of a specified string in a web test. This can be useful for testing web pages, where it is important to know the position of a certain element.
Here is an example of how to use WebTest.IndexOf:
```C#
WebTest test = new WebTest();
test.Response = "Welcome to my web page!";
int index = test.IndexOf("Welcome");
```
In this example, the WebTest object is created with a response string. The IndexOf method is then used to search for the string "Welcome" in the response. The index position of the first occurrence of this string is stored in the variable 'index'.
Overall, WebTest.IndexOf is an important method for testing web pages. It allows developers to quickly and effectively locate elements on a page and ensure that they are functioning as expected.
C# (CSharp) MonoTests.SystemWeb.Framework WebTest.IndexOf - 26 examples found. These are the top rated real world C# (CSharp) examples of MonoTests.SystemWeb.Framework.WebTest.IndexOf extracted from open source projects. You can rate examples to help us improve the quality of examples.