While running Selenium script in Jenkins, facing JavaScript error: resource://activity-stream/lib/ActivityStreamPrefs.jsm

0

When I try to run a Selenium script in Jenkins, I am getting following error

JavaScript error: resource://activity-stream/lib/ActivityStreamPrefs.jsm, line 27: NS_ERROR_ILLEGAL_VALUE: Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIPrefBranch.removeObserver]

The code:

package com.expertus.admin_Administer_PEOPLE;

import java.io.IOException;

import org.openqa.selenium.By;
import org.testng.SkipException;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.AfterTest;
import org.testng.annotations.Test;

import com.expertus.libraries.Config;
import com.expertus.libraries.Generic;

public class CreateOrganization extends Config {


    @Test
    public void createOrganizationValidDataTest() throws IOException, InterruptedException {

        String moduleControllerPath = "./ModuleController/ModuleController.xlsx";
        String mainModule = Generic.getCellValue(moduleControllerPath, "Main", 1, 0);
        String es = Generic.getCellValue(moduleControllerPath, "Main", 1, 1);

        String testCaseName = Generic.getCellValue(moduleControllerPath, mainModule, 5, 0);
        String testcase_es = Generic.getCellValue(moduleControllerPath, mainModule, 5, 1);

        hm.put(testCaseName, "flag");
        if (es.equalsIgnoreCase("yes")) {

            if (testcase_es.equalsIgnoreCase("yes")) {

                String testDataPath = "./test_data/Admin/Administer/People.xlsx";
                APP_LOGS.debug("***********************" + "TestCase " + " \" " + testCaseName + " \" "
                        + " starts executing " + "***********************");
                ps.signIN(CONFIG.getProperty("USERNAME"), CONFIG.getProperty("PASSWORD"), testCaseName, "SIGN-IN");
                ps.webdriverWaitVisibilityOfElementLocated(
                        "//*[@id='narrow-search-actionbar-list']/li/a/span[text()='Create Course']");
                ps.assertPage("//*[@id='narrow-search-actionbar-list']/li/a/span[text()='Create Course']", testCaseName,
                        "Courses and Classes");
                ps.clickPeople();
                ps.webdriverWaitVisibilityOfElementLocated(
                        "//*[@id='narrow-search-actionbar-list']/li/a/span[text()='Create User']");
                ps.assertPage("//*[@id='narrow-search-actionbar-list']/li/a/span[text()='Create User']", testCaseName,
                        "User");
                ps.clickOrganization();
                ps.webdriverWaitVisibilityOfElementLocated(
                        "//*[@id='narrow-search-actionbar-list']/li/a/span[text()='Create Organization']");
                ps.assertPage("//*[@id='narrow-search-actionbar-list']/li/a/span[text()='Create Organization']",
                        testCaseName, "Organization");

                int rc = Generic.getRowCount(testDataPath, testCaseName);

                for (int i = 1; i <= rc; i++) {

                    APP_LOGS.debug("***** Data Driving from row no :" + i + " *****");

                    ps.clickCreateOrgButton();
                    ps.assertPopUP("//span[text()='Organization']", this.getClass().getSimpleName(), "ORGANIZATION");

                    String Name = Generic.getCellValue(testDataPath, testCaseName, i, 0);
                    String Organization_Type = Generic.getCellValue(testDataPath, testCaseName, i, 1);
                    String Cost_Center = Generic.getCellValue(testDataPath, testCaseName, i, 2);
                    String Description = Generic.getCellValue(testDataPath, testCaseName, i, 3);
                    String Parent_Organization = Generic.getCellValue(testDataPath, testCaseName, i, 4);
                    String Contact = Generic.getCellValue(testDataPath, testCaseName, i, 5);
                    String Label = Generic.getCellValue(testDataPath, testCaseName, i, 6);
                    String Value = Generic.getCellValue(testDataPath, testCaseName, i, 7);
                    String Access_Required = Generic.getCellValue(testDataPath, testCaseName, i, 8);
                    String Groups_to_be_attached = Generic.getCellValue(testDataPath, testCaseName, i, 9);

                    System.out.println("Entering the Valid Data on Create-Organization popup");
                    APP_LOGS.debug("Entering the Valid Data on Create-Organization popup");

                    ps.clear("edit-name");
                    driver.findElement(By.id("edit-name")).sendKeys(Name);
                    // ps.selectByVisibleText(driver.findElement(By.xpath("//div[text()='Type:']/following-sibling::div[1]/descendant::select")),
                    // Organization_Type);
                    ps.selectByVisibleText(driver.findElement(By.cssSelector("#edit-type")), Organization_Type);

                    ps.clear("edit-cost-center");
                    driver.findElement(By.id("edit-cost-center")).sendKeys(Cost_Center);
                    driver.switchTo().frame(driver.findElement(
                            By.xpath("//div[text()='Description:']/following-sibling::div[1]/descendant::iframe")));
                    driver.findElement(By.id("tinymce")).sendKeys(Description);
                    driver.switchTo().defaultContent();
                    ps.clear("edit-parent");
                    if (Parent_Organization.length() > 0) {
                        driver.findElement(By.id("edit-parent")).sendKeys(Parent_Organization);
                        ps.waitFor(1000l);
                        driver.findElement(By.xpath("//strong[text()='" + Parent_Organization + "']")).click();
                    }
                    ps.clear("edit-contact");
                    driver.findElement(By.id("edit-contact")).sendKeys(Contact);
                    if (Label.length() > 0 && Value.length() > 0) {
                        driver.findElement(By.id("edit-add-customorg-custom-fields")).click();
                        ps.waitFor(2000l);
                        ps.clear("edit-custom-label-0");
                        driver.findElement(By.id("edit-custom-label-0")).sendKeys(Label);
                        ps.clear("edit-custom-value-0");
                        driver.findElement(By.id("edit-custom-value-0")).sendKeys(Value);
                    }
                    if (Access_Required.equalsIgnoreCase("yes")) {
                        driver.findElement(By.id("visible-org-0")).click();
                        ps.waitFor(3000l);
                        driver.findElement(By.name("Administer")).click();
                        String actVal = driver.findElement(By.xpath("//span[text()='- Administer']")).getText();
                        String expVal = "- Administer";
                        ps.assertEqualsOnPOPUP(actVal, expVal, testCaseName, i);
                        driver.findElement(By.xpath("//div[input[@id='edit-mrocancelbtn']]/div[3]/input[@name='op']"))
                                .click();
                        ps.waitFor(1500l);
                        String act = driver.findElement(By.xpath("//*[@id='message-container']/div/ul/li/span"))
                                .getText();
                        String exp = "Details saved successfully.";
                        ps.assertEqualsOnPOPUP(act, exp, testCaseName, i);
                        driver.findElement(By.id("admin-bubble-close")).click();

                    }

                    ps.clickSaveButtonOrg();
                    String act_val = driver.findElement(By.xpath("//*[@id='message-container']/div/ul/li/span"))
                            .getText();
                    String exp_val = "Details saved successfully.";
                    ps.assertEqualsOnPOPUP(act_val, exp_val, testCaseName, i);
                    driver.findElement(By.className("close")).click();
                    APP_LOGS.debug("***** Data Driving happened successfully from row no :" + i + " *****");
                    ps.waitFor(3000l);
                }

                ps.signOUT();

            }

        }

    }

Output in Jenkins:

574066672033    Marionette  INFO    Listening on port 43445
1574066672075   Marionette  WARN    TLS certificate errors will be ignored for this session
Nov 18, 2019 2:14:32 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C
Firefox Launching
Opening Firefox
Cleaning out folder:/home/nivedab/ExpertusONE_4.5/Screenshot
1574066672212   Marionette  INFO    Stopped listening on port 43445
JavaScript error: resource://activity-stream/lib/ActivityStreamPrefs.jsm, line 27: NS_ERROR_ILLEGAL_VALUE: Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIPrefBranch.removeObserver]
JavaScript error: resource://services-settings/RemoteSettingsClient.jsm, line 149: Error: Unknown callback
console.log: "RemoteSettingsWorker error: UnknownError: The operation failed for reasons unrelated to the database itself and not covered by any other error code."

###!!! [Parent][DispatchAsyncMessage] Error: PBackgroundIDBFactory::Msg_PBackgroundIDBFactoryRequestConstructor Value error: message was deserialized, but contained an illegal value


###!!! [Parent][DispatchAsyncMessage] Error: PBackgroundIDBFactory::Msg_PBackgroundIDBFactoryRequestConstructor Value error: message was deserialized, but contained an illegal value

JavaScript error: , line 0: UnknownError: The operation failed for reasons unrelated to the database itself and not covered by any other error code.
JavaScript error: resource://services-common/kinto-offline-client.js, line 603: Error: IndexedDB getLastModified() The operation failed for reasons unrelated to the database itself and not covered by any other error code.

(firefox:15010): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed

(firefox:15010): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed
java.io.IOException: While trying to invoke 'createWorkbook' on factory org.apache.poi.xssf.usermodel.XSSFWorkbookFactory and arguments [java.io.BufferedInputStream@4c163e3]
    at org.apache.poi.ss.usermodel.WorkbookFactory.createWorkbook(WorkbookFactory.java:357)
    at org.apache.poi.ss.usermodel.WorkbookFactory.createXSSFWorkbook(WorkbookFactory.java:316)
    at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:234)
    at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:200)
    at com.expertus.libraries.Generic.writeRes(Generic.java:103)
    at com.expertus.libraries.Config.afterSuiteMethod(Config.java:86)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:133)
    at org.testng.internal.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:62)
    at org.testng.internal.ConfigInvoker.invokeConfigurationMethod(ConfigInvoker.java:340)
    at org.testng.internal.ConfigInvoker.invokeConfigurations(ConfigInvoker.java:294)
    at org.testng.SuiteRunner.privateRun(SuiteRunner.java:369)
    at org.testng.SuiteRunner.run(SuiteRunner.java:304)
    at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
    at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96)
    at org.testng.TestNG.runSuitesSequentially(TestNG.java:1180)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1102)
    at org.testng.TestNG.runSuites(TestNG.java:1032)
    at org.testng.TestNG.run(TestNG.java:1000)
    at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:283)
    at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:75)
    at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:120)
    at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
    at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345)
    at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126)
    at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418)
