ClickableElement, TextElement, ClickableText, Button, Checkbox, Link, TextArea, TextField
CheckList, DropDown, RadioButtons
PassportSection. FillFrom(MyPassportData);
, , : 
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: .
, , : 
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