refined code to save a quest

This commit is contained in:
Arul 2025-08-08 21:13:20 +05:30
parent fefd3af646
commit e4d11cb068
32 changed files with 528 additions and 65 deletions

BIN
cookies.data Normal file

Binary file not shown.

View File

@ -8,34 +8,33 @@ import java.util.Set;
public class CookieManager { public class CookieManager {
private static final String COOKIE_FILE = "cookies.ser"; private static final String COOKIE_FILE = "cookies.data";
// Save cookies to file
public static void saveCookies(WebDriver driver) { public static void saveCookies(WebDriver driver) {
try (ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(COOKIE_FILE))) { try (ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(COOKIE_FILE))) {
Set<Cookie> cookies = driver.manage().getCookies(); oos.writeObject(driver.manage().getCookies());
oos.writeObject(cookies); System.out.println("🍪 Cookies saved successfully!");
System.out.println("Cookies saved 🍪✅");
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
} }
} }
// Load cookies from file
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public static void loadCookies(WebDriver driver, String url) { public static void loadCookies(WebDriver driver, String url) {
File cookieFile = new File(COOKIE_FILE); File file = new File(COOKIE_FILE);
if (!cookieFile.exists()) return; if (!file.exists()) {
System.out.println("⚠ No cookies file found, starting fresh.");
return;
}
driver.get(url); // Need to open site before setting cookies try (ObjectInputStream ois = new ObjectInputStream(new FileInputStream(file))) {
try (ObjectInputStream ois = new ObjectInputStream(new FileInputStream(COOKIE_FILE))) {
Set<Cookie> cookies = (Set<Cookie>) ois.readObject(); Set<Cookie> cookies = (Set<Cookie>) ois.readObject();
driver.get(url); // must open the domain before adding cookies
for (Cookie cookie : cookies) { for (Cookie cookie : cookies) {
driver.manage().addCookie(cookie); driver.manage().addCookie(cookie);
} }
driver.navigate().refresh(); // Apply cookies driver.navigate().refresh();
System.out.println("Cookies loaded 🍪🔁"); System.out.println("✅ Cookies loaded successfully!");
} catch (IOException | ClassNotFoundException e) { } catch (IOException | ClassNotFoundException e) {
e.printStackTrace(); e.printStackTrace();
} }

View File

@ -48,4 +48,31 @@ public class ExcelUtils {
} }
public static List<List<String>> fetchQuestDropdownOptions(String sheetName) {
List<List<String>> allDropdownOptions = new ArrayList<>();
try (FileInputStream fis = new FileInputStream("src/main/resources/testData.xlsx");
Workbook workbook = new XSSFWorkbook(fis)) {
Sheet sheet = workbook.getSheet(sheetName);
for (int rowIndex = 0; rowIndex <= sheet.getLastRowNum(); rowIndex++) {
Row row = sheet.getRow(rowIndex);
if (row == null) continue;
List<String> dropdownRow = new ArrayList<>();
for (int colIndex = 2; colIndex <= 12; colIndex++) { // columns C to M (dropdowns)
Cell cell = row.getCell(colIndex);
dropdownRow.add(cell != null ? cell.toString().trim() : "");
}
allDropdownOptions.add(dropdownRow);
}
} catch (Exception e) {
e.printStackTrace();
}
return allDropdownOptions;
}
} }

View File

