VNC - problem finding an image
I've problem finding an image/clicking on it.
After the connection I capture the VNC screen and the image contain the image.
The problem is in first click: scr.click(
Below my script
-------
import shutil
#######
screenType = 0 # 1 = screen(0), 2 = vnc screen
#######
scr = object()
def vncConnection(scr):
try:
except:
print(" " , sys.exc_info()[1])
print(" " , sys.exc_info()[2])
return None
if not scr:
print "no connection"
return None
wait(3)
return scr
items =("Nothing selected","VNC Screen","Your PC screen")
selected = select("Please select from list the type of screen", options = items)
if selected == None: # Esc button
exit(-1)
if selected == items[0]:
popup("No selection")
exit(-2)
if selected == items[1]:
screenType = 1;
if selected == items[2]:
screenType = 2;
if screenType == 1:
scr = vncConnection(scr)
if scr == None:
exit(-1)
if screenType == 2:
scr = Screen(0)
#######
Settings.UserLogs = True #(False: user log calls are ignored)
Settings.
Settings.
b=getBundleFolder()
Debug.setUserLo
imagePath = b+'savedImages\\'
sPath=capture(scr)
print("sPath=" +sPath)
newImage = os.path.
print("imagePath=" + imagePath + " newImage=" + newImage)
shutil.move(sPath, newImage)
scr.click(
while not scr.exists(
src.sleep(1)
scr.click(
scr.type ("notepad")
while not scr.exists(
src.sleep(1)
scr.click(
while not scr.exists(
src.sleep(1)
scr.type('n', Key.CTRL)
while not scr.exists(
src.sleep(1)
scr.type(Key.ENTER)
scr.type ('Hello , nice to be here' + Key.ENTER)
a = scr.find(
print a
if screenType == 1:
scr.stop()
use()
#######
exit(0)
-------
exception
CConnection: Server supports RFB protocol version 3.8
CConnection: Using RFB protocol version 3.8
sPath=C:
imagePath=
[error] script [ vnc ] stopped with error at line --unknown--
[error] Error caused by: Traceback (most recent call last): File "C:\sviluppo\
at org.sikuli.
at org.sikuli.
at org.sikuli.
at org.sikuli.
at org.sikuli.
at org.sikuli.
at sun.reflect.
at sun.reflect.
at sun.reflect.
at java.lang.
org.sikuli.
ava
-------
- Window 7 64 bit SP1
- UltraVnc: VNC server version 1.2.1.1
- Siculix 1.1.4-SNAPSHOT-
-------
Thank you in advance.
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask maria beatrice martini for more information if necessary.