Acces DOM

Asked by stephane on 2018-05-31

I tried to find an answer but couldn't:

is there any way to access the DOM in Sikuli?

I'm trying to get the name of a file but it's hidden in a webpage, so I can't triple click on it and copy it like I would usually do to get content from a page.

I know the CSS selector of the div it's embedded in though, so if I could download the DOM I would be able to find that string.

Question information

Language:
English Edit question
Status:
Solved
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Solved by:
masuo
Solved:
2018-05-31
Last query:
2018-05-31
Last reply:
2018-05-31
masuo (masuo-ohara) said : #1

The tool what you want is not SikuliX but Selenium, isn't it?

stephane (su1) said : #2

No I'm aware of the existence of browser automation softwares but I need Sikuli to navigate other aspects of this website (I've tried already with Chromeless).

Best masuo (masuo-ohara) said : #3
masuo (masuo-ohara) said : #4

At first read docs and understand about SikuliX.
SikuliX do not have the feature to analyze DOM.
http://sikulix-2014.readthedocs.io/en/latest/basicinfo.html

stephane (su1) said : #5

Importing Selenium into Sikuli solves my problem indeed (but not *replacing* Sikuli by Selenium as you implied in your first message)

stephane (su1) said : #6

Thanks masuo, that solved my question.

masuo (masuo-ohara) said : #7

Be carfull when you use java9 or java10.
https://answers.launchpad.net/sikuli/+question/669501