Clicking on a button which appears when the page is srolled down

Asked by Suket Somani

Hello Sikuli Users,

I am new to Sikuli, still exploring. I am trying to integrate sikuli with selenium, I have a situation in which I need to click on a button present on the web-UI, my script fails when I try to run it, if

1. The button is not visible on the the screen (what I mean to say is you can see the button if you scroll down to the page). In other words sikuli doesn't identify the button if it doesn't appear on the browser window at once. Is this the way it behaves or I need scroll down to the page first and then click on the button?

2. Also, if I grab the mouse or move the cursor when the script is executing, it fails. Is there a work around for this?

Any kind of help is appreciated. Thanks in advance.

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
Last query:
Last reply:
Revision history for this message
Best RaiMan (raimund-hocke) said :
#1

--1: WYSIWYS
Sikuli's behavior: What you see is what you script

So you can only click, what is visible on the screen in that moment. Sikuli does not know anything about the application specific contents (Windows, GUI-elemnts, ...) like Selenium. It is only visual with respect to the screen.

--2: mouse exclusive for Sikuli
While running a Sikuli script, that uses mouse actions, you have to sit in front and watch (or do something else, if you trust your script ;-).

So if you want to do something while a script is running, you have to use another system or try to run your Sikuli stuff in some Virtual Desktop, that has it's own mouse and keyboard. For the latter, I do not have experiences - you might scan this Q&A board for that.

Revision history for this message
Suket Somani (suketsomani) said :
#2

RaiMan,
Appreciate your quick reply, that actually answers my question. Thanks again.

Revision history for this message
Suket Somani (suketsomani) said :
#3

Thanks RaiMan, that solved my question.