EverystepScripting Tool: classes, methods, properties etc.

All methods are case ensitive

Script begins by declaring number of tabs

DMBrowser tab0 = null;
DMBrowser tab1 = null;

where

“DMbrowser” is a class and “tab0” is variable name

Methods:

Tabs.SetSize (1768, 746);

Declares size for all current and new tabs

tab2 = Tabs.PopUps.Pop ["https://www.popuptest.com/popup1.html"];

Waits for browser to open new tab with URL as a parameter, meanwhile URL must correspond to that which has been set during sript recording.

Tabs.NewTab

Created new Tab “manually”

Example:

tab0 = Tabs.NewTab ();
Step (1, "Yahoo - https://www.yahoo.com/");

Method for aggregation and further logical division of a script into parts, including logical division in reports.
Step number shall be any number greater than “0”
Description – any string value.

tab0.GoTo ("https://yahoo.com");

Dmbrowser’s class method has string value and navigates inside current tab (tab 0 in example) to the specified address (URL).

Navigating

Reflects transition to another URL during recording, initiated by browser. It doesn’t force browser to navigate. During playback, this method awaits transition (timeout 50 seconds). Often addresses contain dynamic parameters, that’s why it awaits transition not to the specific URL but a fact of transition itself. i.e. any sting can be a parameter.

Example:

tab0.Navigating ("https://search.yahoo.com/search;_ylc=X3oDMTFiN25laTRvBF9TAzIwMjM1MzgwNzUEaXRjAzEEc2VjA3NyY2hfcWEEc2xrA3NyY2h3ZWI-?p=lijpj&fr=yfp-t&fp=1&toggle=1&cop=mss&ei=UTF-8");

KeywordAssert

Accepts string as a parameter and searches it in “innertext” of a document (timeout 50 seconds).

Example:

tab1.KeywordAssert ("age will launch a total of 10 p");

PressKey

Sends key press message to a browser.Key codes are taken from Enum Keys from System.Windows.Forms (https://goo.gl/bNdwR7)

Example:

tab0.TextField ("//INPUT[@ID=\"yschsp\"]", "//DIV[@ID=\"sbq-wrap\"]//INPUT[@TYPE=\"text\"]", "//LI[normalize-space()=\"pop-up test\"]/../../../../..//INPUT").TypeText ("popup test");
tab0.PressKey (Keys.Return);

Set of methods for interaction with Document Object Model (DOM).

All methods below takes from 1 to 3 Xpath string values

Calling any methods returns “IHtmlElement” interface.

All methods check for compliance of a tag of the received element to an expected in a method.

Area <area>
Button (<button>)(<input type=”button, submit, reset”>)
Checkbox <input type=”checkbox”>
Div <div>
Element – ANY!!!
Form <form>
Image <image> <input type=”image”>
Label <label>
Link <a>
Para <p>
Option <option>
RadioButton <input type=”radio”>
SelectList <select>
Span <span>
TextField <textarea> <input type=”text”> <input>
Table <table>
TableBody <tbody>
TableCell <td> <th>
TableRow <tr>

Frame <frame> <iframe>

RIA

RIA – EveryStepScripting Tool mode when it works not with HTML of a page but with coordinates which are determined by page size in pixels.

MouseMoveTo

1st version of method accepts coordinates by X and Y axis

tab0.MouseMoveTo (884, 358);

2nd version of method accepts picture (image, page fragment captured during recording) and place cursor in the middle of this picture.

tab0.MouseMoveTo (PictureList [0]);

3nd version of method accepts picture (image, page fragment captured during recording) and also accuracy coefficient

tab0.MouseMoveTo (PictureList [1], 0.97);

Accuracy Coefficient reflects a degree of coincidence sufficient for unique identification of a required fragment on visible part of the page. Default Value is 0.95. In case algorithm detects more than 1 coincidence with default Accuracy Coefficient either new fragment can be selected or Coefficient degree increased.

MouseMove

Places mouse cursor by coordinates relativeley to previous mouse cursos position.

tab0.MouseMove (23, 180);

IHtmlElement

After getting “IHtmlElement” few methods can be invoked:
Click()
DoubleClick()
SelectByText

Utilized only for SelectList method and accepts string parameter with desired option

SelectByText("any")

TypeText

Is used only with TextField
Similar to previous, enters the transferred text into the current textfield

Properties

Checked – only for CheckBox(), ticks and unticks checkbox
tab0.CheckBox(“xpath to the checkbox 1”).Checked = true;
TagName  – reads tag for the current IHtmlElement