← Back to team overview

sikuli-driver team mailing list archive

[Question #257379]: Insert javascript in the IE-URL (non-QUERTY-Layout)

 

New question #257379 on Sikuli:
https://answers.launchpad.net/sikuli/+question/257379

Hi there,

first: Sikuli is great! Thank you for support and developement!

My problem:
I am testing web sites with a lot of fields and need some shortcuts for navigating. I don't want to take a Screenshot of every field. To make things easier I wanted to use JavaScript to navigating to certain fields. So I tried this script:

keyDown(Key.CTRL)
type("l")
keyUp(Key.CTRL)
type('javascript:alert($("#someid").focus());')

This leads to an exception because of the colon in my non-QUERTY-Keyboard-Layout. So I used the workaround with "paste":
paste('javascript:alert($("#someid").focus());')

This would work if the Internet Explorer would not cut of the part "javascript:" when pasting in the URL :( the result of pasting this line is only "alert($("#someid").focus());".

If there was a Key.POS1 this would work:
keyDown(Key.CTRL)
type("l")
keyUp(Key.CTRL)
paste(':')
paste('alert("123")')
keyDown(Key.CTRL)
type(Key.POS1)
keyUp(Key.CTRL)
type('javascript')

Unfortunatly there is no Key.POS1 and I can not "type" a colon.

Any suggestions?

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.