📜 ⬆️ ⬇️

Testing Web UI with Vika in pleasure or Virtual Intellect in testing

Good afternoon, dear Habra-readers. This time in the IT category I wanted to dream a little about your future with you. About the era when artificial intelligence will not be a wonder, and robots will become our close friends ...

But why dream, I thought. I'd rather tell you about one such creation.

Meet the VIQA WTL - Virtual Intelligence Quality Assurance Web Testing Tool , or simply Wick.
')
Vika is a tool with Virtual Intellect for testing Web UI (sites, in simple terms) in a language understandable to the user. The tool is a wrapper around Selenium and allows you to describe test scripts using such concepts as: buttons, text fields, checklists and drop-down lists, website, pages and blocks. Those. uses the popular PageObjects pattern.

In addition to the implementation of this concept, the tool has a wide range of related capabilities and great adaptability to a specific environment (which will be discussed below).

The tool I used in my work at i-Free was presented at the SQA Days 15 conference (the text of the presentation and the video will be posted soon by the organizers). Vika’s presentation described the comparison format with the most popular tool in this area, Yandex QA Tool. In this article I will try to tell you more about the tool itself without highlighting its strengths and weaknesses (those wishing to understand this are invited to do it yourself in the comments and / or listen to the video from the conference).

Virtual Intelligence


I'll start with the name. I think it is interesting for you to know where Virtual Intelligence is, and what do I mean by that?
image

The name is taken from the very popular computer game Mass Effect. The story is approximately as follows:
A certain galactic race, Kvariants, created the Artificial Intelligence, realizing the danger of the deed, entered into the struggle with its creatures, lost it and was expelled from all the planets of its World by the race of platforms endowed with AI.
After these events in the galaxy, the development of AI was prohibited due to the danger of their spinning out of control. In contrast to AI, galaxies are widely used in the galaxy. Virtual intellects that use human-like interfaces, but do not have the ability to learn (and therefore safe to use).

So, in my understanding of VI:
  1. Human language. A smart program that interacts with a person in his language.
  2. Ease of use. The program is “smart” enough to have solutions for different levels of users (low threshold of entry, availability of implementations for all its functions “by default”)
  3. Customizable A program that has the ability to learn (customization) for a specific environment (unlike AI, training is done by a person, not by an AI training module)


PageObjects


The concept of PageObjects, in general, says that when testing the Web UI it would be good to look at the Web pages and the elements on them as objects and, accordingly, to have entities for this in the code.

Simply put, instead of searching for tags on the page by locators and selectors, you need to select the logical functionality of the class (for example, "button") and work with an object of this class. And not with tags and locators.

Also, the above implies the separation of test script code and code describing objects on the pages of your site and working with them.

At the same time, Page Objects is only a concept, and it offers almost no tools for implementing an approach, except PageFactory
PS You can read more about PageObjects here code.google.com/p/selenium/wiki/PageObjects or search for information on the Internet.

Other implementations of PageObjects


Speaking at the SQA Days 15 conference, I tried to talk about another tool that implements the PageObjects template - HtmlElements, which, in my opinion, is a leader in this field. And I tried to describe in detail what I lacked and why I decided to create my own framework for a similar task. In this article, I will not make comparisons, but just talk about what Vika can do.

Basic concepts


At the heart of all the elements of the wiki is VIElement. Unlike WebElement's super WebElement, which is the union of all “elements” and can do everything, even what it cannot (for example, make SendKeys into a button), VIElement is a common part of all elements (the intersection is the common properties of all elements) and is able to do what is characteristic of all elements. And it does not know how to do anything extra (all VIElement methods are always applicable and will give results).

As I said, Vika implements the PageObjects pattern and even extends it a little.

The wiki has separate classes for such concepts as: Website (VISite), Page (VIPage) and for each element like a button (Button), a checkbox (Checkbox), a text field (TextField), etc.

Any element in a wiki can be a separate logical element as well as the union of any sets of elements. For example, Checkbox consists of 3 elements. VIPage can include any number of items. Due to this approach, Wiki does not have Blocks (like Yandex). Blocks of elements are ordinary VI Elements, which consist of other elements (see Example 1 ).

