# Selenium WebDriver integration with Dynatrace

**URL:** <https://community.dynatrace.com/t/selenium-webdriver-integration-with-dynatrace/20908>\
**Category:** Open Q&A\
**Tags:** request-attributes\
**Created:** [November 26, 2020, 3:08pm UTC](https://community.dynatrace.com/t/selenium-webdriver-integration-with-dynatrace/20908 "2020-11-26T15:08:56Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![pawel\_harbuz](https://avatars.discourse-cdn.com/v4/letter/p/96bed5/32.png) [@pawel\_harbuz](https://community.dynatrace.com/u/pawel_harbuz)\
**Post date:** [November 26, 2020, 3:08pm UTC](https://community.dynatrace.com/t/selenium-webdriver-integration-with-dynatrace/20908/1 "2020-11-26T15:08:56Z")

</div>

Hi,

Is any possibility of viewing Java Selenium tests results in Dynatrace? I heard that I could send a header via Selenium, but there is nothing about it in documentation. I found only an information about AppMon. [https://community.dynatrace.com/questions/147670/how-to-integrate-selenium-script-with-dynatrace.html?sort=oldest](https://community.dynatrace.com/questions/147670/how-to-integrate-selenium-script-with-dynatrace.html?sort=oldest) Does it also work same in Dynatrace?

Best redgards,

Paweł

---

<div class="post-metadata">

**Author:** ![khoros\_anonymous](https://avatars.discourse-cdn.com/v4/letter/k/f9ae1b/32.png) [@khoros\_anonymous](https://community.dynatrace.com/u/khoros_anonymous)\
**Post date:** [November 26, 2020, 3:37pm UTC](https://community.dynatrace.com/t/selenium-webdriver-integration-with-dynatrace/20908/2 "2020-11-26T15:37:04Z")

</div>

What you want to see. The execution? as a Sinthetic test? or view the execution as purepath?

You can use the same concept like in [https://www.dynatrace.com/support/help/setup-and-configuration/integrations/third-party-integrations/test-automation-frameworks/dynatrace-and-jmeter-integration/](https://www.dynatrace.com/support/help/setup-and-configuration/integrations/third-party-integrations/test-automation-frameworks/dynatrace-and-jmeter-integration/) using the header x-dynatrace-test to easy visualize only the tests.

---

<div class="post-metadata">

**Author:** ![pahofmann](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/pahofmann/32/17076_2.png) [@pahofmann](https://community.dynatrace.com/u/pahofmann)\
**Post date:** [November 26, 2020, 4:28pm UTC](https://community.dynatrace.com/t/selenium-webdriver-integration-with-dynatrace/20908/3 "2020-11-26T16:28:33Z")

</div>

If the application the Selenium tests run against is intstrumented with dynatrace you will get the data.

You can use headers and request attributes or the API of the JS agent to send additional metadata about the test to make finding and analysing specific test cases easier.

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [November 26, 2020, 8:32pm UTC](https://community.dynatrace.com/t/selenium-webdriver-integration-with-dynatrace/20908/4 "2020-11-26T20:32:31Z")

</div>

Since you are taking specifically about **synthetic test results** , I guess you want to view the results in Dynatrace. For that you can leverage the third-party synthetic API, which you can use to push your results about synthetic test from any testing tool:

> **[Third-party synthetic API](https://docs.dynatrace.com/docs/dynatrace-api/environment-api/synthetic/third-party-synthetic)**
>
> Push third-party synthetic data to Dynatrace via API.

More on this topic including examples here:

> **[Integrate external synthetic data with Dynatrace via API](https://www.dynatrace.com/news/blog/integrate-external-synthetic-data-with-dynatrace-via-api/)**
>
> Dynatrace now offers an API that enables you to integrate external synthetic test data with Dynatrace. Learn more!

---

<div class="post-metadata">

**Author:** ![pawel\_harbuz](https://avatars.discourse-cdn.com/v4/letter/p/96bed5/32.png) [@pawel\_harbuz](https://community.dynatrace.com/u/pawel_harbuz)\
**Post date:** [November 27, 2020, 8:40am UTC](https://community.dynatrace.com/t/selenium-webdriver-integration-with-dynatrace/20908/5 "2020-11-27T08:40:48Z")

</div>

I choose the JS agent way. Does it work like in AppMon? Or there is another way to manage it? Below is an example, which comes from this question: [https://community.dynatrace.com/questions/194345/when-setting-category-to-uidriven-no-output-on-tes.html](https://community.dynatrace.com/questions/194345/when-setting-category-to-uidriven-no-output-on-tes.html)

Is it possible to work?

```auto
sessionStorage.DT_TESTNAME = "TestName";

```

```auto
dynaTrace.endVisit();

```

---

<div class="post-metadata">

**Author:** ![pahofmann](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/pahofmann/32/17076_2.png) [@pahofmann](https://community.dynatrace.com/u/pahofmann)\
**Post date:** [November 27, 2020, 10:01am UTC](https://community.dynatrace.com/t/selenium-webdriver-integration-with-dynatrace/20908/6 "2020-11-27T10:01:53Z")

</div>

The calls differ from appmon, you can find them in the [documentation](https://www.dynatrace.com/support/help/how-to-use-dynatrace/real-user-monitoring/setup-and-configuration/web-applications/additional-configuration/customize-rum/) or download the docs and examples directly from your dynatrace environment:

 ![27427-1606471281861.png](https://global.discourse-cdn.com/dynatrace/original/1X/4b661a763194af5c5b507d84fe9c0cbcf821620a.png)

If you just want to report success/failure of a specific test, you could also use the way Julius described via the external synthetic test API and link those tests to the RUM Application.