@ -3,11 +3,13 @@ package com.ghost.temple;
import java.util.Map; import java.util.Map;
import org.openqa.selenium.*; import org.openqa.selenium.*;
import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.Select;
import org.openqa.selenium.support.ui.WebDriverWait; import org.openqa.selenium.support.ui.WebDriverWait;
import java.time.Duration; import java.time.Duration;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.awt.Robot;
import java.awt.event.KeyEvent;
public class ReusableFunctions { public class ReusableFunctions {
@ -28,28 +30,151 @@ public class ReusableFunctions {
} }
} }
private static String normalizeValue(String value) {
try {
double d = Double.parseDouble(value);
if (d == (long) d) {
return String.valueOf((long) d); // Remove .0 for integers
}
return String.valueOf(d); // Keep decimal for non-whole numbers
} catch (NumberFormatException e) {
return value; // Not a number, return as is
}
}
public static void fillQuestInputs(WebElement titleElement, WebElement descElement, List<List<String>> questData) { public static void fillQuestInputsAndRewards(
WebDriver driver,
WebElement titleElement,
WebElement descElement,
String createQuest,
List<List<String>> questData,
List<String> dropdownXPaths,
List<List<String>> dropdownOptionsPerRow // each row has a list of dropdown/input values
) {
if (questData == null || questData.isEmpty()) { if (questData == null || questData.isEmpty()) {
System.out.println("No quests found to fill, sweetheart 😢"); System.out.println("No quests found to fill");
return; return;
} }
for (List<String> row : questData) { if (dropdownOptionsPerRow == null || dropdownOptionsPerRow.isEmpty()) {
if (row.size() < 2) { System.out.println("No dropdown/input options found to fill");
System.out.println("⚠️ Skipping incomplete row: " + row); return;
}
if (questData.size() != dropdownOptionsPerRow.size()) {
System.out.println("⚠️ Number of quest rows and dropdown/input value rows mismatch!");
return;
}
for (int rowIndex = 0; rowIndex < questData.size(); rowIndex++) {
List<String> questRow = questData.get(rowIndex);
List<String> dropdownOptions = dropdownOptionsPerRow.get(rowIndex);
if (questRow.size() < 2) {
System.out.println("⚠️ Skipping incomplete quest row: " + questRow);
continue; continue;
} }
String title = row.get(0); // Column A if (dropdownXPaths.size() != dropdownOptions.size()) {
String description = row.get(1); // Column B System.out.println("⚠️ Dropdown/Input XPaths and values count mismatch on row " + (rowIndex + 1));
continue;
}
System.out.println("📝 Filling → Title: \"" + title + "\", Description: \"" + description + "\""); String title = normalizeValue(questRow.get(0));
String description = normalizeValue(questRow.get(1));
System.out.println("📝 Filling quest #" + (rowIndex + 1) +
" → Title: \"" + title + "\", Description: \"" + description + "\"");
// Fill title and description
fillInput(titleElement, title); fillInput(titleElement, title);
fillInput(descElement, description); fillInput(descElement, description);
// Process each dropdown or input for this quest
for (int i = 0; i < dropdownXPaths.size(); i++) {
String xpath = dropdownXPaths.get(i);
String value = normalizeValue(dropdownOptions.get(i));
if (xpath.trim().endsWith("::input")) {
// For input fields
System.out.println("⌨️ Setting input (XPath: " + xpath + ") to value: " + value);
String status = clearAndSetInputByXPathJS(driver, xpath, value);
System.out.println("Status: " + status);
}
else if (xpath.trim().endsWith("::select")) {
// For dropdown selects
System.out.println("🎯 Selecting dropdown (XPath: " + xpath + ") with option: " + value);
String status = selectDropdownOptionByXpathJS(driver, xpath, value);
System.out.println("Status: " + status);
}
else {
System.out.println("⚠️ Unknown element type for XPath: " + xpath);
}
}
sleepInSeconds(4);
//Click Create Quest Button
//scrollIntoView(driver, createQuest);
//checkWebElement(createQuest);
clickElementByXPathJS(driver, createQuest);
}
}
/**
* Scroll down inside the active window by sending PAGE_DOWN key presses using Robot.
*
* @param times Number of times to press PAGE_DOWN key (each press scrolls a bit)
*/
public static void robotscrollDown(int times) {
try {
Robot robot = new Robot();
for (int i = 0; i < times; i++) {
robot.keyPress(KeyEvent.VK_PAGE_DOWN);
robot.keyRelease(KeyEvent.VK_PAGE_DOWN);
Thread.sleep(200); // small pause between scrolls for smoothness
}
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* Click an element by XPath using JavaScript executor.
*
* @param driver WebDriver instance
* @param xpath XPath of the element to click
* @return Status message from JS execution
*/
public static String clickElementByXPathJS(WebDriver driver, String xpath) {
String script =
"var el = document.evaluate(\"" + xpath + "\", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;" +
"if(el) { el.click(); return \"Clicked element with XPath: " + xpath + "\"; }" +
"else { return \"Element not found for XPath: " + xpath + "\"; }";
Object result = ((JavascriptExecutor) driver).executeScript(script);
return result != null ? result.toString() : "No result from JS execution";
}
/**
* Pause execution for the given number of seconds.
*
* @param seconds Time to sleep in seconds
*/
public static void sleepInSeconds(long seconds) {
try {
Thread.sleep(seconds * 1000);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
System.err.println("⚠️ Sleep interrupted: " + e.getMessage());
} }
} }
// Assuming fillInput is something like this: // Assuming fillInput is something like this:
public static void fillInput(WebElement element, String value) { public static void fillInput(WebElement element, String value) {
@ -60,10 +185,92 @@ public class ReusableFunctions {
System.out.println("DEBUG: Tried to fill input with null value!"); System.out.println("DEBUG: Tried to fill input with null value!");
} }
} }
public static void scrollIntoView(WebDriver driver, WebElement element) { public static void scrollIntoView(WebDriver driver, WebElement element) {
((JavascriptExecutor) driver).executeScript("arguments[0].scrollIntoView(true);", element); ((JavascriptExecutor) driver).executeScript("arguments[0].scrollIntoView(true);", element);
} }
public static void scrollIntoViewByXpath(WebDriver driver, String xpath) {
WebElement element = driver.findElement(By.xpath(xpath));
((JavascriptExecutor) driver).executeScript("arguments[0].scrollIntoView(true);", element);
}
/**
* Select dropdown option by visible text using JavaScript executor.
*
* @param driver Selenium WebDriver instance
* @param selectXpath XPath locator of the <select> element
* @param optionText Visible text of the option to select
* @return Status message from JavaScript execution
*/
public static String selectDropdownOptionByXpathJS(WebDriver driver, String selectXpath, String optionText) {
String jsCode = """
{
const select = document.evaluate(
arguments[0],
document,
null,
XPathResult.FIRST_ORDERED_NODE_TYPE,
null
).singleNodeValue;
if (select) {
const option = Array.from(select.options).find(opt => opt.text === arguments[1]);
if (option) {
select.value = option.value;
select.dispatchEvent(new Event('change', { bubbles: true }));
return `Option '${arguments[1]}' selected`;
} else {
return `Option '${arguments[1]}' not found`;
}
} else {
return "Select element not found";
}
}
""";
JavascriptExecutor jsExecutor = (JavascriptExecutor) driver;
return (String) jsExecutor.executeScript(jsCode, selectXpath, optionText);
}
/**
* Clears and sets input field value located by XPath using JavaScript executor.
*
* @param driver Selenium WebDriver instance
* @param inputXpath XPath locator of the input element
* @param value Value to set in the input field
* @return Status message from JavaScript execution
*/
public static String clearAndSetInputByXPathJS(WebDriver driver, String inputXpath, String value) {
String jsCode = """
{
const input = document.evaluate(
arguments[0],
document,
null,
XPathResult.FIRST_ORDERED_NODE_TYPE,
null
).singleNodeValue;
if (input) {
input.value = ''; // clear existing value
input.value = arguments[1]; // set new value
input.dispatchEvent(new Event('input', { bubbles: true }));
input.dispatchEvent(new Event('change', { bubbles: true }));
return `Input field set to '${arguments[1]}'`;
} else {
return "Input element not found";
}
}
""";
JavascriptExecutor jsExecutor = (JavascriptExecutor) driver;
return (String) jsExecutor.executeScript(jsCode, inputXpath, value);
}
// Wait for Element to be clickable. // Wait for Element to be clickable.
public static WebElement waitForElementToBeClickable(WebDriver driver, WebElement element, int timeoutInSeconds) { public static WebElement waitForElementToBeClickable(WebDriver driver, WebElement element, int timeoutInSeconds) {
WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(timeoutInSeconds)); WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(timeoutInSeconds));
@ -76,6 +283,28 @@ public class ReusableFunctions {
return wait.until(ExpectedConditions.visibilityOf(element)); return wait.until(ExpectedConditions.visibilityOf(element));
} }
public static void selectDropdownOptionWithDebug(WebElement dropdown, String optionText) {
Select select = new Select(dropdown);
if (DEBUG) {
List<WebElement> options = select.getOptions();
System.out.println("Dropdown options:");
for (WebElement option : options) {
System.out.println(" - " + option.getText());
}
}
select.selectByVisibleText(optionText);
if (DEBUG) {
System.out.println("Selected option: " + optionText);
}
}
public static void jsClick(WebDriver driver, WebElement element) {
((JavascriptExecutor) driver).executeScript("arguments[0].click();", element);
}
// 🌐 Open a specific URL // 🌐 Open a specific URL
public static void openUrl(WebDriver driver, String url) { public static void openUrl(WebDriver driver, String url) {
try { try {

View File

@ -0,0 +1,55 @@
package com.ghost.temple;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebDriver;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.charset.StandardCharsets;
import java.io.FileWriter;
public class StorageManager {
private static final String STORAGE_FILE = "storage.json";
// Save localStorage and sessionStorage to file
public static void saveStorage(WebDriver driver) {
try {
JavascriptExecutor js = (JavascriptExecutor) driver;
String localStorage = (String) js.executeScript("return JSON.stringify(window.localStorage);");
String sessionStorage = (String) js.executeScript("return JSON.stringify(window.sessionStorage);");
String json = "{\"localStorage\":" + localStorage + ",\"sessionStorage\":" + sessionStorage + "}";
try (FileWriter writer = new FileWriter(STORAGE_FILE)) {
writer.write(json);
}
System.out.println("✅ localStorage and sessionStorage saved");
} catch (IOException e) {
e.printStackTrace();
}
}
// Load localStorage and sessionStorage from file
public static void loadStorage(WebDriver driver, String url) {
try {
String json = new String(Files.readAllBytes(Paths.get(STORAGE_FILE)), StandardCharsets.UTF_8);
driver.get(url); // Open page first to set storage
JavascriptExecutor js = (JavascriptExecutor) driver;
js.executeScript(
"var storage = JSON.parse(arguments[0]);" +
"for (var key in storage.localStorage) { window.localStorage.setItem(key, storage.localStorage[key]); }" +
"for (var key in storage.sessionStorage) { window.sessionStorage.setItem(key, storage.sessionStorage[key]); }",
json
);
driver.navigate().refresh(); // Refresh so storage is applied
System.out.println("✅ localStorage and sessionStorage loaded");
} catch (IOException e) {
System.out.println("⚠️ Storage file not found, skipping load");
}
}
}

View File

@ -1,16 +1,23 @@
package com.ghost.temple.hooks; package com.ghost.temple.hooks;
import com.ghost.temple.CookieManager;
import com.ghost.temple.StorageManager;
import com.ghost.temple.driver.DriverManager; import com.ghost.temple.driver.DriverManager;
import io.cucumber.java.After; import io.cucumber.java.After;
import io.cucumber.java.Before; import io.cucumber.java.Before;
public class Hooks { public class Hooks {
private static final String APP_URL = "http://192.168.31.73:3000/";
@Before @Before
public void setUp() { public void setUp() {
DriverManager.initDriver(); DriverManager.initDriver();
StorageManager.loadStorage(DriverManager.getDriver(), APP_URL); // Load local/session storage
CookieManager.loadCookies(DriverManager.getDriver(), APP_URL); // Load cookies
} }
@After @After
public void tearDown() { public void tearDown() {
try { try {
@ -19,7 +26,9 @@ public class Hooks {
} catch (InterruptedException e) { } catch (InterruptedException e) {
e.printStackTrace(); e.printStackTrace();
} }
StorageManager.saveStorage(DriverManager.getDriver()); // Save local/session storage
CookieManager.saveCookies(DriverManager.getDriver()); // Save cookies
//DriverManager.quitDriver(); // Then quit driver //DriverManager.quitDriver(); // Then quit driver
} }
}
}

View File

@ -0,0 +1 @@
,arul,devbox,08.08.2025 17:18,file:///home/arul/.config/libreoffice/4;

Binary file not shown.

View File

@ -12,6 +12,8 @@ import com.ghost.temple.ReusableFunctions;
import com.ghost.temple.ExcelUtils; import com.ghost.temple.ExcelUtils;
import java.time.Duration; import java.time.Duration;
import java.util.Arrays;
import java.util.List;
public class Quests { public class Quests {
@ -26,6 +28,25 @@ public class Quests {
@FindBy(xpath = "//textarea[@id='description']") @FindBy(xpath = "//textarea[@id='description']")
WebElement questDescription; WebElement questDescription;
String createQuestBtnXpath = "//button[text() = 'Create Quest']";
public final String[] dropdownXPaths = {
"//label[text()='Difficulty']/following-sibling::select",
"//label[text()='Priority']/following-sibling::select",
"//label[text()='Frequency']/following-sibling::select",
"//label[text()='EXP Reward']/following-sibling::input",
"//label[text()='Stat Points']/following-sibling::input",
"//label[text()='Gold Reward']/following-sibling::input",
"//label[text()='STR']/following-sibling::input",
"//label[text()='AGI']/following-sibling::input",
"//label[text()='PER']/following-sibling::input",
"//label[text()='INT']/following-sibling::input",
"//label[text()='VIT']/following-sibling::input"
};
List<String> dropdownXpathList = Arrays.asList(dropdownXPaths);
public Quests(WebDriver driver) { public Quests(WebDriver driver) {
this.driver = driver; this.driver = driver;
PageFactory.initElements(driver, this); PageFactory.initElements(driver, this);
@ -50,7 +71,8 @@ public class Quests {
// Wait for the element to be clickable // Wait for the element to be clickable
ReusableFunctions.waitForElementToBeVisible(driver, questTitle, 5); ReusableFunctions.waitForElementToBeVisible(driver, questTitle, 5);
ReusableFunctions.fillQuestInputs(questTitle, questDescription, ExcelUtils.fetchQuestDataByColumns("Quests")); ReusableFunctions.waitForElementToBeVisible(driver, questDescription, 5);
ReusableFunctions.fillQuestInputsAndRewards(driver, questTitle, questDescription, createQuestBtnXpath, ExcelUtils.fetchQuestDataByColumns("Quests"), dropdownXpathList, ExcelUtils.fetchQuestDropdownOptions("Quests"));
} }
} }

View File

@ -22,7 +22,6 @@ public class QuestsStepDefs {
// Create Quests // Create Quests
questPage.clickcreateCustomQuest(); questPage.clickcreateCustomQuest();
questPage.createQuests(); questPage.createQuests();
throw new io.cucumber.java.PendingException();
} }
} }

View File

@ -4,3 +4,4 @@ Feature: Solo Leveling Quest Management
Given I open the solo level page Given I open the solo level page
When I click the Add Quest button When I click the Add Quest button
When I fill all the quests from Excel When I fill all the quests from Excel

1
storage.json Normal file
View File

@ -0,0 +1 @@
{"localStorage":{"soloLevelUpUserStats":"{\"name\":\"Arul\",\"level\":1,\"exp\":0,\"expToNextLevel\":100,\"job\":null,\"title\":null,\"hp\":100,\"maxHp\":100,\"mp\":10,\"maxMp\":10,\"fatigue\":0,\"gold\":0,\"stats\":{\"str\":10,\"agi\":10,\"per\":10,\"int\":10,\"vit\":10},\"statPoints\":0,\"equipment\":[],\"quests\":[{\"title\":\"Offgrid Hermit - Disconnect from Internet\",\"description\":\"ghostTemple system forces user by disabling internet by default in the computer to go offgrid. Equiped with self designed /etc/host based porn blocker. It still provides user option to enable the internet at boot. asking user to enter password. to make user realize that their decision is conscious.\",\"reward\":\"Experience only\",\"difficulty\":\"S\",\"priority\":\"High\",\"expiry\":\"Daily\",\"expReward\":30,\"statPointsReward\":1,\"goldReward\":0,\"statRewards\":{\"str\":0,\"agi\":0,\"per\":0,\"int\":0,\"vit\":0},\"itemRewards\":[],\"id\":\"4564702d-396c-4f03-bc74-0496015c40aa\",\"active\":true,\"completed\":false,\"progress\":0,\"isCustom\":true,\"createdAt\":1754666927823}],\"completedQuests\":[],\"inventory\":[{\"id\":\"item-health-potion\",\"name\":\"Health Potion\",\"type\":\"Consumable\",\"rarity\":\"Common\",\"description\":\"Restores 100 HP when consumed.\",\"quantity\":3},{\"id\":\"item-mana-potion\",\"name\":\"Mana Potion\",\"type\":\"Consumable\",\"rarity\":\"Common\",\"description\":\"Restores 50 MP when consumed.\",\"quantity\":2}]}"},"sessionStorage":{}}

View File

@ -0,0 +1 @@
,arul,devbox,08.08.2025 17:18,file:///home/arul/.config/libreoffice/4;

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,6 @@
/home/arul/ghost-temple-automation/ghost-temple-automation/src/main/java/com/ghost/temple/ReusableFunctions.java /home/arul/solo-level-app-automation/src/main/java/com/ghost/temple/StorageManager.java
/home/arul/ghost-temple-automation/ghost-temple-automation/src/main/java/com/ghost/temple/hooks/Hooks.java /home/arul/solo-level-app-automation/src/main/java/com/ghost/temple/ExcelUtils.java
/home/arul/ghost-temple-automation/ghost-temple-automation/src/main/java/com/ghost/temple/driver/DriverManager.java /home/arul/solo-level-app-automation/src/main/java/com/ghost/temple/driver/DriverManager.java
/home/arul/ghost-temple-automation/ghost-temple-automation/src/main/java/com/ghost/temple/CookieManager.java /home/arul/solo-level-app-automation/src/main/java/com/ghost/temple/hooks/Hooks.java
/home/arul/ghost-temple-automation/ghost-temple-automation/src/main/java/com/ghost/temple/ExcelUtils.java /home/arul/solo-level-app-automation/src/main/java/com/ghost/temple/CookieManager.java
/home/arul/solo-level-app-automation/src/main/java/com/ghost/temple/ReusableFunctions.java

View File

@ -1,7 +1,7 @@
/home/arul/ghost-temple-automation/ghost-temple-automation/src/test/java/com/ghost/temple/pages/Quests.java /home/arul/solo-level-app-automation/src/test/java/com/ghost/temple/stepdefs/HomePageStepDefs.java
/home/arul/ghost-temple-automation/ghost-temple-automation/src/test/java/com/ghost/temple/stepdefs/QuestsStepDefs.java /home/arul/solo-level-app-automation/src/test/java/com/ghost/temple/AppTest.java
/home/arul/ghost-temple-automation/ghost-temple-automation/src/test/java/com/ghost/temple/stepdefs/HomePageStepDefs.java /home/arul/solo-level-app-automation/src/test/java/com/ghost/temple/BaseTest.java
/home/arul/ghost-temple-automation/ghost-temple-automation/src/test/java/com/ghost/temple/AppTest.java /home/arul/solo-level-app-automation/src/test/java/com/ghost/temple/pages/HomePage.java
/home/arul/ghost-temple-automation/ghost-temple-automation/src/test/java/com/ghost/temple/BaseTest.java /home/arul/solo-level-app-automation/src/test/java/com/ghost/temple/TestRunner.java
/home/arul/ghost-temple-automation/ghost-temple-automation/src/test/java/com/ghost/temple/pages/HomePage.java /home/arul/solo-level-app-automation/src/test/java/com/ghost/temple/pages/Quests.java
/home/arul/ghost-temple-automation/ghost-temple-automation/src/test/java/com/ghost/temple/TestRunner.java /home/arul/solo-level-app-automation/src/test/java/com/ghost/temple/stepdefs/QuestsStepDefs.java

View File

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<testsuite tests="1" failures="0" name="com.ghost.temple.AppTest" time="0.001" errors="0" skipped="0"> <testsuite tests="1" failures="0" name="com.ghost.temple.AppTest" time="0" errors="0" skipped="0">
<properties> <properties>
<property name="java.runtime.name" value="OpenJDK Runtime Environment"/> <property name="java.runtime.name" value="OpenJDK Runtime Environment"/>
<property name="java.vm.version" value="17.0.15+6-Debian-1deb12u1"/> <property name="java.vm.version" value="17.0.15+6-Debian-1deb12u1"/>
<property name="sun.boot.library.path" value="/usr/lib/jvm/java-17-openjdk-amd64/lib"/> <property name="sun.boot.library.path" value="/usr/lib/jvm/java-17-openjdk-amd64/lib"/>
<property name="maven.multiModuleProjectDirectory" value="/home/arul/ghost-temple-automation/ghost-temple-automation"/> <property name="maven.multiModuleProjectDirectory" value="/home/arul/solo-level-app-automation"/>
<property name="java.vm.vendor" value="Debian"/> <property name="java.vm.vendor" value="Debian"/>
<property name="java.vendor.url" value="https://tracker.debian.org/openjdk-17"/> <property name="java.vendor.url" value="https://tracker.debian.org/openjdk-17"/>
<property name="guice.disable.misplaced.annotation.check" value="true"/> <property name="guice.disable.misplaced.annotation.check" value="true"/>
@ -13,7 +13,7 @@
<property name="user.country" value="IN"/> <property name="user.country" value="IN"/>
<property name="sun.java.launcher" value="SUN_STANDARD"/> <property name="sun.java.launcher" value="SUN_STANDARD"/>
<property name="java.vm.specification.name" value="Java Virtual Machine Specification"/> <property name="java.vm.specification.name" value="Java Virtual Machine Specification"/>
<property name="user.dir" value="/home/arul/ghost-temple-automation/ghost-temple-automation"/> <property name="user.dir" value="/home/arul/solo-level-app-automation"/>
<property name="java.vm.compressedOopsMode" value="32-bit"/> <property name="java.vm.compressedOopsMode" value="32-bit"/>
<property name="java.runtime.version" value="17.0.15+6-Debian-1deb12u1"/> <property name="java.runtime.version" value="17.0.15+6-Debian-1deb12u1"/>
<property name="os.arch" value="amd64"/> <property name="os.arch" value="amd64"/>
@ -58,5 +58,5 @@
<property name="sun.cpu.endian" value="little"/> <property name="sun.cpu.endian" value="little"/>
<property name="sun.stdout.encoding" value="UTF-8"/> <property name="sun.stdout.encoding" value="UTF-8"/>
</properties> </properties>
<testcase classname="com.ghost.temple.AppTest" name="basicTest" time="0.001"/> <testcase classname="com.ghost.temple.AppTest" name="basicTest" time="0"/>
</testsuite> </testsuite>

View File

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<testsuite tests="1" failures="0" name="com.ghost.temple.TestRunner" time="50.662" errors="1" skipped="0"> <testsuite tests="1" failures="0" name="com.ghost.temple.TestRunner" time="38.936" errors="1" skipped="0">
<properties> <properties>
<property name="java.runtime.name" value="OpenJDK Runtime Environment"/> <property name="java.runtime.name" value="OpenJDK Runtime Environment"/>
<property name="java.vm.version" value="17.0.15+6-Debian-1deb12u1"/> <property name="java.vm.version" value="17.0.15+6-Debian-1deb12u1"/>
<property name="sun.boot.library.path" value="/usr/lib/jvm/java-17-openjdk-amd64/lib"/> <property name="sun.boot.library.path" value="/usr/lib/jvm/java-17-openjdk-amd64/lib"/>
<property name="maven.multiModuleProjectDirectory" value="/home/arul/ghost-temple-automation/ghost-temple-automation"/> <property name="maven.multiModuleProjectDirectory" value="/home/arul/solo-level-app-automation"/>
<property name="java.vm.vendor" value="Debian"/> <property name="java.vm.vendor" value="Debian"/>
<property name="java.vendor.url" value="https://tracker.debian.org/openjdk-17"/> <property name="java.vendor.url" value="https://tracker.debian.org/openjdk-17"/>
<property name="guice.disable.misplaced.annotation.check" value="true"/> <property name="guice.disable.misplaced.annotation.check" value="true"/>
@ -13,7 +13,7 @@
<property name="user.country" value="IN"/> <property name="user.country" value="IN"/>
<property name="sun.java.launcher" value="SUN_STANDARD"/> <property name="sun.java.launcher" value="SUN_STANDARD"/>
<property name="java.vm.specification.name" value="Java Virtual Machine Specification"/> <property name="java.vm.specification.name" value="Java Virtual Machine Specification"/>
<property name="user.dir" value="/home/arul/ghost-temple-automation/ghost-temple-automation"/> <property name="user.dir" value="/home/arul/solo-level-app-automation"/>
<property name="java.vm.compressedOopsMode" value="32-bit"/> <property name="java.vm.compressedOopsMode" value="32-bit"/>
<property name="java.runtime.version" value="17.0.15+6-Debian-1deb12u1"/> <property name="java.runtime.version" value="17.0.15+6-Debian-1deb12u1"/>
<property name="os.arch" value="amd64"/> <property name="os.arch" value="amd64"/>
@ -58,14 +58,52 @@
<property name="sun.cpu.endian" value="little"/> <property name="sun.cpu.endian" value="little"/>
<property name="sun.stdout.encoding" value="UTF-8"/> <property name="sun.stdout.encoding" value="UTF-8"/>
</properties> </properties>
<testcase classname="Solo Leveling Quest Management" name="Open Solo Leveling page and click Add Quest" time="50.662"> <testcase classname="Solo Leveling Quest Management" name="Open Solo Leveling page and click Add Quest" time="38.936">
<error message="TODO: implement me" type="io.cucumber.java.PendingException">io.cucumber.java.PendingException: TODO: implement me <error message="Unable to locate element: //textarea[@id=&apos;description&apos;]
at com.ghost.temple.stepdefs.QuestsStepDefs.i_fill_all_the_quests_from_excel(QuestsStepDefs.java:25) For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#no-such-element-exception
at ✽.I fill all the quests from Excel(file:///home/arul/ghost-temple-automation/ghost-temple-automation/src/test/resources/features/questCreator.feature:6) Build info: version: &apos;4.21.0&apos;, revision: &apos;79ed462ef4&apos;
System info: os.name: &apos;Linux&apos;, os.arch: &apos;amd64&apos;, os.version: &apos;6.1.0-37-amd64&apos;, java.version: &apos;17.0.15&apos;
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Command: [2acbdf1d-be93-4602-a50f-c46984eb1d4d, findElement {using=xpath, value=//textarea[@id=&apos;description&apos;]}]
Capabilities {acceptInsecureCerts: true, browserName: firefox, browserVersion: 139.0.1, moz:accessibilityChecks: false, moz:buildID: 20250529122813, moz:geckodriverVersion: 0.36.0, moz:headless: false, moz:platformVersion: 6.1.0-37-amd64, moz:processID: 4318, moz:profile: /tmp/rust_mozprofile9dYrRE, moz:shutdownTimeout: 60000, moz:webdriverClick: true, moz:windowless: false, pageLoadStrategy: normal, platformName: linux, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, userAgent: Mozilla/5.0 (X11; Linux x86...}
Session ID: 2acbdf1d-be93-4602-a50f-c46984eb1d4d" type="org.openqa.selenium.NoSuchElementException">org.openqa.selenium.NoSuchElementException: Unable to locate element: //textarea[@id=&apos;description&apos;]
For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#no-such-element-exception
Build info: version: &apos;4.21.0&apos;, revision: &apos;79ed462ef4&apos;
System info: os.name: &apos;Linux&apos;, os.arch: &apos;amd64&apos;, os.version: &apos;6.1.0-37-amd64&apos;, java.version: &apos;17.0.15&apos;
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Command: [2acbdf1d-be93-4602-a50f-c46984eb1d4d, findElement {using=xpath, value=//textarea[@id=&apos;description&apos;]}]
Capabilities {acceptInsecureCerts: true, browserName: firefox, browserVersion: 139.0.1, moz:accessibilityChecks: false, moz:buildID: 20250529122813, moz:geckodriverVersion: 0.36.0, moz:headless: false, moz:platformVersion: 6.1.0-37-amd64, moz:processID: 4318, moz:profile: /tmp/rust_mozprofile9dYrRE, moz:shutdownTimeout: 60000, moz:webdriverClick: true, moz:windowless: false, pageLoadStrategy: normal, platformName: linux, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, userAgent: Mozilla/5.0 (X11; Linux x86...}
Session ID: 2acbdf1d-be93-4602-a50f-c46984eb1d4d
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
at org.openqa.selenium.remote.ErrorCodec.decode(ErrorCodec.java:167)
at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:138)
at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:50)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:190)
at org.openqa.selenium.remote.service.DriverCommandExecutor.invokeExecute(DriverCommandExecutor.java:216)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:174)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:518)
at org.openqa.selenium.remote.ElementLocation$ElementFinder$2.findElement(ElementLocation.java:165)
at org.openqa.selenium.remote.ElementLocation.findElement(ElementLocation.java:59)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:355)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:349)
at org.openqa.selenium.support.pagefactory.DefaultElementLocator.findElement(DefaultElementLocator.java:68)
at org.openqa.selenium.support.pagefactory.internal.LocatingElementHandler.invoke(LocatingElementHandler.java:38)
at jdk.proxy2/jdk.proxy2.$Proxy26.clear(Unknown Source)
at com.ghost.temple.ReusableFunctions.fillInput(ReusableFunctions.java:182)
at com.ghost.temple.ReusableFunctions.fillQuestInputsAndRewards(ReusableFunctions.java:91)
at com.ghost.temple.pages.Quests.createQuests(Quests.java:75)
at com.ghost.temple.stepdefs.QuestsStepDefs.i_fill_all_the_quests_from_excel(QuestsStepDefs.java:24)
at ✽.I fill all the quests from Excel(file:///home/arul/solo-level-app-automation/src/test/resources/features/questCreator.feature:6)
</error> </error>
<system-out> <system-out>
Scenario: Open Solo Leveling page and click Add Quest # src/test/resources/features/questCreator.feature:3 Scenario: Open Solo Leveling page and click Add Quest # src/test/resources/features/questCreator.feature:3
Launched Firefox with real profile 😎 Launched Firefox with real profile 😎
⚠️ Storage file not found, skipping load
⚠ No cookies file found, starting fresh.
Given I open the solo level page # com.ghost.temple.stepdefs.HomePageStepDefs.i_open_the_solo_level_page() Given I open the solo level page # com.ghost.temple.stepdefs.HomePageStepDefs.i_open_the_solo_level_page()
When I click the Add Quest button # com.ghost.temple.stepdefs.HomePageStepDefs.i_click_the_add_quest_button() When I click the Add Quest button # com.ghost.temple.stepdefs.HomePageStepDefs.i_click_the_add_quest_button()
📄 Row 0: [Offgrid Hermit - Disconnect from Internet, ghostTemple system forces user by disabling internet by default in the computer to go offgrid. Equiped with self designed /etc/host based porn blocker. It still provides user option to enable the internet at boot. asking user to enter password. to make user realize that their decision is conscious.] 📄 Row 0: [Offgrid Hermit - Disconnect from Internet, ghostTemple system forces user by disabling internet by default in the computer to go offgrid. Equiped with self designed /etc/host based porn blocker. It still provides user option to enable the internet at boot. asking user to enter password. to make user realize that their decision is conscious.]
@ -74,16 +112,66 @@ Launched Firefox with real profile 😎
📄 Row 3: [The Architect of Himself - Leveling up strength both physically and mentally, 1. Exercise everyday Morning 1 hr (Cardio + strength) 2. Gain Knowledge on New concept or Technology, Read books. 3. Train Martial arts - Armed or Unarmed combat styles. Focus on Leveling up your Intellect, your Strength, Your Martial arts skill and your Aesthetics eventually.] 📄 Row 3: [The Architect of Himself - Leveling up strength both physically and mentally, 1. Exercise everyday Morning 1 hr (Cardio + strength) 2. Gain Knowledge on New concept or Technology, Read books. 3. Train Martial arts - Armed or Unarmed combat styles. Focus on Leveling up your Intellect, your Strength, Your Martial arts skill and your Aesthetics eventually.]
📄 Row 4: [The Phoenix - Rise from Ashes, Keep Moving Forward, No matter what. No matter how much pain you face. you can do take breaks to learn from failures. But never quit . Never Settle. Accept your Pain. see it as a part of life. both physical and Mental Pain. If you can cure it you can cure them. but if you can&apos;t never use them as an excuse to be Lower. Always improve from pain and be strong if possible. the Key idea is not to stop at any cost and keep moving forward. Not to embrace pain or romanticize it.] 📄 Row 4: [The Phoenix - Rise from Ashes, Keep Moving Forward, No matter what. No matter how much pain you face. you can do take breaks to learn from failures. But never quit . Never Settle. Accept your Pain. see it as a part of life. both physical and Mental Pain. If you can cure it you can cure them. but if you can&apos;t never use them as an excuse to be Lower. Always improve from pain and be strong if possible. the Key idea is not to stop at any cost and keep moving forward. Not to embrace pain or romanticize it.]
📦 Total quests fetched: 5 📦 Total quests fetched: 5
📝 Filling → Title: &quot;Offgrid Hermit - Disconnect from Internet&quot;, Description: &quot;ghostTemple system forces user by disabling internet by default in the computer to go offgrid. Equiped with self designed /etc/host based porn blocker. It still provides user option to enable the internet at boot. asking user to enter password. to make user realize that their decision is conscious.&quot; 📝 Filling quest #1 → Title: &quot;Offgrid Hermit - Disconnect from Internet&quot;, Description: &quot;ghostTemple system forces user by disabling internet by default in the computer to go offgrid. Equiped with self designed /etc/host based porn blocker. It still provides user option to enable the internet at boot. asking user to enter password. to make user realize that their decision is conscious.&quot;
📝 Filling → Title: &quot;The Refiner - Appearance Leveling&quot;, Description: &quot;Focusing on Skin health, Hair health, preventing Hair loss, Preventing Fat gain. Focused on Weight Loss and over all Hygiene the way we look. To Attract people and be charismatic.&quot; 🎯 Selecting dropdown (XPath: //label[text()=&apos;Difficulty&apos;]/following-sibling::select) with option: S (Hardest)
📝 Filling → Title: &quot;King of Deception - Leveling up Art of Attraction&quot;, Description: &quot;Focused on building a solid character. that is strong.. Talented, Attract people and seductive at same time. Manipulative in good way. Positive Manipulation by doing a good job on something we do and gaining trust among other people.&quot; Status: Option &apos;S (Hardest)&apos; selected
📝 Filling → Title: &quot;The Architect of Himself - Leveling up strength both physically and mentally&quot;, Description: &quot;1. Exercise everyday Morning 1 hr (Cardio + strength) 2. Gain Knowledge on New concept or Technology, Read books. 3. Train Martial arts - Armed or Unarmed combat styles. Focus on Leveling up your Intellect, your Strength, Your Martial arts skill and your Aesthetics eventually.&quot; 🎯 Selecting dropdown (XPath: //label[text()=&apos;Priority&apos;]/following-sibling::select) with option: High
📝 Filling → Title: &quot;The Phoenix - Rise from Ashes&quot;, Description: &quot;Keep Moving Forward, No matter what. No matter how much pain you face. you can do take breaks to learn from failures. But never quit . Never Settle. Accept your Pain. see it as a part of life. both physical and Mental Pain. If you can cure it you can cure them. but if you can&apos;t never use them as an excuse to be Lower. Always improve from pain and be strong if possible. the Key idea is not to stop at any cost and keep moving forward. Not to embrace pain or romanticize it.&quot; Status: Option &apos;High&apos; selected
🎯 Selecting dropdown (XPath: //label[text()=&apos;Frequency&apos;]/following-sibling::select) with option: Daily
Status: Option &apos;Daily&apos; selected
⌨️ Setting input (XPath: //label[text()=&apos;EXP Reward&apos;]/following-sibling::input) to value: 30
Status: Input field set to &apos;30&apos;
⌨️ Setting input (XPath: //label[text()=&apos;Stat Points&apos;]/following-sibling::input) to value: 1
Status: Input field set to &apos;1&apos;
⌨️ Setting input (XPath: //label[text()=&apos;Gold Reward&apos;]/following-sibling::input) to value: 0
Status: Input field set to &apos;0&apos;
⌨️ Setting input (XPath: //label[text()=&apos;STR&apos;]/following-sibling::input) to value: 2
Status: Input field set to &apos;2&apos;
⌨️ Setting input (XPath: //label[text()=&apos;AGI&apos;]/following-sibling::input) to value: 1
Status: Input field set to &apos;1&apos;
⌨️ Setting input (XPath: //label[text()=&apos;PER&apos;]/following-sibling::input) to value: 1
Status: Input field set to &apos;1&apos;
⌨️ Setting input (XPath: //label[text()=&apos;INT&apos;]/following-sibling::input) to value: 3
Status: Input field set to &apos;3&apos;
⌨️ Setting input (XPath: //label[text()=&apos;VIT&apos;]/following-sibling::input) to value: 2
Status: Input field set to &apos;2&apos;
📝 Filling quest #2 → Title: &quot;The Refiner - Appearance Leveling&quot;, Description: &quot;Focusing on Skin health, Hair health, preventing Hair loss, Preventing Fat gain. Focused on Weight Loss and over all Hygiene the way we look. To Attract people and be charismatic.&quot;
When I fill all the quests from Excel # com.ghost.temple.stepdefs.QuestsStepDefs.i_fill_all_the_quests_from_excel() When I fill all the quests from Excel # com.ghost.temple.stepdefs.QuestsStepDefs.i_fill_all_the_quests_from_excel()
io.cucumber.java.PendingException: TODO: implement me org.openqa.selenium.NoSuchElementException: Unable to locate element: //textarea[@id=&apos;description&apos;]
at com.ghost.temple.stepdefs.QuestsStepDefs.i_fill_all_the_quests_from_excel(QuestsStepDefs.java:25) For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#no-such-element-exception
at ✽.I fill all the quests from Excel(file:///home/arul/ghost-temple-automation/ghost-temple-automation/src/test/resources/features/questCreator.feature:6) Build info: version: &apos;4.21.0&apos;, revision: &apos;79ed462ef4&apos;
System info: os.name: &apos;Linux&apos;, os.arch: &apos;amd64&apos;, os.version: &apos;6.1.0-37-amd64&apos;, java.version: &apos;17.0.15&apos;
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Command: [2acbdf1d-be93-4602-a50f-c46984eb1d4d, findElement {using=xpath, value=//textarea[@id=&apos;description&apos;]}]
Capabilities {acceptInsecureCerts: true, browserName: firefox, browserVersion: 139.0.1, moz:accessibilityChecks: false, moz:buildID: 20250529122813, moz:geckodriverVersion: 0.36.0, moz:headless: false, moz:platformVersion: 6.1.0-37-amd64, moz:processID: 4318, moz:profile: /tmp/rust_mozprofile9dYrRE, moz:shutdownTimeout: 60000, moz:webdriverClick: true, moz:windowless: false, pageLoadStrategy: normal, platformName: linux, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, userAgent: Mozilla/5.0 (X11; Linux x86...}
Session ID: 2acbdf1d-be93-4602-a50f-c46984eb1d4d
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
at org.openqa.selenium.remote.ErrorCodec.decode(ErrorCodec.java:167)
at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:138)
at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:50)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:190)
at org.openqa.selenium.remote.service.DriverCommandExecutor.invokeExecute(DriverCommandExecutor.java:216)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:174)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:518)
at org.openqa.selenium.remote.ElementLocation$ElementFinder$2.findElement(ElementLocation.java:165)
at org.openqa.selenium.remote.ElementLocation.findElement(ElementLocation.java:59)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:355)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:349)
at org.openqa.selenium.support.pagefactory.DefaultElementLocator.findElement(DefaultElementLocator.java:68)
at org.openqa.selenium.support.pagefactory.internal.LocatingElementHandler.invoke(LocatingElementHandler.java:38)
at jdk.proxy2/jdk.proxy2.$Proxy26.clear(Unknown Source)
at com.ghost.temple.ReusableFunctions.fillInput(ReusableFunctions.java:182)
at com.ghost.temple.ReusableFunctions.fillQuestInputsAndRewards(ReusableFunctions.java:91)
at com.ghost.temple.pages.Quests.createQuests(Quests.java:75)
at com.ghost.temple.stepdefs.QuestsStepDefs.i_fill_all_the_quests_from_excel(QuestsStepDefs.java:24)
at ✽.I fill all the quests from Excel(file:///home/arul/solo-level-app-automation/src/test/resources/features/questCreator.feature:6)
✅ localStorage and sessionStorage saved
🍪 Cookies saved successfully!
</system-out> </system-out>
<system-err>SLF4J(W): No SLF4J providers were found. <system-err>SLF4J(W): No SLF4J providers were found.
SLF4J(W): Defaulting to no-operation (NOP) logger implementation SLF4J(W): Defaulting to no-operation (NOP) logger implementation

View File

@ -1,4 +1,4 @@
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Test set: com.ghost.temple.AppTest Test set: com.ghost.temple.AppTest
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec

View File

@ -1,9 +1,38 @@
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Test set: com.ghost.temple.TestRunner Test set: com.ghost.temple.TestRunner
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 51.097 sec <<< FAILURE! Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 39.42 sec <<< FAILURE!
Open Solo Leveling page and click Add Quest(Solo Leveling Quest Management) Time elapsed: 50.662 sec <<< ERROR! Open Solo Leveling page and click Add Quest(Solo Leveling Quest Management) Time elapsed: 38.936 sec <<< ERROR!
io.cucumber.java.PendingException: TODO: implement me org.openqa.selenium.NoSuchElementException: Unable to locate element: //textarea[@id='description']
at com.ghost.temple.stepdefs.QuestsStepDefs.i_fill_all_the_quests_from_excel(QuestsStepDefs.java:25) For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#no-such-element-exception
at ✽.I fill all the quests from Excel(file:///home/arul/ghost-temple-automation/ghost-temple-automation/src/test/resources/features/questCreator.feature:6) Build info: version: '4.21.0', revision: '79ed462ef4'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '6.1.0-37-amd64', java.version: '17.0.15'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Command: [2acbdf1d-be93-4602-a50f-c46984eb1d4d, findElement {using=xpath, value=//textarea[@id='description']}]
Capabilities {acceptInsecureCerts: true, browserName: firefox, browserVersion: 139.0.1, moz:accessibilityChecks: false, moz:buildID: 20250529122813, moz:geckodriverVersion: 0.36.0, moz:headless: false, moz:platformVersion: 6.1.0-37-amd64, moz:processID: 4318, moz:profile: /tmp/rust_mozprofile9dYrRE, moz:shutdownTimeout: 60000, moz:webdriverClick: true, moz:windowless: false, pageLoadStrategy: normal, platformName: linux, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, userAgent: Mozilla/5.0 (X11; Linux x86...}
Session ID: 2acbdf1d-be93-4602-a50f-c46984eb1d4d
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
at org.openqa.selenium.remote.ErrorCodec.decode(ErrorCodec.java:167)
at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:138)
at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:50)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:190)
at org.openqa.selenium.remote.service.DriverCommandExecutor.invokeExecute(DriverCommandExecutor.java:216)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:174)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:518)
at org.openqa.selenium.remote.ElementLocation$ElementFinder$2.findElement(ElementLocation.java:165)
at org.openqa.selenium.remote.ElementLocation.findElement(ElementLocation.java:59)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:355)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:349)
at org.openqa.selenium.support.pagefactory.DefaultElementLocator.findElement(DefaultElementLocator.java:68)
at org.openqa.selenium.support.pagefactory.internal.LocatingElementHandler.invoke(LocatingElementHandler.java:38)
at jdk.proxy2/jdk.proxy2.$Proxy26.clear(Unknown Source)
at com.ghost.temple.ReusableFunctions.fillInput(ReusableFunctions.java:182)
at com.ghost.temple.ReusableFunctions.fillQuestInputsAndRewards(ReusableFunctions.java:91)
at com.ghost.temple.pages.Quests.createQuests(Quests.java:75)
at com.ghost.temple.stepdefs.QuestsStepDefs.i_fill_all_the_quests_from_excel(QuestsStepDefs.java:24)
at ✽.I fill all the quests from Excel(file:///home/arul/solo-level-app-automation/src/test/resources/features/questCreator.feature:6)

View File

@ -4,3 +4,4 @@ Feature: Solo Leveling Quest Management
Given I open the solo level page Given I open the solo level page
When I click the Add Quest button When I click the Add Quest button
When I fill all the quests from Excel When I fill all the quests from Excel