seleniePOM

This commit is contained in:
Lukáš Kaňka 2023-08-21 21:50:37 +02:00
parent 02d72d127d
commit cee261ff26
10 changed files with 166 additions and 9 deletions

View File

@ -4,13 +4,7 @@
<option name="autoReloadType" value="SELECTIVE" /> <option name="autoReloadType" value="SELECTIVE" />
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="e313fd9a-aaf7-4ddf-8596-2ccbfcf66da1" name="Changes" comment=""> <list default="true" id="e313fd9a-aaf7-4ddf-8596-2ccbfcf66da1" name="Changes" comment="" />
<change afterPath="$PROJECT_DIR$/../Selenite_Naveen/driver/geckodriver.exe" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../Selenite_Naveen/src/test/java/cz/lukan/LaunchBrowser.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/pom.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/test/java/cz/lukan/AppTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/java/cz/lukan/AppTest.java" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" /> <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
@ -36,7 +30,7 @@
"RunOnceActivity.ShowReadmeOnStart": "true", "RunOnceActivity.ShowReadmeOnStart": "true",
"WebServerToolWindowFactoryState": "false", "WebServerToolWindowFactoryState": "false",
"git-widget-placeholder": "main", "git-widget-placeholder": "main",
"last_opened_file_path": "C:/Users/lukas/Nextcloud/GitHub/Java/Selenium_Selenide_Playwright_JAVA/PlaywrightTestAcademy", "last_opened_file_path": "C:/Users/lukas/Nextcloud/GitHub/Java/Selenium_Selenide_Playwright_JAVA/playwrightLukan",
"node.js.detected.package.eslint": "true", "node.js.detected.package.eslint": "true",
"node.js.detected.package.tslint": "true", "node.js.detected.package.tslint": "true",
"node.js.selected.package.eslint": "(autodetect)", "node.js.selected.package.eslint": "(autodetect)",
@ -73,7 +67,7 @@
<option name="presentableId" value="Default" /> <option name="presentableId" value="Default" />
<updated>1692287544970</updated> <updated>1692287544970</updated>
<workItem from="1692287547085" duration="2032000" /> <workItem from="1692287547085" duration="2032000" />
<workItem from="1692637254673" duration="321000" /> <workItem from="1692637254673" duration="1910000" />
</task> </task>
<servers /> <servers />
</component> </component>

38
lukanSelenide/.gitignore vendored Normal file
View File

@ -0,0 +1,38 @@
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/
### IntelliJ IDEA ###
.idea/modules.xml
.idea/jarRepositories.xml
.idea/compiler.xml
.idea/libraries/
*.iws
*.iml
*.ipr
### Eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/
### VS Code ###
.vscode/
### Mac OS ###
.DS_Store

8
lukanSelenide/.idea/.gitignore generated vendored Normal file
View File

@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

7
lukanSelenide/.idea/encodings.xml generated Normal file
View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
</component>
</project>

14
lukanSelenide/.idea/misc.xml generated Normal file
View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/pom.xml" />
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_20" default="true" project-jdk-name="20" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

6
lukanSelenide/.idea/vcs.xml generated Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
</component>
</project>

35
lukanSelenide/pom.xml Normal file
View File

@ -0,0 +1,35 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>cz.lukan</groupId>
<artifactId>lukanSelenide</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>lukanSelenide</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>20</maven.compiler.source>
<maven.compiler.target>20</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>com.codeborne</groupId>
<artifactId>selenide</artifactId>
<version>6.17.0</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>
</project>

View File

@ -0,0 +1,13 @@
package cz.lukan;
/**
* Hello world!
*
*/
public class App
{
public static void main( String[] args )
{
System.out.println( "Hello World!" );
}
}

View File

@ -0,0 +1,19 @@
package cz.lukan.pages;
import com.codeborne.selenide.Selenide;
import com.codeborne.selenide.SelenideElement;
import org.openqa.selenium.By;
import static com.codeborne.selenide.Selenide.*;
public class HomePage {
public HomePage open() {
Selenide.open("https://lukan.cz");
return this;
}
public SelenideElement getAcceptClick() {return $(By.className("eu-cookies-bar-tick"));}
public SelenideElement getDeclineClick() {return $(By.className("eu-cookies-bar-decline"));}
}

View File

@ -0,0 +1,23 @@
package cz.lukan.test;
import cz.lukan.pages.HomePage;
import org.testng.annotations.Test;
public class cookie {
HomePage home = new HomePage();
@Test
public void testPotvrzeníCookie() {
home.
open()
.getAcceptClick().click();
}
@Test
public void testZamitnutiCookies() {
home
.open()
.getDeclineClick().click();
}
}