diff --git a/selenide_series/build/reports/tests/1692196445243.0.html b/selenide_series/build/reports/tests/1692196445243.0.html new file mode 100644 index 0000000..2450f07 --- /dev/null +++ b/selenide_series/build/reports/tests/1692196445243.0.html @@ -0,0 +1,1598 @@ + + + + + + + Practice E-Commerce Site – SDET Unicorns – Helping you succeed in Software Quality. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + +
+
+
+ +
+ + +
+
+ +

+ Practice E-Commerce Site +

+ + +

SDET Unicorns - Helping you succeed in Software Quality.

+
+
+ +
+ + +
+ + + + + +
+ + + + +
+
+
+ +
+ + + + +
+ + +
+ + + + + + +
+ +
+ +
+
+
+ + +
+ + +
+
+
+ +
+ +
+
+
+
+
+
+
+

+
+

+ Unleash Your SDET Skills with Our Early Bird Special! 🔥 +

+
+

+
+
+
+
+
Take the leap and boost your career! Enroll in our comprehensive SDET courses at a special discounted rate. + +

Hurry, this offer is for a limited time only! Discover more and start your journey today!. ⏳
+
+ +
+
+
+
+
+
+
+
+
+
+
+

Think different. Make different.

+
+
+
+

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed proin eget eu sit nec risus. Sed ut quam integer a nisl amet.  Ed ut quam integer a nisl amet

+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
Research
+
+
+
+
+
+
+
+
Ideas
+
+
+
+
+
+
+
+
Pixel Perfect
+
+
+
+
+
+
+
+
Seo Friendly
+
+
+
+
+
+
+
+
Design
+
+
+
+
+
+
+
+
Support
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Zakra Invites You To Build Your Next Site

+
+
+
+

Lorem ipsum dolor sit amet, consectetur adipiscing elit. At in proin lacus, sed morbi pulvinar malesuada duis.

Viverra pellentesque enim mattis cursus lorem cras est augue. Sit lectus nisl velit rutrum. In quis quis vitae vitae. Sollicitudin rhoncus sit sed odio tristique id. Nisl turpis sed fames sed egestas et. Massa, id platea elit diam scelerisque.

+
+
+
+
+
+
+
+
+
+
+
+

Our Awesome Portfolio

+
+
+
+
+
+
+
+
+
+
+
+

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sapien, sit sed accumsan, viverra sociis ullamcorper aenean fermentum.

+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+

Plan & Pricing

+
+
+
+
+
+
+
+
+
+
+
+

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Hendrerit massa condimentum enim, nisl vitae. Ultricies aliquet proin egestas donec viverra turpis luctus gravid

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Silver

+
+
+
+
+
+ $ + 0 + +
+
per month
+
+
+
+ + +
+
+
+
+
+
+
+

Gold

+
+
+
+
+
+ $ + 0 + +
+
per month
+
+
+
+ + +
+
+
+
+
+
+

Platinum

+
+
+
+
+
+ $ + 0 + +
+
per month
+
+
+
+ + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Meet Our Team

+
+
+
+
+
+
+
+
+
+
+
+

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sapien, sit sed accumsan, viverra sociis ullamcorper aenean fermentum.

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+

Madelyn Torff

Marketing Head

+
+
+
+
+
+
+
+

Tiana Gouse

Project Manager

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Client Reveiws

+
+
+
+
+
+
+
+
+
+
+
+

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Hendrerit massa condimentum enim, nisl vitae. Ultricies aliquet proin egestas donec viverra turpis luctus gravid

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Hendrerit massa condimentum enim, nisl vitae. Ultricies aliquet proin egestas donec viverra turpis luctus gravida ipsum. Mattis tempus ut egestas habitant dolor massa, id enim. Vitae nec non diam posuere nullam. Neque pharetra bibendum et ornare non risus,
+ +
+
+
+
+ +
+
Jessica Alba
+
Manager
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Hendrerit massa condimentum enim, nisl vitae. Ultricies aliquet proin egestas donec viverra turpis luctus gravida ipsum. Mattis tempus ut egestas habitant dolor massa, id enim. Vitae nec non diam posuere nullam. Neque pharetra bibendum et ornare non risus,
+ +
+
+
+
+ +
+
Will Brand
+
Manager
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + 0 + k +
+
Client Trust
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + 0 + +
+
Experts
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + 0 + +
+
Experience
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + 0 + +
+
Awards
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Latest Posts & Articles +

