diff --git a/.idea/libraries/commons_io_2_8_0.xml b/.idea/libraries/commons_io_2_8_0.xml deleted file mode 100644 index f471222..0000000 --- a/.idea/libraries/commons_io_2_8_0.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/commons_io_2_8_0__1_.xml b/.idea/libraries/commons_io_2_8_0__1_.xml new file mode 100644 index 0000000..37cb266 --- /dev/null +++ b/.idea/libraries/commons_io_2_8_0__1_.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/lib.xml b/.idea/libraries/lib.xml deleted file mode 100644 index 87528d0..0000000 --- a/.idea/libraries/lib.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/selenium_java_4_3.xml b/.idea/libraries/selenium_java_4_3.xml deleted file mode 100644 index 170a6d0..0000000 --- a/.idea/libraries/selenium_java_4_3.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/TrendYolProjectTest.iml b/TrendYolProjectTest.iml index 1a75927..bf01c64 100644 --- a/TrendYolProjectTest.iml +++ b/TrendYolProjectTest.iml @@ -8,8 +8,8 @@ - - + + \ No newline at end of file diff --git a/out/production/TrendYolProjectTest/TestGruppen/Test1.class b/out/production/TrendYolProjectTest/TestGruppen/Test1.class index 55f36a1..084a3d2 100644 Binary files a/out/production/TrendYolProjectTest/TestGruppen/Test1.class and b/out/production/TrendYolProjectTest/TestGruppen/Test1.class differ diff --git a/src/TestGruppen/POMCodes_112.java b/src/TestGruppen/POMCodes_112.java new file mode 100644 index 0000000..fabd6d2 --- /dev/null +++ b/src/TestGruppen/POMCodes_112.java @@ -0,0 +1,25 @@ +package TestGruppen; + +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; +import org.openqa.selenium.support.PageFactory; + +import java.util.List; + +public class POMCodes_112 { + + public POMCodes_112(WebDriver driver) {PageFactory.initElements(driver, this);} + + @FindBy(xpath = "//button[text()='KABUL ET']") + public WebElement clickcokieaccept; + + @FindBy(css = "[class='component-list component-small-list']") + public WebElement Allimagines; + + @FindBy(xpath = "//*[@class='component-item']") + public List counttheelements; + + +} + diff --git a/src/TestGruppen/Test1.java b/src/TestGruppen/Test1.java index d6ccfa5..8cc0a22 100644 --- a/src/TestGruppen/Test1.java +++ b/src/TestGruppen/Test1.java @@ -1,16 +1,54 @@ package TestGruppen; import Utils.GenelWebDriver; +import org.openqa.selenium.JavascriptExecutor; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.interactions.Actions; +import org.openqa.selenium.support.ui.ExpectedConditions; +import org.testng.Assert; import org.testng.annotations.Test; +import org.testng.asserts.SoftAssert; public class Test1 extends GenelWebDriver { + @Test(priority = 1) + void test1() { + + Actions actions=new Actions(GenelWebDriver.driver); + SoftAssert sft=new SoftAssert(); + + POMCodes_112 elements = new POMCodes_112(driver); + elements.clickcokieaccept.click(); + + System.out.println("sayısı="+elements.counttheelements.size()); + + actions.moveToElement(elements.Allimagines).build().perform(); + + for (int i = 0; i