tutorial
This commit is contained in:
parent
af6105e6f8
commit
0bf89e85dd
@ -1,9 +1,9 @@
|
||||
**Základ pom.xml pro Cucumber + Selenide.**
|
||||
Cucumber + Selenide:
|
||||
|
||||
Nezapomenout do IDE pluginy: Cucumber for Java a Cucumber +
|
||||
Instalovat pluginy do IDE Cucumber for Java a Cucumber +
|
||||
|
||||
`
|
||||
<properties>
|
||||
Pom:
|
||||
<properties>
|
||||
<maven.compiler.source>20</maven.compiler.source>
|
||||
<maven.compiler.target>20</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
@ -28,6 +28,10 @@ Nezapomenout do IDE pluginy: Cucumber for Java a Cucumber +
|
||||
<artifactId>selenide</artifactId>
|
||||
<version>6.17.1</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
`
|
||||
</project>
|
||||
|
||||
|
||||
Tutorial:
|
||||
|
||||
https://www.youtube.com/watch?v=2Vu3wu93yuc&list=PLFGzDEkV3ACsFoqqB5dUu5CAfsZ0Kx2GW&index=1
|
@ -1,44 +1,9 @@
|
||||
Playwright java můžeme používat s Selenidem, Junit nebo třeba TestNG
|
||||
**Playwright v Jave základní nastavení pom.xml**
|
||||
|
||||
Playwright nejlepší využítí najde v TypeScript (repozitář Playwright_TS)
|
||||
|
||||
Pom: Zkopírovat z projektu
|
||||
|
||||
Nejlepší výsledky Playwright budou s TypeScript(repozitář Playwright_TS)
|
||||
|
||||
pom:
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.microsoft.playwright</groupId>
|
||||
<artifactId>playwright</artifactId>
|
||||
<version>1.36.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.testng/testng -->
|
||||
<dependency>
|
||||
<groupId>org.testng</groupId>
|
||||
<artifactId>testng</artifactId>
|
||||
<version>7.8.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.10.1</version>
|
||||
<!-- References to interface static methods are allowed only at source level 1.8 or above -->
|
||||
<configuration>
|
||||
<source>20</source>
|
||||
<target>20</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
@ -1,20 +1,7 @@
|
||||
Založení projektu:
|
||||
Selenide + TestNG:
|
||||
|
||||
Maven
|
||||
pom.xml:
|
||||
|
||||
TestNG
|
||||
|
||||
Selenide
|
||||
|
||||
Na inportovat si:
|
||||
|
||||
import static com.codeborne.selenide.Selenide.*;
|
||||
|
||||
import static com.codeborne.selenide.Condition.*;
|
||||
|
||||
@Test --> Nezapomenout --> Generata --> MethodTest (ušetří práci)
|
||||
|
||||
pom.xml
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
|
@ -15,10 +15,12 @@ public class LaunchBrowser {
|
||||
public void testBrowser() {
|
||||
// System.setProperty("webdriver.gecko.driver", "C:\\Users\\lukas\\Nextcloud\\GitHub\\Java\\Selenium_Selenide_Playwright_JAVA\\Selenite_Naveen\\driver\\geckodriver.exe");
|
||||
// Configuration.browser = "firefox";
|
||||
//Configuration.startMaximized = tru;
|
||||
Configuration.headless = true; // true nezobrazí browser
|
||||
Configuration.baseUrl = "https://www.google.com/";
|
||||
Configuration.screenshots = false;
|
||||
|
||||
Configuration.headless = true;
|
||||
|
||||
open("https://www.google.com/");
|
||||
open("/");
|
||||
// Odmítnutí cookie
|
||||
$ (By.id("W0wltc")).click();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user