I have a new finding on Data URI support in Katalon Studio. I made 2 TestCase scripts.
Test Cases/research/1_webui_navigateToUrl_data`
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:
Test Cases/research/2_webdriver_navigate_data
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!
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.
- If you bother yourself to call WebDriver API in your Test Case, you can use
data:URI now. - How
WebUI.openBrowser(String url)andWebUI.navigateTo(String url)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.