Caused by: java.lang.ClassNotFoundException: org.apache.poi.xssf.usermodel.XSSFWorkbookFactory
    at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at org.apache.poi.ss.usermodel.WorkbookFactory.createWorkbook(WorkbookFactory.java:326)
    ... 28 more
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 6.746 s - in TestSuite
[INFO] 
[INFO] Results:
[INFO] 
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[JENKINS] Recording test results
Notifying upstream projects of job completion
Join notifier requires a CauseAction
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  13.209 s
[INFO] Finished at: 2019-11-18T14:14:37+05:30
[INFO] ------------------------------------------------------------------------
Waiting for Jenkins to finish collecting data
[JENKINS] Archiving /home/nivedab/ExpertusONE_4.5/pom.xml to ExpertusONE_4.5/ExpertusONE_4.5/0.0.1-SNAPSHOT/ExpertusONE_4.5-0.0.1-SNAPSHOT.pom
channel stopped
TestNG Reports Processing: START
Looking for TestNG results report in workspace using pattern: **/testng-results.xml
testng-results.xml was last modified before this build started. Ignoring it.
Saving reports...
Processing '/var/lib/jenkins/jobs/ExpertusOneAdmin/builds/29/testng/testng-results.xml'
TestNG Reports Processing: FINISH
Notifying upstream projects of job completion
Finished: SUCCESS


    }
javascript
java
selenium
jenkins
asked on Stack Overflow Nov 18, 2019 by Niveda

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0