Structure

According to the PageObjects template, the structure of your site is described separately from the tests.

The description structure of the test site is as follows:

For details, see Example 2 .

Visis


The root element is VISite. VISite includes all general information about the tested site:
WebDriver settings, Timeout and logging settings, domain URL, list of pages.
VISite has two default actions: Open to open an arbitrary URL and OpenHomePage on the domain URL.

VIPage


VIPage - describes the test page. Consists of elements and groups of elements. May have an expected URL and Title. Settings: check or not the expected title / url (by default, if Url is specified, it is checked, otherwise it is not. The same as Title)
Items

Simple

ClickableElement, TextElement, ClickableText, Button, Checkbox, Link, TextArea, TextField 


Item Lists

 CheckList, DropDown, RadioButtons 


Constituent elements

image You can group items as you like. For example, you can group in a group the elements included in the footer or page header. Or in the form for login. Describe them and use them on different pages. All components have a “context” - the locator of the html element in which they are located. Locators of elements in a group are searched “inside this element”. Used byChained.

Mass filling in one line


On testing sites, quite often there are data sets that need to be filled out from some understandable business entity. For example, it can be a passport data page, a bank card data or a transaction, a filter for selecting goods or setting something on the site.

It is logical to wish to combine such elements into a block (for example, “passport data”), and in the test say “fill in passport data”. Given that such data is usually input to the test and will most likely be used to verify the results in the future, it is logical to use a certain MyPassportData object to work with it.

VIQA allows you to perform this operation at no extra cost in one line.

Describing the page, in any case, describe all these fields, and PageObjects hints to us to combine them into a block or page - VIElement in terms of VIQA (say, PassportSection). Each VIElement, as mentioned earlier, can be a union of the elements of which it is composed. To fill in all these fields, you only need to train the fields (see Example 3 ), run the FillFrom method from PassportSection and pass it as a parameter to MyPassportData.

 PassportSection. FillFrom(MyPassportData); 


Interfaces

All elements of the wiki are based on interfaces. Those. You, of course, have a default implementation, but the main thing is what meaning the person puts into the object. For example, when we talk about a button, we’re a little worried about how this button looks and much less worries about this button’s html code.

We know that a button is something you can click on. Well, sometimes the buttons have names.

Based on this approach, any buttons in VIQA have a Click action and a Label attribute. These actions have a default implementation (click is placed on the button locator, and the label is the value of the value attribute on this locator), but if your button is not at all , , :
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .
, , :
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .
, , :
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .
, , :
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .

, , :
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .

, , :
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .
, , :
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .
, , :
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .
, , :
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .
, , :
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .

, , :
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .

, , :
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .
 , ,  :   
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .
, , :
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .

, , :
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .

, , :
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .
 , ,  :   
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .
, , :
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .
, , :
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .

, , :
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .

, , :
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .

, , :
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .

, , :
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .
, , :
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .
, , :
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .
 , ,  :   
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .
, , :
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .
, , :
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .
, , :
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .
, , :
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .
, , :
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .
, , :
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .

, , :
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .

, , :
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .

, , :
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .
 , ,  :   
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .
, , :
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .
 , ,  :   
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .
, , :
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .
 , ,  :   
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .
, , :
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .
 , ,  :   
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .
, , :
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .
 , ,  :   
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .
, , :
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .
 , ,  :   
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .
, , :
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .
 , ,  :   
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .
, , :
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .
 , ,  :   
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .
, , :
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .
 , ,  :   
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .
, , :
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .
 , ,  :   
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .
, , :
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .
 , ,  :   
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .
, , :
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .
 , ,  :   
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .
, , :
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .
 , ,  :   
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .
, , :
Button, «» - .

C .

:
IButton, ICheckbox, ICheckList, IClickable, ILabeled, ILink, ISelector, ISetValue, ITextArea, IVIElement

VIAction
, VIAction.
, , :

:
( Click)
,
( GetLabel):
, ,
.
, , , - , Frame, , ( , ), . 4


, VIAction.
, Frame . 5


, , ( ) . 6 .

PageObjects, .
VISite.