+
+
+
+
+
+
+
+
+
+
+
+

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sapien, sit sed accumsan, viverra sociis ullamcorper aenean fermentum.

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Successful Marketing Ads for Your Business

Lorem ipsum dolor sit amet, Tetur adipiscing elit. Atempor scelerisque olor sit mauris.

+
+ +
+
+
+
+
+
+

Let’s Building Your Business from Scratch

Orem ipsum dolor sit amet, siy dffee consectetur adipiscing elit. Massa iaculis sem aliquet neque.

+
+ +
+
+
+
+
+
+

The Best Place to Invest Your Money

Rem ipsum dolor sit amet, Nem consectetur adipiscing elit. A tempor scelerisque mauris.

+
+ +
+
+
+
+
+
+

The Big Seminar for Your Right Investment

Rem ipsum dolor sit amet, Nem consectetur adipiscing elit. A tempor scelerisque mauris.

+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Have Any Questions?

+
+
+
+

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Hendrerit massa condimentum enim, nisl vitae. Ultricies aliquet proin egestas donec viverra turpis luctus gravida ipsum.

+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ +
+
+
+
+
+ +
+ + +
+
+
+ + + +
+ + + + Scroll to top + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/selenide_series/build/reports/tests/1692196445243.0.png b/selenide_series/build/reports/tests/1692196445243.0.png new file mode 100644 index 0000000..8a6e4c3 Binary files /dev/null and b/selenide_series/build/reports/tests/1692196445243.0.png differ diff --git a/selenide_series/build/reports/tests/1692204561236.0.html b/selenide_series/build/reports/tests/1692204561236.0.html new file mode 100644 index 0000000..71fb47a --- /dev/null +++ b/selenide_series/build/reports/tests/1692204561236.0.html @@ -0,0 +1,745 @@ + + + + + + + Support Form – Practice E-Commerce Site + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + +
+
+
+ +
+ + +
+
+ +

+ Practice E-Commerce Site +

+ + +

SDET Unicorns - Helping you succeed in Software Quality.

+
+
+ +
+ + +
+ + + + + +
+ + + + +
+
+
+ +
+ + + + +
+ + +
+ + + + + + +
+ +
+ +
+
+
+ + +
+ + +
+
+
+
+

+ + Support Form +

+ +
+
+ + +
+
+
+
+ +
+
+
+ +
+ + +
+ +
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+ + + + +
+
+
+ + + +
+ + + + Scroll to top + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
August
+ + SunMonTueWedThuFriSat + +
303112345678910111213141516171819202122232425262728293031123456789
\ No newline at end of file diff --git a/selenide_series/build/reports/tests/1692204561236.0.png b/selenide_series/build/reports/tests/1692204561236.0.png new file mode 100644 index 0000000..eb2f398 Binary files /dev/null and b/selenide_series/build/reports/tests/1692204561236.0.png differ diff --git a/selenide_series/build/reports/tests/1692204629062.0.html b/selenide_series/build/reports/tests/1692204629062.0.html new file mode 100644 index 0000000..9a917a0 --- /dev/null +++ b/selenide_series/build/reports/tests/1692204629062.0.html @@ -0,0 +1,745 @@ + + + + + + + Support Form – Practice E-Commerce Site + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + +
+
+
+ +
+ + +
+
+ +

+ Practice E-Commerce Site +

+ + +

SDET Unicorns - Helping you succeed in Software Quality.

+
+
+ +
+ + +
+ + + + + +
+ + + + +
+
+
+ +
+ + + + +
+ + +
+ + + + + + +
+ +
+ +
+
+
+ + +
+ + +
+
+
+
+

+ + Support Form +

