Skip to main content
added 875 characters in body
Source Link

Could someone please let me know if there is any way we can disable the logs generated by the page factory for Chrome and Firefox

I did try the below options for chrome and firefox and I had also turned off the Selenium logs.

Selenium - java.util.logging.Logger.getLogger("org.openqa.selenium").setLevel(Level.OFF);

Chrome - System.setProperty("webdriver.chrome.silentOutput", "true");

Firefox - System.setProperty(FirefoxDriver.SystemProperty.DRIVER_USE_MARIONETTE, "true");
                System.setProperty(FirefoxDriver.SystemProperty.BROWSER_LOGFILE, "/dev/null");

But inspite of that these logs are still getting displayed.

Thanks in advance.

enter image description here

Please find below the code:

public class LoginPage {

@FindBy(xpath = "//input[@id='txtUserName']")
WebElement textfield_UserName;
@FindBy(xpath = "//input[@id='txtPassword']")
WebElement textfield_Password;
@FindBy(xpath = "//div/button[@id='btnSave']")
WebElement button_Login;


public LoginPage() {

    super();

}

public void loginPageDisplayed(String userName, String password) throws IOException {

    try {

        if (!status.equalsIgnoreCase("Failed")) {

            PageFactory.initElements(driver, this);
            BasePage.waitUntilElementIsVisible(label_LoginPage);

            BasePage.sendKeysToWebElement(textfield_UserName, userName);
            BasePage.sendKeysToWebElement(textfield_Password, password);

            BasePage.waitAndClickElement(button_Login);

        }

    } catch (Exception e) {

        e.printStackTrace();

    }

}

}

Could someone please let me know if there is any way we can disable the logs generated by the page factory for Chrome and Firefox

I did try the below options for chrome and firefox and I had also turned off the Selenium logs.

Selenium - java.util.logging.Logger.getLogger("org.openqa.selenium").setLevel(Level.OFF);

Chrome - System.setProperty("webdriver.chrome.silentOutput", "true");

Firefox - System.setProperty(FirefoxDriver.SystemProperty.DRIVER_USE_MARIONETTE, "true");
                System.setProperty(FirefoxDriver.SystemProperty.BROWSER_LOGFILE, "/dev/null");

But inspite of that these logs are still getting displayed.

Thanks in advance.

enter image description here

Could someone please let me know if there is any way we can disable the logs generated by the page factory for Chrome and Firefox

I did try the below options for chrome and firefox and I had also turned off the Selenium logs.

Selenium - java.util.logging.Logger.getLogger("org.openqa.selenium").setLevel(Level.OFF);

Chrome - System.setProperty("webdriver.chrome.silentOutput", "true");

Firefox - System.setProperty(FirefoxDriver.SystemProperty.DRIVER_USE_MARIONETTE, "true");
                System.setProperty(FirefoxDriver.SystemProperty.BROWSER_LOGFILE, "/dev/null");

But inspite of that these logs are still getting displayed.

Thanks in advance.

enter image description here

Please find below the code:

public class LoginPage {

@FindBy(xpath = "//input[@id='txtUserName']")
WebElement textfield_UserName;
@FindBy(xpath = "//input[@id='txtPassword']")
WebElement textfield_Password;
@FindBy(xpath = "//div/button[@id='btnSave']")
WebElement button_Login;


public LoginPage() {

    super();

}

public void loginPageDisplayed(String userName, String password) throws IOException {

    try {

        if (!status.equalsIgnoreCase("Failed")) {

            PageFactory.initElements(driver, this);
            BasePage.waitUntilElementIsVisible(label_LoginPage);

            BasePage.sendKeysToWebElement(textfield_UserName, userName);
            BasePage.sendKeysToWebElement(textfield_Password, password);

            BasePage.waitAndClickElement(button_Login);

        }

    } catch (Exception e) {

        e.printStackTrace();

    }

}

}

Could someone please let me know if there is any way we can disable the logs generated by the page factory for Chrome and Firefox

I did try the below options for chrome and firefox and I had also turned off the Selenium logs.

Selenium - java.util.logging.Logger.getLogger("org.openqa.selenium").setLevel(Level.OFF);

Chrome - System.setProperty("webdriver.chrome.silentOutput", "true");

Firefox - System.setProperty(FirefoxDriver.SystemProperty.DRIVER_USE_MARIONETTE, "true"); System.setProperty(FirefoxDriver.SystemProperty.BROWSER_LOGFILE, "/dev/null");

Selenium - java.util.logging.Logger.getLogger("org.openqa.selenium").setLevel(Level.OFF);

Chrome - System.setProperty("webdriver.chrome.silentOutput", "true");

Firefox - System.setProperty(FirefoxDriver.SystemProperty.DRIVER_USE_MARIONETTE, "true");
                System.setProperty(FirefoxDriver.SystemProperty.BROWSER_LOGFILE, "/dev/null");

But inspite of that these logs are still getting displayed.

Thanks in advance.

enter image description here

Could someone please let me know if there is any way we can disable the logs generated by the page factory for Chrome and Firefox

I did try the below options for chrome and firefox and I had also turned off the Selenium logs.

Selenium - java.util.logging.Logger.getLogger("org.openqa.selenium").setLevel(Level.OFF);

Chrome - System.setProperty("webdriver.chrome.silentOutput", "true");

Firefox - System.setProperty(FirefoxDriver.SystemProperty.DRIVER_USE_MARIONETTE, "true"); System.setProperty(FirefoxDriver.SystemProperty.BROWSER_LOGFILE, "/dev/null");

But inspite of that these logs are still getting displayed.

Thanks in advance.

enter image description here

Could someone please let me know if there is any way we can disable the logs generated by the page factory for Chrome and Firefox

I did try the below options for chrome and firefox and I had also turned off the Selenium logs.

Selenium - java.util.logging.Logger.getLogger("org.openqa.selenium").setLevel(Level.OFF);

Chrome - System.setProperty("webdriver.chrome.silentOutput", "true");

Firefox - System.setProperty(FirefoxDriver.SystemProperty.DRIVER_USE_MARIONETTE, "true");
                System.setProperty(FirefoxDriver.SystemProperty.BROWSER_LOGFILE, "/dev/null");

But inspite of that these logs are still getting displayed.

Thanks in advance.

enter image description here

Source Link

Is there a way to disable the logs created by the pagefactory

Could someone please let me know if there is any way we can disable the logs generated by the page factory for Chrome and Firefox

I did try the below options for chrome and firefox and I had also turned off the Selenium logs.

Selenium - java.util.logging.Logger.getLogger("org.openqa.selenium").setLevel(Level.OFF);

Chrome - System.setProperty("webdriver.chrome.silentOutput", "true");

Firefox - System.setProperty(FirefoxDriver.SystemProperty.DRIVER_USE_MARIONETTE, "true"); System.setProperty(FirefoxDriver.SystemProperty.BROWSER_LOGFILE, "/dev/null");

But inspite of that these logs are still getting displayed.

Thanks in advance.

enter image description here