Skip to content

Commit bdde886

Browse files
authored
Update README.md
1 parent cb0b4a0 commit bdde886

File tree

1 file changed

+30
-24
lines changed

1 file changed

+30
-24
lines changed

README.md

Lines changed: 30 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -33,55 +33,61 @@ Each one of the classes in UiPath.Core.Activities have properties that need to b
3333
public IDictionary<string, object> Run(
3434
WaitForReady waitForReady = WaitForReady.NONE,
3535
string Selector = null,
36-
UiElement uiElement = null,
36+
UiElement UiElement = null,
3737
int TimeOut = 30,
3838
bool ContinueOnError = false
3939
)
4040
{
41+
42+
//Assigning values and initializing dictionary
4143
WaitForReadyArgument = waitForReady;
4244
SelectorArgument = Selector;
4345
TimeoutArgument = TimeOut;
4446
ValueArgument = new OutArgument<string>();
4547
ContineOnErrorArgument = ContinueOnError;
4648

49+
IDictionary<string, object> output = new Dictionary<string, object>();
50+
input.Add(nameof(WaitForReadyArgument), waitForReady);
51+
input.Add(nameof(SelectorArgument), Selector);
52+
input.Add(nameof(TimeoutArgument), TimeOut);
53+
input.Add(nameof(ContineOnErrorArgument), ContinueOnError);
4754

48-
if (Selector == null && uiElement != null)
49-
SelectorArgument = uiElement.Selector.ToString();
50-
else if (Selector == null && uiElement == null)
55+
if (Selector == null && UiElement != null)
56+
SelectorArgument = UiElement.Selector.ToString();
57+
else if (Selector == null && UiElement == null)
5158
throw new SystemException("No Selector or uiElement parameter provided.");
5259

5360
Implementation = () => new Sequence
5461
{
5562
Activities =
63+
{
64+
new GetValue
5665
{
57-
new GetValue
66+
Target = new Target
5867
{
59-
Target = new Target
60-
{
61-
WaitForReady = new InArgument<WaitForReady>(activityContext =>
62-
WaitForReadyArgument.Get(activityContext)),
63-
Selector = new InArgument<string>(activityContext =>
64-
SelectorArgument.Get(activityContext)),
65-
TimeoutMS = new InArgument<int>(activityContext =>
66-
TimeoutArgument.Get(activityContext))
67-
},
68-
ContinueOnError = new InArgument<bool>(activityContext =>
69-
ContineOnErrorArgument.Get(activityContext)),
70-
Value = new OutArgument<string>(activityContext =>
71-
ValueArgument.Get(activityContext))
72-
}
68+
WaitForReady = new InArgument<WaitForReady>(activityContext =>
69+
WaitForReadyArgument.Get(activityContext)),
70+
Selector = new InArgument<string>(activityContext =>
71+
SelectorArgument.Get(activityContext)),
72+
TimeoutMS = new InArgument<int>(activityContext =>
73+
TimeoutArgument.Get(activityContext))
74+
},
75+
ContinueOnError = new InArgument<bool>(activityContext =>
76+
ContineOnErrorArgument.Get(activityContext)),
77+
Value = new OutArgument<string>(activityContext =>
78+
ValueArgument.Get(activityContext))
7379
}
80+
}
7481
};
7582

76-
input.Add(nameof(WaitForReadyArgument), waitForReady);
77-
input.Add(nameof(SelectorArgument), Selector);
78-
input.Add(nameof(TimeoutArgument), TimeOut);
79-
input.Add(nameof(ContineOnErrorArgument), ContinueOnError);
8083

81-
IDictionary<string, object> output = new Dictionary<string, object>();
8284
try
8385
{
86+
Console.WriteLine("");
87+
Console.WriteLine("Starting Get Text activity");
8488
output = WorkflowInvoker.Invoke(this, input);
89+
Console.WriteLine("");
90+
Console.WriteLine("Finished Get Text activity.");
8591
}
8692
catch (Exception e)
8793
{

0 commit comments

Comments
 (0)