Skip to main content

Java Driver Element

Java Driver Element

What is Java Driver element?

It is a good old JavaElement from Selenium except that it communicates to java agent instead of vendor driver such as chromedriver.exe

Most of its methods act similar to Selenium JavaElement so we only take a look at the differences

Instance Methods

submit

calls stopEditing() on javax.swing.JTree which saves any edits that are currently in progress on a cell

getTagName

returns hyphenated class name of element

JavaElement element = driver.findElement(JavaSearch.className("javax.swing.JTextField"))
String tagName = element.getTagName(); //returns "text-field"

Not implemented

These methods are not implemented and will throw org.openqa.selenium.UnsupportedCommandException:

getRect
getCssValue
isSelected
getScreenshotAs