#MinorUpdate

dev-linux
Ivan Maslov 5 years ago
parent bedff40503
commit b38a4ddd7c

@ -135,12 +135,12 @@ def Settings():
"ActivityTimeCheckLoopSeconds":5, #Количество секунд, между циклами проверки действий "ActivityTimeCheckLoopSeconds":5, #Количество секунд, между циклами проверки действий
"ActivityTimeList": [ "ActivityTimeList": [
{ {
"TimeHH:MM": "19:25", #Time [HH:MM] to trigger activity "TimeHH:MM": "22:23", #Time [HH:MM] to trigger activity
"WeekdayList": [1,2,3], #List of the weekday index when activity is applicable, Default [1,2,3,4,5,6,7] "WeekdayList": [1,2,3,4,5,6,7], #List of the weekday index when activity is applicable, Default [1,2,3,4,5,6,7]
"Activity":{ "Activity":{
"Type": "ProcessStart", #Activity type "Type": "ProcessStart", #Activity type
"Path": "Notepad", #Executable file path "Path": "start", #Executable file path
"ArgList": [] #List of the arguments "ArgList": ["cmd.exe","/c","PIPUpgrade.cmd"] #List of the arguments
} }
}, },
{ {

@ -3,6 +3,14 @@
############################### ###############################
#Init UIDesktop #Init UIDesktop
from pyOpenRPA.Robot import UIDesktop from pyOpenRPA.Robot import UIDesktop
#Init the robot #Optional if has 2 bitness
lRobotConfig={
"Python32FullPath": None, #Set from user: "..\\Resources\\WPy32-3720\\python-3.7.2\\OpenRPARobotGUIx32.exe"
"Python64FullPath": None, #Set from user
"Python32ProcessName": "OpenRPAUIDesktopX32.exe", #Config set once
"Python64ProcessName": "OpenRPAUIDesktopX64.exe" #Config set once
}
RobotConnector.UIDesktop.Utils.ProcessBitness.SettingsInit(lRobotConfig)
#Selector: Folder list (framework uia) #Selector: Folder list (framework uia)
lGUISelectorFolderList = [ lGUISelectorFolderList = [
@ -26,9 +34,10 @@ UIDesktop.UIOSelector_Get_UIO(lGUISelectorFolderList).right_click_input()
#Technology Selenium #Technology Selenium
############################### ###############################
#Init the selenium driver #Init the selenium driver
#https://selenium-python.readthedocs.io/
import os import os
#Add chrome webdriver to PATH system enviroment (need to selenium) #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\\" os.environ["PATH"]=os.environ["PATH"]+";C:\\Abs\\Archive\\scopeSrcUL\\OpenRPA\\Resources\\SeleniumWebDrivers\\Chrome\\chromedriver_win32 v80.0.3987.16\\"
#Import selenium #Import selenium
from selenium import webdriver from selenium import webdriver
from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.keys import Keys
@ -48,6 +57,34 @@ elem.send_keys(Keys.RETURN)
#Close the driver #Close the driver
driver.close() driver.close()
#################################
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 v80.0.3987.16\\"
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.keys import Keys
driver = webdriver.Chrome()
#Open URL
driver.get("https://www.yandex.ru")
#elem = driver.find_element_by_css_selector("input.input__control.input__input")
wait = WebDriverWait(driver, 10)
element = wait.until(EC.element_to_be_clickable((By.CSS, "input.input__control.input__input")))
#Type text in search imput
element.send_keys("Test request")
#Submit the search
element.send_keys(Keys.RETURN)
#Close the driver
#driver.close()
############################### ###############################
#Technology Image & Mouse #Technology Image & Mouse

@ -0,0 +1,24 @@
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 v80.0.3987.16\\"
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.keys import Keys
driver = webdriver.Chrome()
#Open URL
driver.get("https://www.yandex.ru")
#elem = driver.find_element_by_css_selector("input.input__control.input__input")
wait = WebDriverWait(driver, 10)
element = wait.until(EC.element_to_be_clickable((By.CSS_SELECTOR, "input.input__control.input__input")))
#Type text in search imput
element.send_keys("Test request")
#Submit the search
element.send_keys(Keys.RETURN)
Loading…
Cancel
Save