0

I am trying to run protractor test on Azure DevOps pipeline and getting the following error. Notice that jar file path is pointing to my local drive even when the tests are being run from Azure DevOps server. Any idea what I need to do?

Same test works when running from local machine but fails on Azure. I have the selenium-server-standalone-3.141.59.jar in my project's node_modules folder. What I don't understand is that why is it looking at my local machine (C:\Automation) when I am running test from Azure.

[13:33:31] I/launcher - Running 1 instances of WebDriver
[13:33:31] E/local - Error code: 135
[13:33:31] E/local - Error message: No selenium server jar found at
C:\Automation\my_app\node_modules\protractor\node_modules\webdriver
manager\selenium\selenium-server-standalone-3.141.59.jar. Run 'webdriver-manager
update' to download binaries.
salis01
  • 3
  • 3
  • Did you run the webdriver-manager update on your local node module folder – Gaj Julije Feb 10 '21 at 21:26
  • Please show your protractor conf.js – yong Feb 11 '21 at 00:33
  • @salis01 Do you use Azure DevOps Service (https://dev.azure.com/xxxx) or on-premises Azure DevOps Server? Could you share your pipeline definition? Try the sample in the documentation below to see whether you can reproduce this issue: https://www.protractortest.org/#/. – Cece Dong - MSFT Feb 16 '21 at 07:14

1 Answers1

0

This issue may be caused by:

  1. selenium-server-standalone-3.141.59.jar does not exist in your project's node_modules\protractor\node_modules\webdriver-manager\selenium location.

  2. selenium-server-standalone exists with different version.

Try to add a command line task to Update webdriver.

Useful resources:

  1. Error: No selenium server jar found at "Location"

  2. https://medium.com/@ganeshsirsi/protractor-end-to-end-tests-configure-on-ci-cd-tfs-vsts-azure-devops-publish-html-results-9143846f579f

  3. https://learn.microsoft.com/en-us/azure/devops/pipelines/ecosystems/javascript?view=azure-devops&tabs=code#end-to-end-browser-testing

Cece Dong - MSFT
  • 29,631
  • 1
  • 24
  • 39
  • You could add a reply and [Accept it as an Answer](https://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work), this can be beneficial to other community members reading this thread. – Cece Dong - MSFT Mar 31 '21 at 01:31
  • The issue was when I pushed my code from my local machine to the git repo, "update-config.json" file was still pointing to my local machine. Manually updating the path or running "webdriver-manager update" in the build agent resolved the issue. Initially when I tried to run "webdriver-manager update", I was having some corporate security issue. I had to add proxy data in order to get the update successful. – salis01 Apr 09 '21 at 17:19