#Add webdriver chrome v79

#Draft of the CodeTemplate
dev-linux
Ivan Maslov 5 years ago
parent fb9d29e1a1
commit d9c491fada

@ -0,0 +1,59 @@
###############################
#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
###############################
...

@ -7,16 +7,21 @@ Double click to Studio\StudioRun_32.cmd or Studio\StudioRun_64.cmd
# Robot how to debug # Robot how to debug
Robot\PythonDebug_64.cmd Robot\PythonDebug_64.cmd
import Robot import RobotConnector
Robot.ActivityRun( RobotConnector.ActivityRun(
{ {
ModuleName: <"GUI"|..., str>, ModuleName: <"UIDesktop"|..., str>,
ActivityName: <Function or procedure name in module, str>, ActivityName: <Function or procedure name in module, str>,
ArgumentList: [<Argument 1, any type>, ...] - optional, ArgumentList: [<Argument 1, any type>, ...] - optional,
ArgumentDict: {<Argument 1 name, str>:<Argument 1 value, any type>, ...} - optional ArgumentDict: {<Argument 1 name, str>:<Argument 1 value, any type>, ...} - optional
} }
) )
OR
from pyOpenRPA.Robot import UIDesktop
UIDesktop.<ActivityName>(<args>)
# Robot example script: # Robot example script:
Robot\Examples\GetFolderList\Python_32_Script_Run.cmd Robot\Examples\GetFolderList\Python_32_Script_Run.cmd
@ -26,7 +31,7 @@ Resources\WPy32-3720\python-3.7.2\python.exe
# Python 64 bit # Python 64 bit
Resources\WPy64-3720\python-3.7.2.amd64\python.exe Resources\WPy64-3720\python-3.7.2.amd64\python.exe
# Module GUI activity List: # Module UIDesktop activity List:
############################ ############################
Новая версия Новая версия
############################ ############################

Loading…
Cancel
Save