-
Notifications
You must be signed in to change notification settings - Fork 1
/
testworkflow.lisp
34 lines (27 loc) · 1 KB
/
testworkflow.lisp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
(in-package :kommissar)
(defun load-elements ()
(setq elements '(:OBJ
("firstDownvote" :OBJ
("xPath" . "//html/body/div[4]/div[3]/div/div/div/div[5]")
("key" . "firstDownvote") ("element" :OBJ))
("firstRedditLink" :OBJ
("xPath" . "//html/body/div[4]/div[3]/div/div/div[2]/p/a")
("key" . "firstRedditLink") ("element" :OBJ))
("redditSearch" :OBJ ("xPath" . "//html/body/div[2]/div/form/input")
("key" . "redditSearch") ("element" :OBJ)))
))
(load-elements)
(defun load-actions ()
(setq actions '((:OBJ ("target" . "firstDownvote") ("action" . "mouse-click") ("args"))
(:OBJ ("target" . "firstRedditLink") ("action" . "dict-scrape")
("args" "firstRedditLinkTitle"
"Good morning, I thought I'd give a quick update."))
(:OBJ ("target" . "redditSearch") ("action" . "set-text") ("args" "wefe")))
))
(load-actions)
(defun workflow-script ()
(mouse-click "firstDownvote")
(setq firstRedditLinkTitle (dict-scrape "firstRedditLink"))
(set-text "redditSearch" firstRedditLinkTitle)
) ;;(workflow-script)
;;