Acces DOM

Asked by stephane

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:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
masuo
Solved:
Last query:
Last reply:
Revision history for this message
masuo (masuo-ohara) said :
#1

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

Revision history for this message
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).

Revision history for this message
Best masuo (masuo-ohara) said :
#3
Revision history for this message
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

Revision history for this message
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)

Revision history for this message
stephane (su1) said :
#6

Thanks masuo, that solved my question.

Revision history for this message
masuo (masuo-ohara) said :
#7

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