or
1.
Dim
objectName
As
Object
= GetExtractedValue(
"objectNameVariable"
)
'The variable used in the extraction step
2.
Dim
objectSpan
As
HtmlSpan = Find.ByExpression(Of HtmlSpan)(
"tagname=span"
,
"TextContent="
+ objectName.ToString())
3.
objectSpan.Click(false)
1.
'The span is located here
2.
ActiveBrowser.RefreshDomTree()
3.
System.Threading.Thread.Sleep(5000)
4.
ActiveBrowser.RefreshDomTree()
5.
System.Threading.Thread.Sleep(5000)
6.
'The click action is here
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
Approval
>
<
data-1
>
<
Fault
label
=
"IncidentType"
value
=
"Fatal"
/>
<
Fault
label
=
"IncidentDate"
value
=
"01/01/2014"
/>
<
Fault
label
=
"IncidentTime"
value
=
"10:00"
/>
<
Fault
label
=
"Location"
value
=
"Surface"
/>
<
Fault
label
=
"Detailedocationonsite"
value
=
"Location"
/>
.
.
.
.
<
data-1
>
<
data-2
>
<
Fault
label
=
"IncidentType"
value
=
"Fatal"
/>
<
Fault
label
=
"IncidentDate"
value
=
"01/01/2014"
/>
<
Fault
label
=
"IncidentTime"
value
=
"10:00"
/>
<
Fault
label
=
"Location"
value
=
"Surface"
/>
<
Fault
label
=
"Detailedocationonsite"
value
=
"Location"
/>
.
.
.
.
<
data-2
>
.
.
.
.
<
data-n
>
<
Fault
label
=
"IncidentType"
value
=
"Fatal"
/>
<
Fault
label
=
"IncidentDate"
value
=
"01/01/2014"
/>
<
Fault
label
=
"IncidentTime"
value
=
"10:00"
/>
<
Fault
label
=
"Location"
value
=
"Surface"
/>
<
Fault
label
=
"Detailedocationonsite"
value
=
"Location"
/>
.
.
.
.
<
data-n
>
</
Approval
>