← Back to team overview

sikuli-driver team mailing list archive

[Question #191394]: How to input three key modifiers and only them?

 

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

I have the following scenario:

I wish to clear Internet Explorer's cache with the panel summoned by CTRL+SHIFT+DELETE key combination. The problem is I cannot figure out how can Sikuli accept a keyDown() or type() parameter consisting of only key modifiers. In my clear_browser_cache() function you will see my last unsuccessful try with type(). Is it even possible or is there a workaround or am I missing some point at the manual? (I am reading it like crazy)

Here is the code as it stands now:


import unittest
from sikuli.Sikuli import *

class Test(unittest.TestCase):

    def open_browser(self):
        ie_path = 'C:\Program Files (x86)\Internet Explorer\iexplore.exe'
        self.ieApp = App.open(ie_path)
        wait("ie_url_bar_buttons.png", 20000)
        
    def clear_browser_cache(self):
        self.ieApp.focus()
        type(Key.DELETE, KeyModifier.CTRL + KeyModifier.SHIFT)        

    def setUp(self):
        setBundlePath('C:\Users\ikon\Documents\editor.sikuli')
        self.open_browser()
        self.clear_browser_cache()

    def tearDown(self):
        pass
        # self.ieApp.close()
        # waitVanish("ie_url_bar_buttons.png")

    def test_startup(self):
        assert exists("ie_url_bar_buttons.png")
        
suite = unittest.TestLoader().loadTestsFromTestCase(Test)
unittest.TextTestRunner(verbosity=1).run(suite)   

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