+ +
+
+ + +
+
+
+
+ +
+
+
+ +
+ + +
+ +
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+ + + + +
+
+
+ + + +
+ + + + Scroll to top + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
August
+ + SunMonTueWedThuFriSat + +
303112345678910111213141516171819202122232425262728293031123456789
\ No newline at end of file diff --git a/selenide_series/build/reports/tests/1692204629062.0.png b/selenide_series/build/reports/tests/1692204629062.0.png new file mode 100644 index 0000000..def71df Binary files /dev/null and b/selenide_series/build/reports/tests/1692204629062.0.png differ diff --git a/selenide_series/build/reports/tests/1692204662965.0.html b/selenide_series/build/reports/tests/1692204662965.0.html new file mode 100644 index 0000000..e3e071c --- /dev/null +++ b/selenide_series/build/reports/tests/1692204662965.0.html @@ -0,0 +1,745 @@ + + + + + + + Support Form – Practice E-Commerce Site + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + +
+
+
+ +
+ + +
+
+ +

+ Practice E-Commerce Site +

+ + +

SDET Unicorns - Helping you succeed in Software Quality.

+
+
+ +
+ + +
+ + + + + +
+ + + + +
+
+
+ +
+ + + + +
+ + +
+ + + + + + +
+ +
+ +
+
+
+ + +
+ + +
+
+
+
+

+ + Support Form +

+ +
+
+ + +
+
+
+
+ +
+
+
+ +
+ + +
+ +
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+ + + + +
+
+
+ + + +
+ + + + Scroll to top + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
August
+ + SunMonTueWedThuFriSat + +
303112345678910111213141516171819202122232425262728293031123456789
\ No newline at end of file diff --git a/selenide_series/build/reports/tests/1692204662965.0.png b/selenide_series/build/reports/tests/1692204662965.0.png new file mode 100644 index 0000000..0e2d6af Binary files /dev/null and b/selenide_series/build/reports/tests/1692204662965.0.png differ diff --git a/selenide_series/build/reports/tests/1692204712338.0.html b/selenide_series/build/reports/tests/1692204712338.0.html new file mode 100644 index 0000000..3239cb5 --- /dev/null +++ b/selenide_series/build/reports/tests/1692204712338.0.html @@ -0,0 +1,745 @@ + + + + + + + Support Form – Practice E-Commerce Site + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + +
+
+
+ +
+ + +
+
+ +

+ Practice E-Commerce Site +

+ + +

SDET Unicorns - Helping you succeed in Software Quality.

+
+
+ +
+ + +
+ + + + + +
+ + + + +
+
+
+ +
+ + + + +
+ + +
+ + + + + + +
+ +
+ +
+
+
+ + +
+ + +
+
+
+
+

+ + Support Form +

