File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed
Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change 1+ package tests ;
2+ //
3+
4+ import com .codeborne .selenide .SelenideElement ;
5+ import org .junit .jupiter .api .Test ;
6+ import org .openqa .selenium .By ;
7+
8+ import static com .codeborne .selenide .Condition .cssClass ;
9+ import static com .codeborne .selenide .Condition .text ;
10+ import static com .codeborne .selenide .Selectors .by ;
11+ import static com .codeborne .selenide .Selectors .byXpath ;
12+ import static com .codeborne .selenide .Selenide .*;
13+
14+
15+ public class TestPracticeForm {
16+ @ Test
17+ void TestAutomatin () {
18+ String name = "Dmitriy" ,
19+ lastname = "Petrov" ,
20+ email = "dmpetrov@mail.ru" ,
21+ mobile = "99999999" ,
22+ subject = "English" ,
23+ current_address = "Lenina" ;
24+
25+
26+ open ("https://demoqa.com/automation-practice-form" );
27+
28+ $ ("#firstName" ).val (name );
29+ $ ("#lastName" ).val (lastname );
30+ $ ("#userEmail" ).val (email );
31+ $ ("#userNumber" ).val (mobile );
32+ $ ("#dateOfBirthInput" ).click ();
33+ $ (byXpath ("//div[contains(@class, 'react-datepicker__day--')]" )).click ();
34+ $ (byXpath ("//*[text()='Sports']" )).click ();
35+ $ (byXpath ("//*[contains(text(), 'Male')]" )).click ();
36+ $ ("#currentAddress" ).val (current_address );
37+ $ ("#submit" ).click ();
38+
39+ System .out .printf ("" );
40+
41+ }
42+
43+ }
You can’t perform that action at this time.
0 commit comments