# Katalon does not support Data URLs (rfc2397)

**URL:** <https://forum.katalon.com/t/katalon-does-not-support-data-urls-rfc2397/23672>\
**Category:** Bug Report\
**Tags:** bugs-report, katalon-studio\
**Created:** [April 23, 2019, 1:35pm UTC](https://forum.katalon.com/t/katalon-does-not-support-data-urls-rfc2397/23672 "2019-04-23T13:35:09Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [April 22, 2021, 11:09am UTC](https://forum.katalon.com/t/katalon-does-not-support-data-urls-rfc2397/23672/13 "2021-04-22T11:09:44Z")

</div>

I have a new finding on Data URI support in Katalon Studio. I made 2 TestCase scripts.

## Test Cases/research/1\_webui\_navigateToUrl\_data`

```auto
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI

WebUI.openBrowser('')
WebUI.navigateToUrl("data:text/html,<h1>Hello, world!</h1>")

```

The 1st script opened a browser, navigated to the URL:

- `file:///Users/<username>/<projectdir>/data:text/html,%3Ch1%3EHello,%20world!%3C/h1%3E`

However, the file is not present. The browser showed the following view, which is obviously unsatisfactory:

 ![research_1](https://europe1.discourse-cdn.com/katalon/original/3X/1/8/182dcdd5c20a07be5720ea277228447e66c34e02.jpeg)

## `Test Cases/research/2_webdriver_navigate_data`

```auto
import org.openqa.selenium.WebDriver

import com.kms.katalon.core.webui.driver.DriverFactory
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI

WebUI.openBrowser('')
WebDriver driver = DriverFactory.getWebDriver()
driver.navigate().to("data:text/html,<h1>Hello, world!</h1>")

```

The 2nd script opened a browser, navigated to the URI:

- `data:text/html,<h1>Hello, world!</h1>`

The browser showed the following view. my Goodness!

 ![research_2](https://europe1.discourse-cdn.com/katalon/original/3X/c/8/c8a708ed4ac4f571de604cf8039215dc7e704743.jpeg)

* * *

This experiment showed me that the Selenium WebDriver API supports `data:` URI with no problem. On the other hand, Katalon’s WebUI API mis-interprets a `data:` URI to be a `file:` URL.

Therefore, I have got 2 points.

1. If you bother yourself to call WebDriver API in your Test Case, you can use `data:` URI now.
2. How [`WebUI.openBrowser(String url)`](https://github.com/katalon-studio/katalon-studio-testing-framework/blob/master/Include/scripts/groovy/com/kms/katalon/core/webui/keyword/builtin/OpenBrowserKeyword.groovy) and [`WebUI.navigateTo(String url)`](https://github.com/katalon-studio/katalon-studio-testing-framework/blob/master/Include/scripts/groovy/com/kms/katalon/core/webui/keyword/builtin/NavigateToUrlKeyword.groovy) make mis-interpretation? I will look at the source code.

I hope that I would be able to modify the implementation of these keywords dynamically by Groovy’s Meta-programming technique to work-around the bug.

---

_[View the full topic](https://forum.katalon.com/t/katalon-does-not-support-data-urls-rfc2397/23672)._
