Delegate Browser.CallAfterFillInDelegate
Delegate callback for the CallAfterFillIn EventHandler which will be invoked after each row of tokens is consumed.
Invoked whenever FillInFrom/FilllInFromDatabase/FillInFrom are used
Namespace: GenerallyPositive.Browser
Assembly: GPAL.dll
Syntax
public delegate int CallAfterFillInDelegate(Browser browser, IGPALGrid<string> tokens, int tokenIdx);
Parameters
| Type | Name | Description |
|---|---|---|
| Browser | browser | THe GPAL Browser object being filled in |
| IGPALGrid<System.String> | tokens | The current GPALGrid<string%gt; of tokens |
| System.Int32 | tokenIdx | The current token row index |
Returns
| Type | Description |
|---|---|
| System.Int32 | -1 if the handler requests the application to exit, otherwise the return value is ignored |
Examples
public static int CallAFterFillIn(Browser myBrowser, GPALGrid<string%gt; tokens, int tokenIdx) // text filled in search box, click 'Search' button
{
Selector searchButton = (Selector)GPAL.Selector
.WithName("SearchButton")
.WithCSS("#gh-btn")
.WithXPath("//*[@id=\"gh-btn\"]")
.MatchText("Search");
myBrowser
.WithSelector(searchButton)
// .WithSelector(searchButton).WithHardware // override selector default of Selenium
// .WithSelector(searchButton).WithJavaScript // override selector default of Selenium
.LeftClick();
}