<GlobalValues>
<GlobalValue>
<TelerikHomeFirstname>"Michael"</TelerikHomeFirstname>
<TelerikOwnerSurname>"Jackson"</TelerikOwnerSurname>
<TelerikHomeEmailAddress>"Neverland Ranch"</TelerikHomeEmailAddress>
<TelerikNickName>"King of POP"</TelerikNickName>
<TelerikURL>"http://google.com/"</TelerikURL>
<TelerikDBUsername>"telerik"</TelerikDBUsername>
<TelerikDBPassword>"TelerikPassword"</TelerikDBPassword>
<TelerikDBDatabase>"telerikdb"</TelerikDBDatabase>
<TelerikCheckCountUsername>"tlk"</TelerikCheckCountUsername>
<TelerikCheckCountPassword>"password"<TelerikCheckCountPassword>
</GlobalValue>
</GlobalValues>
Add a new Script Step. In the OnBeforeTestStarted method
add the following code
public override void OnBeforeTestStarted()
{
string globalVarsFile = @"c:\<path>\myglobalvarsfile.xml";
try
{
if(!File.Exists(globalVarsFile))
{
// an error has occurred
Log.WriteLine("Error: FILE" + globalVarsFile + "DOES NOT EXIST");
Assert.IsTrue(false);
}
else
{
Log.WriteLine("File found" +globalVarsFile);
}
XDocument globalVarsXML = XDocument.Load(globalVarsFile);
var queryResult =
from gl in globalVarsXML.Element("GlobalValues").Element("GlobalValue").Elements()
select gl;
foreach(XElement x in queryResult)
{
SetExtractedValue(x.Name.ToString(), x.Value.ToString());
}
}
catch(FileNotFoundException fnfe)
{
Log.WriteLine("IO Error occurred: " + fnfe.Message);
}
catch(IOException ioex)
{
Log.WriteLine("IO Error occurred: " + ioex.Message);
}
}
<
span
class
=
"requisitionTitleText"
>Requisition # 2813:<
span
class
=
"requisitionDetails"
> tt 574 6</
span
></
span
>
string
newReq =
"Requisition # 2813:"
newReq = newReq.Replace(
"Requisition # "
,
""
);
newReq = newReq.Replace(
":"
,
""
);
HtmlAnchor:<a href="http://www.google.co.uk" target="_blank">
The code cannot be changed and because "_blank" is not guaranteed to be a new tab or window. It's implemented differently per-browser. I have implemented the workaround below;
Hi,
The scenario I am trying to automate is:
Now I am trying to record this scenario using Telerik Test studio. When I am executing the recorded steps, I could successfully select the checkbox from pop-up menu. But after that ‘Apply’ option is not getting added to the same pop-up menu.
Could someone please advise me on how can I deal with the above scenario?
SilverlightApp app = ActiveBrowser.SilverlightApps()[0];
<
DIV
style
=
"DISPLAY: none"
id
=
IFRAME_MainDetails_c
class
=
"ms-crm-FieldLabel-LeftAlign ms-crm-Field-Normal"
sl
=
"false"
><
LABEL
for
=
IFRAME_MainDetails
>MainDetails</
LABEL
></
DIV
>
<
IFRAME
style
=
"BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; BORDER-TOP: 0px; BORDER-RIGHT: 0px"
id
=
IFRAME_MainDetails
class
=
ms
-crm-Custom
tabIndex
=
1020
src
=
"/TempTestHandover/%7B634871220200000000%7D/WebResources/sitecore_/KpiReports/QualificationRecordMainDetails.html"
frameBorder
=
0
scrolling
=
no
preload
=
"0"
url
=
"../webresources/sitecore_ClearBackgroundPage.htm"
></
IFRAME
>