0

i am trying to create a simple script in jython that treis to work with a form i am declaring

from java.awt import Robot
from java.awt.event import KeyEvent as keyevent
from com.teamdev.jxbrowser.chromium.dom import DOMDocument
from com.teamdev.jxbrowser.chromium.dom import DOMElement

robot = Robot()
x = system.tag.read("[Client]currenturl").value
window = system.gui.getWindow('web_browser')
browser = window.rootContainer.getComponent('FileBrowser')
document = browser.getBrowser().getDocument();
div = document.findElement(By.id("myId"));

and i receive error

'com.teamdev.jxbrowser.chromium.dom.internal.Docume' object has no attribute 'findElement'

is something that i am doing wrong? Thank you in advance

1 Answers1

0

From the error string you have, it seems that class name for 'com.teamdev.jxbrowser.chromium.dom.internal.Document' was trimmed to the 'com.teamdev.jxbrowser.chromium.dom.internal.Docume'. It is possible that there is an issue in Jython itself.

JxBrowser was never tested to work with Jython, so it is not guaranteed to work with that platform.