Selenium Tests On Various Browsers On Azure DevOps

126 views
Skip to first unread message

Alok Agarwal

unread,
Jul 25, 2019, 8:49:33 AM7/25/19
to Selenium Users
Hi,

I have a Maven Project (with pom.xml and testng.xml) of Selenium Webdriver working fine in my local.
I uploaded the files in Azure Repository and when I try to run, I get following errors. I am not sure how to fix it. Please help.

launching firefox browser
[ERROR] Tests run: 8, Failures: 1, Errors: 0, Skipped: 7, Time elapsed: 0.894 s <<< FAILURE! - in TestSuite
[ERROR] launchBrowser(example.DashboardAdmin) Time elapsed: 0.745 s <<< FAILURE!
java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver. The latest version can be downloaded from http://chromedriver.storage.googleapis.com/index.html
    at example.DashboardAdmin.launchBrowser(DashboardAdmin.java:25)

[ERROR] Failures:
[ERROR] DashboardAdmin.launchBrowser:25 » IllegalState The path to the driver executab...

Manish Sewlikar

unread,
Jul 25, 2019, 9:40:23 AM7/25/19
to seleniu...@googlegroups.com
 you need chromdriver path when u r using Azure or maven as per my experience 

Manish Sewlikar

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/97149e95-e207-4864-aabb-466bfe2e3d0b%40googlegroups.com.

Alok Agarwal

unread,
Jul 25, 2019, 9:44:31 AM7/25/19
to Selenium Users
Thanks Manish, but where the file should be located on local or somewhere else?
Can we give the path from our local?
If yes, then what is the exact syntax?

Regards,
Alok

ankit garg

unread,
Jul 25, 2019, 11:40:44 AM7/25/19
to seleniu...@googlegroups.com
You can give reference from your project folder only;Like this

String current = System.getProperty("user.dir")
+"\\src\\main\\resources\\chromedriver_win32\\chromedriver.exe";
> --
> You received this message because you are subscribed to the Google Groups "Selenium Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/54868c0d-56a0-475f-b667-8ed9277a738d%40googlegroups.com.

Alok Agarwal

unread,
Jul 26, 2019, 2:43:04 AM7/26/19
to Selenium Users
Thanks Ankit. But, the Azure is a cloud repository and the reference that you mention is on local machine. It didn't work.

Regards,
Alok

On Thursday, July 25, 2019 at 6:19:33 PM UTC+5:30, Alok Agarwal wrote:

Alok Agarwal

unread,
Jul 30, 2019, 5:46:39 AM7/30/19
to Selenium Users
Any further help from anyone please?

Regards,
Alok

On Thursday, July 25, 2019 at 6:19:33 PM UTC+5:30, Alok Agarwal wrote:

Satish Devulapalli

unread,
Jul 30, 2019, 6:50:13 AM7/30/19
to seleniu...@googlegroups.com
I think your pointing wrong driver
in screenshot first line is "launching firefox browser"

but looking chrome driver path

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.

ALISTER ERNEST

unread,
Jul 30, 2019, 1:13:38 PM7/30/19
to Selenium Users
I agree with Satish, although I believe this might just be a typo on your end on the logging statement.
If you are using Java, look at providing the ChromeDriver or FirefoxDriver through the pom.xml file, this will ensure that maven will download the necessary dependencies and you can point to the driver in your local resources and not have to worry about providing the path for the driver on your machine. This will also help with making sure that you will be missing dependencies where ever you run this project.

On Tuesday, July 30, 2019 at 4:50:13 AM UTC-6, satish devulapalli wrote:
I think your pointing wrong driver
in screenshot first line is "launching firefox browser"

but looking chrome driver path

On Tue, Jul 30, 2019 at 3:17 PM Alok Agarwal <your...@gmail.com> wrote:
Any further help from anyone please?

Regards,
Alok

On Thursday, July 25, 2019 at 6:19:33 PM UTC+5:30, Alok Agarwal wrote:
Hi,

I have a Maven Project (with pom.xml and testng.xml) of Selenium Webdriver working fine in my local.
I uploaded the files in Azure Repository and when I try to run, I get following errors. I am not sure how to fix it. Please help.

launching firefox browser
[ERROR] Tests run: 8, Failures: 1, Errors: 0, Skipped: 7, Time elapsed: 0.894 s <<< FAILURE! - in TestSuite
[ERROR] launchBrowser(example.DashboardAdmin) Time elapsed: 0.745 s <<< FAILURE!
java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver. The latest version can be downloaded from http://chromedriver.storage.googleapis.com/index.html
    at example.DashboardAdmin.launchBrowser(DashboardAdmin.java:25)

[ERROR] Failures:
[ERROR] DashboardAdmin.launchBrowser:25 » IllegalState The path to the driver executab...

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to seleniu...@googlegroups.com.

Alok Agarwal

unread,
Jul 31, 2019, 3:41:40 AM7/31/19
to Selenium Users
Thanks Satish & Alister. The browser name message is just for the sake of message and has no relation to the actual execution.
I did provide Firefox driver and Chromdriver in pom.xml, but it is still searching for respective jar file during the run/execution. Even I am not sure why it is looking for the files when the pom.xml already have its dependency. I even pointed the driver/jar file in my local, but as the Azure DevOps is on cloud, it is not determining my local path and failing.

Looking for more inputs/help on this.

Regards,
Alok

On Thursday, July 25, 2019 at 6:19:33 PM UTC+5:30, Alok Agarwal wrote:

ALISTER ERNEST

unread,
Jul 31, 2019, 11:33:51 AM7/31/19
to Selenium Users
Alok, 

Providing the path of the ChromeDriver or FirefoxDriver on your local when the test is running on the cloud will definitely not work.
What you can try doing is provide the path to the .m2 repository on the cloud where maven will download it's dependencies. That might help solve the problem that you are facing.

-Alister
Reply all
Reply to author
Forward
0 new messages