SikuliX IDE to type path to input form

Asked by Akos Kovacs

I use following code in SikuliX IDE 1.1.4 to click in a text input field and type a folder path in it.

records = Dir.glob("**/*/")
records.each do |item|
    click("1544078258957.png")
    type(item)
end
I get error message:

[error] --- Traceback --- error source first line: class ( method ) file 77: RUBY ( block in click ) uri:classloader:/Lib/sikulix.rb 129: org.jruby.RubyMethod ( call ) org/jruby/RubyMethod.java 156: RUBY ( block in click ) uri:classloader:/Lib/sikulix.rb 7: RUBY ( )

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
RaiMan (raimund-hocke) said :
#1

type() only accepts some ASCII characters on an US keyboard (see docs)

try paste() instead.

Revision history for this message
Akos Kovacs (plaidshirtakos) said :
#2

I tried that too, but field, where text should by typed is not clicked. I got error message for line click " ("1544078258957.png") ":

[error] script [ MyTest ] stopped with error in line 9
[error] FindFailed: 1544078258957.png: (475x32) in S(0)[0,0 1920x1080] E:Y, T ( (StandardError) org.sikuli.script.FindFailed: 1544078258957.png: (475x32) in S(0)[0,0 1920x1080] E:Y, T:3,0 )
[error] --- Traceback --- error source first line: class ( method ) file 77: RUBY ( block in click ) uri:classloader:/Lib/sikulix.rb 129: org.jruby.RubyMethod ( call ) org/jruby/RubyMethod.java 156: RUBY ( block in click ) uri:classloader:/Lib/sikulix.rb 9: RUBY ( block in (root) ) C:/_private/MyTest.sikuli 1801: org.jruby.RubyArray ( each ) org/jruby/RubyArray.java 8: RUBY ( <main> ) C:/_private/MyTest.sikuli [error] --- Traceback --- end

Revision history for this message
Best RaiMan (raimund-hocke) said :
#3

--- [error] FindFailed: 1544078258957.png:

the image was not found. read the docs about FindFailed

Revision history for this message
Akos Kovacs (plaidshirtakos) said :
#4

Thanks RaiMan, that solved my question.