var mySite = new VISite(“http://mysite.com”)

, , , .


, , , - . , , , .

VISite.Logger = new MyLogger();

.

VISite 3 :
WaitWebElementInSec – (5 ) WaitPageToLoadInSec – (20 ) RetryActionInMsec – ( ) (0,5 )

, . WaitPageToLoadInSec WaitWebElementInSec ( 7 ).

SmartSearch SmartClick
, Selenium . , , , ( , ). , .

, -, , , - .
VIQA «», , .

• Implicitly wait , ? .
• ? , (, Click ? )
- , , - . , , , , .
. — .


KillAllRunWebDrivers
WebDriver ( , ). . , , , .

(SetUpFixture) :

VISite.KillAllRunWebDrivers();

. .


WebDriver, beforesuit , WebDriver . - Open ( , BeforeTest: , .. DataSource -, ). , , , . 2-5 . - , , , , , VIQA .
VIQA ( ). Open, .. , . . .


. ( )

:
Java ( , HTML5) ( , Selenium JavaScript : , setAttribute ) , .

, , .
, , )
: vk.com/viqatools
email : viqablog@gmail.com

.

UPD: SQA Days 15 vimeo.com/95245507


:
1

public class Checkbox { public TextElement TextElement; public VIElement CheckSignElement; } public class LoginForm { public TextField LoginTxtField; public TextField PasswordTxtField; public Button LoginButton; }

2
[Site(Domain = "http://market.yandex.ru/")] public class MySite : VISite { [Page(Title = " ", Url = "http://mysite.ru/")] public HomePage HomePage; [Page(Title = " ", Url = "http://mysite.ru/somepage")] public SomePage SomePage; } [Page(Title = " ", Url = "http://mysite.ru/")] public class HomePage : VIPage { [Name(" ")] [Locate(ByClassName = "search")] public static SearchSection SearchSection; }
Note: Page .

public class SearchSection : VIElement { [Name(" ")] [Locate(ByXPath = "//*[@class='search_input'] public TextArea SearchTextField; [Name(" '")] [Locate(ByXPath = "//*[contains(text(),'')] [ClickReloadsPage] public Button SearchButton; public void SearchProduct(string productName) { SearchTextField.NewInput(productName); SearchButton.Click(); } }
Note: .

3
public class PassportData { public string Number; public string Series; public FullName FullName; } public class FullName { public string Name; public string SecondName; } [FillFromField("Number")] public TextField PassportNumberTxtField;
Note: Number -, .

[FillFromField("FullName.Name")] public TextField PassportNameTxtField;
Note: Name FullName

public ITextArea PassportSeriesTxtField = new TextField() { FillRule = ToFillRule<PassportData>(pd => (pd.Number != “”) ? pd.Series : “”)), }

Note: FillRule

4
(viElement, actionName, viAction) =>{ VISite.Logger.Event(viElement.DefaultLogMessage(text)); viAction.Invoke(); }

Note: VIAction
(actionName, viAction, logResult) =>{ VISite.Logger.Event(DefaultLogMessage(text)); var result = viAction.Invoke(); if (logResult != null) VISite.Logger.Event(logResult.Invoke(result)); return result; }
Note: VIAction
5
new RadioButtons(“ ”, “#sensorScreen”) { VIAction = (viElement, text, viAction) => { if (!FirstSensorRadioButton.IsDisplayed) SensorBlock.Click(); viAction.Invoke(); } };
Note: VIAction . .
6
[Name(Name = "Wi-fi"), Locate(ByXPath = "//*[@class='my-checkbox']")] public ICheckbox MyCheckbox1; [Name(Name = "Wi-fi"), Locate(ByClassName = “my-checkbox")] public Checkbox MyCheckbox2; public ICheckbox MyCheckbox3 = new Checkbox("Wi-fi", "#my-checkbox"); public Checkbox MyCheckbox4 = new Checkbox("Wi-fi", By.CssSelector("#my-checkbox"));
7
[Name(" ''")] [ClickReloadsPage] public IButton SearchButton;

Note: ClickReloadsPage

MyButton.WithPageLoadAction.Click()
Note:

MyButton.WaitTimeout(20).Click()
Note: .

Source: https://habr.com/ru/post/222191/


All Articles