This commit is contained in:
Lukáš Kaňka
2023-08-22 16:45:51 +02:00
parent 6497aff32b
commit af6105e6f8
19 changed files with 445 additions and 5 deletions

View File

@ -33,6 +33,5 @@
<artifactId>selenide</artifactId>
<version>6.17.1</version>
</dependency>
</dependencies>
</project>

View File

@ -1 +1,9 @@
https://www.youtube.com/watch?v=2Vu3wu93yuc&list=PLFGzDEkV3ACsFoqqB5dUu5CAfsZ0Kx2GW&index=1
https://www.youtube.com/watch?v=2Vu3wu93yuc&list=PLFGzDEkV3ACsFoqqB5dUu5CAfsZ0Kx2GW&index=1
Nezapomenout pluginy do IDE Cucumber for Java a Cucumber +
Tak vše do pom.xml
Zde jsem zkončil:
https://www.youtube.com/watch?v=vAb4jlxD7pw

View File

@ -1,5 +1,6 @@
package cz.lukan.stepdefinitions;
import com.codeborne.selenide.Configuration;
import io.cucumber.java.en.Given;
import io.cucumber.java.en.Then;
@ -11,7 +12,7 @@ public class GoogleStepDefinitions {
public void i_navigate_to(String string) {
// open("https://www.google.com");
open(string);// going to URL
sleep(10000);// 10 sekund
sleep(3000);// sekund
}
@Given("I wait for {int} seconds")
public void i_wait_for_seconds(Integer int1) {
@ -33,6 +34,7 @@ public void i_refresh_the_page() {
}
@Then("I hold the browser open")
public void i_hold_the_browser_open() {
Configuration.holdBrowserOpen=false;
}

View File

@ -3,8 +3,11 @@
Scenario: navigations test
Given I navigate to "https://www.google.com/"
And I navigate to "https://www.amazon.com"
And I wait for 5 seconds
And I wait for 3 seconds
And I navigate back
And I wait for 3 seconds
And I navigate forward
And I wait for 3 seconds
And I refresh the page
And I wait for 3 seconds
Then I hold the browser open