+ +
+
+ + +
+
+
+
+ +
+
+
+ +
+ + +
+ +
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+ + + + +
+
+
+ + + +
+ + + + Scroll to top + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
August
+ + SunMonTueWedThuFriSat + +
303112345678910111213141516171819202122232425262728293031123456789
\ No newline at end of file diff --git a/selenide_series/build/reports/tests/1692204712338.0.png b/selenide_series/build/reports/tests/1692204712338.0.png new file mode 100644 index 0000000..0e2d6af Binary files /dev/null and b/selenide_series/build/reports/tests/1692204712338.0.png differ diff --git a/selenide_series/readme.md b/selenide_series/readme.md index 37b1ebf..db4d009 100644 --- a/selenide_series/readme.md +++ b/selenide_series/readme.md @@ -5,8 +5,9 @@ TestNG ---> https://mvnrepository.com/artifact/org.testng/testng (pom.xml) Maven ---> +'''' 20 20 - +''' diff --git a/selenide_series/src/test/java/specs/FormTest.java b/selenide_series/src/test/java/specs/FormTest.java new file mode 100644 index 0000000..ea41e85 --- /dev/null +++ b/selenide_series/src/test/java/specs/FormTest.java @@ -0,0 +1,31 @@ +package specs; + + +import com.codeborne.selenide.Condition; +import org.testng.annotations.Test; + +import static com.codeborne.selenide.Selenide.$; +import static com.codeborne.selenide.Selenide.open; + +// zde otestujeme dotazník pro zákazníka který vyplníme. +public class FormTest { + @Test + public void testFormFields() { + open("https://practice.sdetunicorns.com/support-form/"); + + // vyplň všechny pole + $(".support-name input").val("Fanda"); + $(".support-email input").val("Fanda@vidle.com"); + $(".support-subject input").val("Nechce to splachovat"); + // dropdown a checkbox + $(".support-dropdown select").selectOption("Technical Team"); + $(".support-checkboxes ul li:nth-child(2) input").click(); + // vyber datum + $(".support-date input").click(); + $(".flatpickr-day.nextMonthDay").click(); + // klikni na Submit tlačítkko + $("button[type=submit]").click(); + // ověř submit zprávu + $("div[role=alert]").shouldHave(Condition.text("Thanks for contacting us! We will be in touch with you shortly.")); + } +} diff --git a/selenide_series/src/test/java/specs/HomeTest.java b/selenide_series/src/test/java/specs/HomeTest.java index a7e88a0..08d1bf0 100644 --- a/selenide_series/src/test/java/specs/HomeTest.java +++ b/selenide_series/src/test/java/specs/HomeTest.java @@ -1,11 +1,17 @@ package specs; +import com.codeborne.selenide.CollectionCondition; +import com.codeborne.selenide.ElementsCollection; import com.codeborne.selenide.WebDriverRunner; +import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.testng.annotations.Test; +// pro každou novou funkci pomocí AlT + Enter můžeme přidat hvězdičku a ušetříme řádky +import java.util.List; -import static com.codeborne.selenide.Selenide.open; -import static com.codeborne.selenide.Selenide.title; +import static com.codeborne.selenide.Condition.*; +import static com.codeborne.selenide.Selenide.*; +import static org.testng.Assert.assertTrue; import static org.testng.AssertJUnit.assertEquals; public class HomeTest { @@ -24,6 +30,46 @@ public class HomeTest { @Test public void testInteractingWithElements() { + open("https://practice.sdetunicorns.com/"); + + // klikneme na tlačítko podle id + $(By.id("get-started")).click(); + + // zkontrolujeme očekávanou URL máme dva způsoby + String url = WebDriverRunner.url(); + //assertEquals(url, "https://practice.sdetunicorns.com/#get-started"); + assertTrue(url.contains("get-started")); + + // najdeme objeckt podle cssSelector a zkontrolujeme jeho text ( zde je to třída h1 class ) + $("h1") + .should(text("Think different. Make different.")); + + // Ověříme logo pomocí xpath + $(By.xpath("//*[@id=\"zak-masthead\"]/div/div/div/div[1]/div/a/img")) + .should(be(visible)); + } + + @Test + public void testMultipleElements() { + open("https://practice.sdetunicorns.com/"); + + // zkontrolujeme názvy v menu (horní lišta) + // $$ znamená že pracujeme s více elementy + // vytvoříme si pak proměnou linklists + //za li[id. . .] už je id na položky v menu + List expectedLinks = List.of("Home", "About", "Shop", "Blog", "Contact", "My account"); + ElementsCollection linkLists = $$("#zak-primary-menu li[id*=menu-item]"); + + // vypíšeme do console položky menu + System.out.println(linkLists.texts()); + + //porovnáme výsledek z našimy zadanými hodnoty na začátku testu + List linkListsText = linkLists.texts(); + assertEquals(linkListsText, expectedLinks); + // a kratší způsob zápisu + linkLists.shouldHave(CollectionCondition.texts(expectedLinks)); } } + + diff --git a/selenide_series/target/test-classes/specs/FormTest.class b/selenide_series/target/test-classes/specs/FormTest.class new file mode 100644 index 0000000..cec9dd9 Binary files /dev/null and b/selenide_series/target/test-classes/specs/FormTest.class differ diff --git a/selenide_series/target/test-classes/specs/HomeTest.class b/selenide_series/target/test-classes/specs/HomeTest.class index 3851e97..7d949b2 100644 Binary files a/selenide_series/target/test-classes/specs/HomeTest.class and b/selenide_series/target/test-classes/specs/HomeTest.class differ