You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
1.5 KiB
59 lines
1.5 KiB
5 years ago
|
###############################
|
||
|
#Technology GUI
|
||
|
###############################
|
||
|
#Init UIDesktop
|
||
|
from pyOpenRPA.Robot import UIDesktop
|
||
|
|
||
|
#Selector: Folder list (framework uia)
|
||
|
lGUISelectorFolderList = [
|
||
|
{"class_name":"CabinetWClass","backend":"uia"},
|
||
|
{"ctrl_index":2},
|
||
|
{"ctrl_index":0},
|
||
|
{"ctrl_index":2},
|
||
|
{"ctrl_index":0}
|
||
|
]
|
||
|
|
||
|
#Highlight the list in folder app (uia framework)
|
||
|
UIDesktop.UIOSelector_Get_UIO(lGUISelectorFolderList).draw_outline()
|
||
|
|
||
|
#Print the children list
|
||
|
print(UIDesktop.UIOSelector_Get_UIO(lGUISelectorFolderList).children())
|
||
|
|
||
|
#Right click
|
||
|
UIDesktop.UIOSelector_Get_UIO(lGUISelectorFolderList).right_click_input()
|
||
|
|
||
|
###############################
|
||
|
#Technology Selenium
|
||
|
###############################
|
||
|
#Init the selenium driver
|
||
|
import os
|
||
|
#Add chrome webdriver to PATH system enviroment (need to selenium)
|
||
|
os.environ["PATH"]=os.environ["PATH"]+";C:\\Abs\\Archive\\scopeSrcUL\\OpenRPA\\Resources\\SeleniumWebDrivers\\Chrome\\chromedriver_win32 vchromedriver_win32 v79.0.3945.36\\"
|
||
|
#Import selenium
|
||
|
from selenium import webdriver
|
||
|
from selenium.webdriver.common.keys import Keys
|
||
|
driver = webdriver.Chrome()
|
||
|
|
||
|
#Open URL
|
||
|
driver.get("http://www.python.org")
|
||
|
|
||
|
#Find the search input
|
||
|
elem = driver.find_element_by_name("q")
|
||
|
|
||
|
#Type text in search imput
|
||
|
elem.send_keys("pycon")
|
||
|
|
||
|
#Submit the search
|
||
|
elem.send_keys(Keys.RETURN)
|
||
|
|
||
|
#Close the driver
|
||
|
driver.close()
|
||
|
|
||
|
###############################
|
||
|
#Technology Image & Mouse
|
||
|
###############################
|
||
|
...
|
||
|
###############################
|
||
|
#Technology Keyboard & Clipboard
|
||
|
###############################
|
||
|
...
|