On my local, I start e2e tests in Protractor and this is good. I have problem when I want start tests on Jenkins job.

  • I pull tests from repo
  • run command npm install
  • run command node_modules\.bin\ng e2e --webdriver-update

My tests start execution and I have problem:

` W/element - more than one element found for locator by.buttonText("Create") - the first result will be used
[31m× Check Item in RAID Type drop-down-menu[39m
  [31m- [39m[31mFailed: element not interactable
    (Session info: chrome=69.0.3497.81)
    (Driver info: chromedriver=2.42.591088 (7b2b2dca23cca0862f674758c9a3933e685c27d5),platform=Windows NT 6.2.9200 x86_64)[39m
    (Session info: chrome=69.0.3497.81)
    (Driver info: chromedriver=2.42.591088 (7b2b2dca23cca0862f674758c9a3933e685c27d5),platform=Windows NT 6.2.9200 x86_64)
      at Object.checkLegacyResponse (C:\Program Files (x86)\Jenkins\workspace\newJob\NewGenProject\ui\node_modules\selenium-webdriver\lib\error.js:546:15)
      at parseHttpResponse (C:\Program Files (x86)\Jenkins\workspace\newJob\NewGenProject\ui\node_modules\selenium-webdriver\lib\http.js:509:13)
      at doSend.then.response (C:\Program Files (x86)\Jenkins\workspace\newJob\NewGenProject\ui\node_modules\selenium-webdriver\lib\http.js:441:30)
      at <anonymous>
      at process._tickCallback (internal/process/next_tick.js:189:7)`
  • As per error details, it is specific to an element.Does it mean browser launches successfully ? – Vishal Aggarwal Sep 20 '18 at 7:51
  • Also before this step ,does automation interacts with any other element successfully? If so, then it's simply a case of element not interactable.Nothing specific to Jenkins. – Vishal Aggarwal Sep 20 '18 at 7:54

Assuming browser launches successfully and test is able to interact with any other element successfully before the element having issues.

Use explicit wait for the desired element as below:

browser.wait(ExpectedConditions.visibilityOf($('NON-EXISTING-ELEMENT')), 3000, 'error message')

As it seems that element is not ready yet for interaction.Also if you share the code & relevant html snippet as well , then all might be able to suggest better solutions.

  • Thanks for answer. All my code work work fine in my local machine. And when I start my code on Jenkins job, I have problem. Element not interactable. – Lee Ji Sep 20 '18 at 8:46
  • What are the specifics? Where is your code? Relevant html source? Jenkins job details?It is hard for anybody else to help you without further information. – Vishal Aggarwal Sep 20 '18 at 8:50

this is my Protractor code.

it('Creating default configuration ', () => {

        for (let i = 0; i < 4; i++) {
        expect(_configuration.geImage().isDisplayed()).toBe(true).then(function (result) {

This is work on my local machine, but does not on Jenkins.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.