tag:blogger.com,1999:blog-80535152617404932192024-03-27T00:35:15.513-07:00Automation Testing UtilitiesReflections of Visionary Minds !!!Automation Testerhttp://www.blogger.com/profile/15092944995388094312noreply@blogger.comBlogger24125tag:blogger.com,1999:blog-8053515261740493219.post-58784156060619441162014-06-16T22:05:00.000-07:002014-06-16T22:05:01.687-07:00Creating New Defect, TestCase Run, Attaching Files, Add Execution Steps<div dir="ltr" style="text-align: left;" trbidi="on">
The following snippets describes how to create new Defect, Attachments, Adding Run., Adding Steps<br />
<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: #3f7f5f; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"> /*</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: #3f7f5f; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"> *
Example For Creating a new Defect and Attaching a File</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: #3f7f5f; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"> */</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">public</span></b><span style="font-family: 'Courier New'; font-size: 9pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">static</span></b><span style="font-family: 'Courier New'; font-size: 9pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">void</span></b><span style="font-family: 'Courier New'; font-size: 9pt;">
createDefect() </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">throws</span></b><span style="font-family: 'Courier New'; font-size: 9pt;"> <u>ALMServiceException</u> {</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> <u>ALMServiceWrapper</u> wrapper =
</span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">new</span></b><span style="font-family: 'Courier New'; font-size: 9pt;"> <u>ALMServiceWrapper</u>(</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"http://localhost:8081/qcbin"</span><span style="font-family: 'Courier New'; font-size: 9pt;">);</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> wrapper.connect(</span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"admin"</span><span style="font-family: 'Courier New'; font-size: 9pt;">, </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"admin"</span><span style="font-family: 'Courier New'; font-size: 9pt;">, </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"DEFAULT"</span><span style="font-family: 'Courier New'; font-size: 9pt;">, </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"SampleProject"</span><span style="font-family: 'Courier New'; font-size: 9pt;">);</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> <u>IDefect</u> defect =
wrapper.newDefect();</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> defect.isReproducible(</span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">true</span></b><span style="font-family: 'Courier New'; font-size: 9pt;">);</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> defect.setAssignedTo(</span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"admin"</span><span style="font-family: 'Courier New'; font-size: 9pt;">);</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> defect.setDetectedBy(</span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"admin"</span><span style="font-family: 'Courier New'; font-size: 9pt;">);</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> defect.setDescription(</span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"My Defect Description"</span><span style="font-family: 'Courier New'; font-size: 9pt;">);</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> defect.setDetectionDate(</span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"12/1/2013"</span><span style="font-family: 'Courier New'; font-size: 9pt;">);</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> defect.setPriority(<u>DefectPriority</u>.HIGH);</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> defect.setSeverity(<u>DefectSeverity</u>.MEDIUM);</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> defect.setStatus(<u>DefectStatus</u>.OPEN);</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> defect.setSummary(</span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"My Defect/Bug Summary"</span><span style="font-family: 'Courier New'; font-size: 9pt;">);</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> System.</span><i><span style="color: #0000c0; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">out</span></i><span style="font-family: 'Courier New'; font-size: 9pt;">.println(defect.getDefectID());</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> wrapper.newAttachment(</span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"D:\\Data.xlsx"</span><span style="font-family: 'Courier New'; font-size: 9pt;">, </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"My Attachment Description"</span><span style="font-family: 'Courier New'; font-size: 9pt;">,</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> defect);</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> defect.save();</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> wrapper.close();</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> }</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: #3f7f5f; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"> /*</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: #3f7f5f; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"> *
Example For Creating an Attachment for a TestSet</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: #3f7f5f; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"> */</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">public</span></b><span style="font-family: 'Courier New'; font-size: 9pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">static</span></b><span style="font-family: 'Courier New'; font-size: 9pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">void</span></b><span style="font-family: 'Courier New'; font-size: 9pt;">
createAttachmentForTestSet() </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">throws</span></b><span style="font-family: 'Courier New'; font-size: 9pt;"> <u>ALMServiceException</u> {</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> <u>ALMServiceWrapper</u> wrapper =
</span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">new</span></b><span style="font-family: 'Courier New'; font-size: 9pt;"> <u>ALMServiceWrapper</u>(</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"http://localhost:8081/qcbin"</span><span style="font-family: 'Courier New'; font-size: 9pt;">);</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> wrapper.connect(</span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"admin"</span><span style="font-family: 'Courier New'; font-size: 9pt;">, </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"admin"</span><span style="font-family: 'Courier New'; font-size: 9pt;">, </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"DEFAULT"</span><span style="font-family: 'Courier New'; font-size: 9pt;">, </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"SampleProject"</span><span style="font-family: 'Courier New'; font-size: 9pt;">);</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> <u>ITestSet</u> testSet =
wrapper.getTestSet(</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"SampleTestSetFolder\\SubTestSetFolder1"</span><span style="font-family: 'Courier New'; font-size: 9pt;">, </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"TestSet1"</span><span style="font-family: 'Courier New'; font-size: 9pt;">, 2);</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> wrapper.newAttachment(</span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"D:\\Data.xlsx"</span><span style="font-family: 'Courier New'; font-size: 9pt;">, </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"My Attachment Description"</span><span style="font-family: 'Courier New'; font-size: 9pt;">,</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> testSet);</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> wrapper.close();</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
</div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> }</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">public</span></b><span style="font-family: 'Courier New'; font-size: 9pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">static</span></b><span style="font-family: 'Courier New'; font-size: 9pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">void</span></b><span style="font-family: 'Courier New'; font-size: 9pt;">
createTestCaseRunAndTestCaseExecutionSteps()</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">throws</span></b><span style="font-family: 'Courier New'; font-size: 9pt;"> <u>ALMServiceException</u> {</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> <u>ALMServiceWrapper</u> wrapper =
</span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">new</span></b><span style="font-family: 'Courier New'; font-size: 9pt;"> <u>ALMServiceWrapper</u>(</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"http://localhost:8081/qcbin"</span><span style="font-family: 'Courier New'; font-size: 9pt;">);</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> wrapper.connect(</span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"admin"</span><span style="font-family: 'Courier New'; font-size: 9pt;">, </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"admin"</span><span style="font-family: 'Courier New'; font-size: 9pt;">, </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"DEFAULT"</span><span style="font-family: 'Courier New'; font-size: 9pt;">, </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"SampleProject"</span><span style="font-family: 'Courier New'; font-size: 9pt;">);</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> </span><span style="color: #3f7f5f; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">//
Update Test Case Result and Attach a File</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> <u>ITestCase</u> loginTest =
wrapper.updateResult(</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"SampleTestSetFolder\\SubTestSetFolder1"</span><span style="font-family: 'Courier New'; font-size: 9pt;">, </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"TestSet1"</span><span style="font-family: 'Courier New'; font-size: 9pt;">, 2,</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"Login"</span><span style="font-family: 'Courier New'; font-size: 9pt;">, <u>StatusAs</u>.PASSED);</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> wrapper.newAttachment(</span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"D:\\Data.xlsx"</span><span style="font-family: 'Courier New'; font-size: 9pt;">, </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"My Attachment Description"</span><span style="font-family: 'Courier New'; font-size: 9pt;">,</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> loginTest);</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> </span><span style="color: #3f7f5f; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">//
Update Test Case Result and Attach a File</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> <u>ITestCase</u> logoutTest =
wrapper.updateResult(</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"SampleTestSetFolder\\SubTestSetFolder1"</span><span style="font-family: 'Courier New'; font-size: 9pt;">, </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"TestSet1"</span><span style="font-family: 'Courier New'; font-size: 9pt;">, 2,</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"Logout"</span><span style="font-family: 'Courier New'; font-size: 9pt;">, <u>StatusAs</u>.NOT_COMPLETED);</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> wrapper.newAttachment(</span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"D:\\Data.xlsx"</span><span style="font-family: 'Courier New'; font-size: 9pt;">, </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"My Attachment Description"</span><span style="font-family: 'Courier New'; font-size: 9pt;">,</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> logoutTest);</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> </span><span style="color: #3f7f5f; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">//
Create a new Run, Add the Steps for this Run and Attach a File</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> <u>ITestCaseRun</u> loginRun =
wrapper.createNewRun(loginTest, </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"Run 1"</span><span style="font-family: 'Courier New'; font-size: 9pt;">,</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> <u>StatusAs</u>.PASSED);</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> wrapper.addStep(loginRun, </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"Enter username"</span><span style="font-family: 'Courier New'; font-size: 9pt;">, <u>StatusAs</u>.PASSED,</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"Enters username"</span><span style="font-family: 'Courier New'; font-size: 9pt;">, </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"enter"</span><span style="font-family: 'Courier New'; font-size: 9pt;">, </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"enter"</span><span style="font-family: 'Courier New'; font-size: 9pt;">);</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> wrapper.addStep(loginRun, </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"Enter password"</span><span style="font-family: 'Courier New'; font-size: 9pt;">, <u>StatusAs</u>.PASSED,</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"Enters password"</span><span style="font-family: 'Courier New'; font-size: 9pt;">, </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"enter"</span><span style="font-family: 'Courier New'; font-size: 9pt;">, </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"enter"</span><span style="font-family: 'Courier New'; font-size: 9pt;">);</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> wrapper.addStep(loginRun, </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"Click Login"</span><span style="font-family: 'Courier New'; font-size: 9pt;">, <u>StatusAs</u>.PASSED,</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"Enters username"</span><span style="font-family: 'Courier New'; font-size: 9pt;">, </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">""</span><span style="font-family: 'Courier New'; font-size: 9pt;">, </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">""</span><span style="font-family: 'Courier New'; font-size: 9pt;">);</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> wrapper.newAttachment(</span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"D:\\Data.xlsx"</span><span style="font-family: 'Courier New'; font-size: 9pt;">, </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"My Attachment Description"</span><span style="font-family: 'Courier New'; font-size: 9pt;">,</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> loginRun);</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> </span><span style="color: #3f7f5f; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">//
Create a new Run, Add the Steps for this Run and Attach a File</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> <u>ITestCaseRun</u> logoutRun =
wrapper.createNewRun(logoutTest, </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"Run
2"</span><span style="font-family: 'Courier New'; font-size: 9pt;">,</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> <u>StatusAs</u>.PASSED);</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> wrapper.addStep(logoutRun, </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"Enter username"</span><span style="font-family: 'Courier New'; font-size: 9pt;">, <u>StatusAs</u>.PASSED,</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"Enters username"</span><span style="font-family: 'Courier New'; font-size: 9pt;">, </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"enter"</span><span style="font-family: 'Courier New'; font-size: 9pt;">, </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"enter"</span><span style="font-family: 'Courier New'; font-size: 9pt;">);</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> wrapper.addStep(logoutRun, </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"Enter password"</span><span style="font-family: 'Courier New'; font-size: 9pt;">, <u>StatusAs</u>.PASSED,</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"Enters password"</span><span style="font-family: 'Courier New'; font-size: 9pt;">, </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"enter"</span><span style="font-family: 'Courier New'; font-size: 9pt;">, </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"enter"</span><span style="font-family: 'Courier New'; font-size: 9pt;">);</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> wrapper.addStep(logoutRun, </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"Click Login"</span><span style="font-family: 'Courier New'; font-size: 9pt;">, <u>StatusAs</u>.PASSED,</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"Enters username"</span><span style="font-family: 'Courier New'; font-size: 9pt;">, </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">""</span><span style="font-family: 'Courier New'; font-size: 9pt;">, </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">""</span><span style="font-family: 'Courier New'; font-size: 9pt;">);</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> wrapper.newAttachment(</span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"D:\\Data.xlsx"</span><span style="font-family: 'Courier New'; font-size: 9pt;">, </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">"My Attachment Description"</span><span style="font-family: 'Courier New'; font-size: 9pt;">,</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> logoutRun);</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: 'Courier New'; font-size: 9pt;"> wrapper.close();</span><span style="font-family: "Courier New"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
</div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 9pt; line-height: 115%;"> }<span style="background: #EDEDED;"><o:p></o:p></span></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<i>To be Contd..</i></div>
</div>
Automation Testerhttp://www.blogger.com/profile/15092944995388094312noreply@blogger.com231tag:blogger.com,1999:blog-8053515261740493219.post-80144869069271854832014-04-19T23:24:00.000-07:002014-04-20T01:01:43.577-07:00Handling Windows Dialogs Using Selenium Part4<div dir="ltr" style="text-align: left;" trbidi="on">
This section describes some of the important API methods and their usage.<br />
<div>
<br />
<br />
//The initial method to interact with a main window<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">public</span></b><span style="font-family: Consolas; font-size: 10pt;"> WindowElement getWindowElement(String windowName)</span><span style="font-family: Consolas; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt; line-height: 14.266666412353516px;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt; line-height: 14.266666412353516px;">throws</span></b><span style="font-family: Consolas; font-size: 10pt; line-height: 14.266666412353516px;"> WindowsHandlerException</span></div>
<br />
<br />
//To Check whether a particular window is present<br />
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; line-height: 107%; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin;">public</span></b><span style="font-family: Consolas; font-size: 10pt; line-height: 107%;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; line-height: 107%; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin;">boolean</span></b><span style="font-family: Consolas; font-size: 10pt; line-height: 107%;"> isWindowPresent(String
windowName) </span><br />
<br />
<br />
//To see whether an element is displayed on screen (Visible on screen)<br />
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; line-height: 107%; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin;">public</span></b><span style="font-family: Consolas; font-size: 10pt; line-height: 107%;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; line-height: 107%; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin;">boolean</span></b><span style="font-family: Consolas; font-size: 10pt; line-height: 107%;"> isDisplayed(WindowElement
element) </span><br />
<br />
<br />
//To determine whether an element is enabled to interact<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">public</span></b><span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">boolean</span></b><span style="font-family: Consolas; font-size: 10pt;">
isEnabled(WindowElement element)</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<span style="font-family: Consolas; font-size: 10pt; line-height: 107%;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; line-height: 107%; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin;">throws</span></b><span style="font-family: Consolas; font-size: 10pt; line-height: 107%;"> WindowsHandlerException </span><br />
<br />
<br />
//To check whether an element is found<br />
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; line-height: 107%; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin;">public</span></b><span style="font-family: Consolas; font-size: 10pt; line-height: 107%;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; line-height: 107%; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin;">boolean</span></b><span style="font-family: Consolas; font-size: 10pt; line-height: 107%;"> isNull(WindowElement
element) </span><br />
<br />
<br />
//Retrieve Text Box Content<br />
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; line-height: 107%; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin;">public</span></b><span style="font-family: Consolas; font-size: 10pt; line-height: 107%;"> String
getTextBoxValue(WindowElement element)</span><br />
<span style="font-family: Consolas; font-size: 10pt; line-height: 107%;"><br /></span>
<br />
//Get text of an Element<br />
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; line-height: 107%; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin;">public</span></b><span style="font-family: Consolas; font-size: 10pt; line-height: 107%;"> String
getText(WindowElement element)</span><br />
<br />
<br />
//Search for Installed browser Version, Pass the Browser Enum as parameter<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">public</span></b><span style="font-family: Consolas; font-size: 10pt;"> String
getInstalledBrowserVersion(Browser browser)</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<span style="font-family: Consolas; font-size: 10pt; line-height: 107%;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; line-height: 107%; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin;">throws</span></b><span style="font-family: Consolas; font-size: 10pt; line-height: 107%;"> WindowsHandlerException </span><br />
<br />
<br />
//Start/Run/Open an application<br />
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; line-height: 107%; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin;">public</span></b><span style="font-family: Consolas; font-size: 10pt; line-height: 107%;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; line-height: 107%; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin;">boolean</span></b><span style="font-family: Consolas; font-size: 10pt; line-height: 107%;"> openApplication(String
appPath) </span><br />
<br />
<br />
//Close Process safely as a user would close it.<br />
//Identify the process by id or multiple process by same name<br />
//If the process cannot be closed in a natural way - kill the process<br />
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; line-height: 107%; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin;">public</span></b><span style="font-family: Consolas; font-size: 10pt; line-height: 107%;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; line-height: 107%; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin;">void</span></b><span style="font-family: Consolas; font-size: 10pt; line-height: 107%;">
closeProcessesByName(String name, </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; line-height: 107%; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin;">boolean</span></b><span style="font-family: Consolas; font-size: 10pt; line-height: 107%;"> forceKill)</span><br />
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">public</span></b><span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">void</span></b><span style="font-family: Consolas; font-size: 10pt;"> closeProcessesByID(</span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">int</span></b><span style="font-family: Consolas; font-size: 10pt;"> pid, </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">boolean</span></b><span style="font-family: Consolas; font-size: 10pt;"> forceKill)</span><br />
<br />
<br />
<br />
//Search an element by following methods<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">public</span></b><span style="font-family: Consolas; font-size: 10pt;"> WindowElement
findElementByAccessKey(WindowElement parentElement,</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt; line-height: 107%;"> String accessKey) </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; line-height: 107%; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin;">throws</span></b><span style="font-family: Consolas; font-size: 10pt; line-height: 107%;"> WindowsHandlerException</span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt; line-height: 107%;"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt; line-height: 107%;"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">public</span></b><span style="font-family: Consolas; font-size: 10pt;"> WindowElement
findElementByClassNameAndLocalizedControlType(</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> WindowElement
parentElement, String className,</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt; line-height: 107%;"> String localizedControlTypeName) </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; line-height: 107%; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin;">throws</span></b><span style="font-family: Consolas; font-size: 10pt; line-height: 107%;"> WindowsHandlerException</span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt; line-height: 107%;"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">public</span></b><span style="font-family: Consolas; font-size: 10pt;"> WindowElement
findElementByAutomationID(WindowElement parentElement,</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt; line-height: 107%;"> String automationID) </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; line-height: 107%; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin;">throws</span></b><span style="font-family: Consolas; font-size: 10pt; line-height: 107%;"> WindowsHandlerException </span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt; line-height: 107%;"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">public</span></b><span style="font-family: Consolas; font-size: 10pt;"> WindowElement
findElementByNameAndLocalizedControlType(</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> WindowElement
parentElement, String name,</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt; line-height: 107%;"> String localizedControlTypeName) </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; line-height: 107%; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin;">throws</span></b><span style="font-family: Consolas; font-size: 10pt; line-height: 107%;"> WindowsHandlerException </span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt; line-height: 107%;"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">public</span></b><span style="font-family: Consolas; font-size: 10pt;"> WindowElement
findElementByClassName(WindowElement parentElement,</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt; line-height: 107%;"> String className) </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; line-height: 107%; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin;">throws</span></b><span style="font-family: Consolas; font-size: 10pt; line-height: 107%;"> WindowsHandlerException</span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt; line-height: 107%;"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">public</span></b><span style="font-family: Consolas; font-size: 10pt;"> WindowElement
findElementByNameAndClassName(</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> WindowElement
parentElement, String name, String className)</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt; line-height: 107%;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; line-height: 107%; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin;">throws</span></b><span style="font-family: Consolas; font-size: 10pt; line-height: 107%;"> WindowsHandlerException</span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt; line-height: 107%;"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">public</span></b><span style="font-family: Consolas; font-size: 10pt;"> WindowElement
findElementByLocalizedControlType(</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> WindowElement
parentElement, String localizedControlTypeName)</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt; line-height: 107%;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; line-height: 107%; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin;">throws</span></b><span style="font-family: Consolas; font-size: 10pt; line-height: 107%;"> WindowsHandlerException</span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt; line-height: 107%;"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">public</span></b><span style="font-family: Consolas; font-size: 10pt;"> WindowElement
findElementByName(WindowElement parentElement,</span></div>
<span style="font-family: Consolas; font-size: 10pt; line-height: 107%;"> String name) </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt; line-height: 107%; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin;">throws</span></b><span style="font-family: Consolas; font-size: 10pt; line-height: 107%;"> WindowsHandlerException </span></div>
<div>
<span style="font-family: Consolas; font-size: x-small;"><span style="line-height: 14.266666412353516px;"><br /></span></span></div>
<div>
<span style="font-family: Consolas; font-size: x-small;"><span style="line-height: 14.266666412353516px;"><br /></span></span><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt; line-height: 107%;"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt; line-height: 107%;"><br /></span></div>
Find Multiple Elements by<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">public</span></b><span style="font-family: Consolas; font-size: 10pt;">
List<WindowElement> findElementsByLocalizedControlType(</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<span style="font-family: Consolas; font-size: 10pt; line-height: 107%;"> WindowElement parentElement, String
localizedControlTypeName) </span><br />
<i><br /></i>
<i><br /></i>
<i>To Be Contd..</i></div>
</div>
Automation Testerhttp://www.blogger.com/profile/15092944995388094312noreply@blogger.com59tag:blogger.com,1999:blog-8053515261740493219.post-996886219773163052014-04-09T23:56:00.001-07:002014-06-17T05:02:53.094-07:00ATU Reporter Part 3 - for TestNG<div dir="ltr" style="text-align: left;" trbidi="on">
<h3 style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; margin: 0px; position: relative;">
Upcoming Releases and Features</h3>
<h4 style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.479999542236328px; margin: 0px; position: relative;">
</h4>
<div>
<br />
<br /></div>
<div>
<h4 style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.479999542236328px; margin: 0px; position: relative;">
Current and Stable Version: ATU Reporter_TestNG v2.1</h4>
<h2>
<span style="background-color: white; color: #222222; font-family: 'Times New Roman', serif; font-size: 16px; line-height: 18px;">***************************************************************</span></h2>
<h4>
<span style="font-weight: normal;">Features include:</span></h4>
<h4 style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.479999542236328px; margin: 0px; position: relative;">
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; font-weight: normal; line-height: normal;">
</div>
<div style="color: black; font-family: 'Times New Roman'; font-size: medium; font-weight: normal; line-height: normal;">
<ul>
<li>Fixed: Video Recording is unable to play due to a missing attribute.</li>
<li>If execution recording is disabled then the "<span style="color: #585858; font-family: 'Trebuchet MS', Arial, Helvetica, sans-serif; font-size: 14px; text-align: center;">Click Me to Show/Hide the Execution Video</span>" should not be displayed [Feature Requested by users]**</li>
</ul>
</div>
</h4>
<h4 style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.479999542236328px; margin: 0px; position: relative;">
<br /></h4>
<h4 style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.479999542236328px; margin: 0px; position: relative;">
<br /></h4>
<h4 style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.479999542236328px; margin: 0px; position: relative;">
ATU Reporter_TestNG v2.0</h4>
</div>
<div>
<span style="background-color: white; color: #222222; font-family: 'Times New Roman', serif; font-size: 16px; line-height: 18px;">***************************************************************</span></div>
<div>
<h4 style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.479999542236328px; margin: 0px; position: relative;">
<span style="font-weight: normal;">Features include: </span></h4>
<div style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.479999542236328px;">
<ul style="line-height: 1.4; margin: 0.5em 0px; padding: 0px 2.5em;">
<li style="margin: 0px 0px 0.25em; padding: 0px;">User can log a step status as (implemented in new overloaded add methods) </li>
<ul style="line-height: 1.4; margin: 0.5em 0px; padding: 0px 2.5em;">
<li style="margin: 0px 0px 0.25em; padding: 0px;">INFO</li>
<li style="margin: 0px 0px 0.25em; padding: 0px;">WARNING</li>
<li style="margin: 0px 0px 0.25em; padding: 0px;">PASSED</li>
<li style="margin: 0px 0px 0.25em; padding: 0px;">FAILED [Feature Requested by users]**</li>
</ul>
<li style="margin: 0px 0px 0.25em; padding: 0px;">If a step has been logged as failed, an option is provided for the user to continue the execution of remaining steps</li>
<li style="margin: 0px 0px 0.25em; padding: 0px;">Record the test execution</li>
</ul>
</div>
</div>
<div>
<br /></div>
<h4 style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.479999542236328px; margin: 0px; position: relative;">
</h4>
<h4 style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.479999542236328px; margin: 0px; position: relative;">
ATU Reporter_TestNG v1.0</h4>
<div>
<span style="background-color: white; color: #222222; font-family: 'Times New Roman', serif; font-size: 16px; line-height: 18px;">***************************************************************</span></div>
<div>
<h4 style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.479999542236328px; margin: 0px; position: relative;">
<span style="font-weight: normal;">Features include:</span></h4>
</div>
<div>
<br /></div>
<div>
<ul style="text-align: left;">
<li>This release consists of all the features upto v4.5 that are listed in this link <a href="http://automationtestingutilities.blogspot.in/2013/12/ATUReporterPart3.html" style="background-color: white; color: #3d85c6; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.479999542236328px; text-decoration: none;" target="_blank">ATU Reporter Part 3</a></li>
<li>Desktop Screenshots are captured when the boolean is set to true in the overloaded add method</li>
</ul>
</div>
</div>
Automation Testerhttp://www.blogger.com/profile/15092944995388094312noreply@blogger.com14tag:blogger.com,1999:blog-8053515261740493219.post-43940757924606115532014-04-09T22:56:00.001-07:002014-06-17T05:03:10.046-07:00ATU Reporter for TestNG<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.479999542236328px;">
<i>Hi There,</i></div>
<i style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.479999542236328px;"><br /></i><i style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.479999542236328px;">Automation without a proper reporting ?</i><br />
<i style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.479999542236328px;"><br /></i><span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.479999542236328px;">We have developed an Open Source Reporting utility (ATU Reporter) for TestNG. This is a listener for generating customized graphical reports. Following reports can be generated by this listener.</span><br />
<br />
<ul style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.479999542236328px; margin: 0.5em 0px; padding: 0px 2.5em;">
<li style="margin: 0px 0px 0.25em; padding: 0px;">Line Charts</li>
<li style="margin: 0px 0px 0.25em; padding: 0px;">Bar Charts</li>
<li style="margin: 0px 0px 0.25em; padding: 0px;">Pie Charts </li>
</ul>
<br style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.479999542236328px;" />
<h3 style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; margin: 0px; position: relative;">
ATU Reporter for TestNG:</h3>
<br style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.479999542236328px;" />
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.479999542236328px;">The Project is a TestNG Listener which can be used for a more detailed Graphical reports.</span><br />
<br style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.479999542236328px;" />
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.479999542236328px;">This Post is organized into following parts:</span><br />
<br style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.479999542236328px;" />
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.479999542236328px;">Go To: </span><a href="http://automationtestingutilities.blogspot.in/2013/12/ATUReporterPart1.html" style="background-color: white; color: #3d85c6; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.479999542236328px; text-decoration: none;" target="_blank">ATU Reporter Part 1</a><span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.479999542236328px;"> - </span><i style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.479999542236328px;">Contains Details regarding The ATU Reporter</i><br />
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.479999542236328px;">Go To: </span><a href="http://automationtestingutilities.blogspot.in/2013/12/ATUReporterPart2.html" style="background-color: white; color: #3d85c6; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.479999542236328px; text-decoration: none;" target="_blank">ATU Reporter Part 2</a><span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.479999542236328px;"> - </span><i style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.479999542236328px;">Contains Details regarding The usage along with Examples</i><br />
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.479999542236328px;">Go To: </span><a href="http://automationtestingutilities.blogspot.in/2014/04/ATUReporterPart3TestNG.html" style="background-color: white; color: #3d85c6; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.479999542236328px; text-decoration: none;" target="_blank">ATU Reporter Part 3</a><span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.479999542236328px;"> - </span><i style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.479999542236328px;">Contains Details regarding Upcoming Releases and Features</i><br />
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.479999542236328px;">Go To:</span><span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.479999542236328px;"> </span><a href="http://automationtestingutilities.blogspot.in/2014/02/ATUReporterPart4.html" style="background-color: white; color: #3d85c6; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.479999542236328px; text-decoration: none;" target="_blank">ATU Reporter Part 4</a><span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.479999542236328px;"> - </span><i style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.479999542236328px;">Contains Details regarding Customizing the Reports</i><br />
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.479999542236328px;">Go To:</span><span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.479999542236328px;"><span style="font-size: xx-small;"> </span><a href="http://automationtestingutilities.blogspot.in/2014/03/ATUReporterPart5.html" style="color: #3d85c6; text-decoration: none;" target="_blank">ATU Reporter Part 5</a></span><span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.479999542236328px;"> - </span><i style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.479999542236328px;">Contains Details regarding Excel Reports Dependencies</i><br />
<br style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.479999542236328px;" />
<br style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.479999542236328px;" />
<br style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.479999542236328px;" />
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.479999542236328px;">Download Links: Stable Version 2.1</span><br />
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18.479999542236328px;"><br /></span><a href="https://drive.google.com/folderview?id=0B7rZvkq9tkwPWk5KX0hUcGZ1U0E&usp=sharing" target="_blank">Download ATU Selenium TestNG Reporter</a><br />
<br /></div>
Automation Testerhttp://www.blogger.com/profile/15092944995388094312noreply@blogger.com33tag:blogger.com,1999:blog-8053515261740493219.post-66889434510672525782014-03-09T22:20:00.000-07:002014-03-10T04:41:48.981-07:00ATU Reporter Part 5<div dir="ltr" style="text-align: left;" trbidi="on">
<h3 style="text-align: left;">
<b>Excel Reports Dependencies</b><span style="font-weight: normal;">:</span></h3>
<div>
<br /></div>
The ATU Reporter requires the following libraries to be available in the build path for generating Excel reports.<br />
<div>
<br /></div>
<div>
The two main libraries used:<br />
<br />
<a href="http://poi.apache.org/" target="_blank">Apache POI</a> : For Generating Excel<br />
<br />
After downloading Add the following five jars in the build Path <br />
From the POI folder use the following jars<br />
<br />
1 >> poi-version.jar <br />
2 >> poi-ooxml-version.jar <br />
3 >> poi-ooxml-schemas-version.jar <br />
<br />
<br />
From the POI "ooxml-lib folder" use the following <br />
<br />
4 >> dom4j-version.jar <br />
5 >> xmlbeans-version.jar </div>
<div>
<br />
<br />
<a href="http://www.jfree.org/jfreechart/" target="_blank">JFreeChart</a>: For Generating BarChart, this chart is written to Excel<br />
<br />
Two jars are required<br />
1 >> jfreechart-version.jar<br />
<br />
<a href="http://www.jfree.org/jcommon/" target="_blank">JFreeChart JCommon:</a><br />
<br />
2 >> jcommon-version.jar<br />
<br />
<br /></div>
<div>
All the above jars are required for generating Excel Reports.</div>
</div>
Automation Testerhttp://www.blogger.com/profile/15092944995388094312noreply@blogger.com57tag:blogger.com,1999:blog-8053515261740493219.post-50811062655874271902014-03-01T03:27:00.000-08:002014-06-16T10:24:17.518-07:00How to record selenium test execution?<div dir="ltr" style="text-align: left;" trbidi="on">
Ever wanted to record your test execution so that you can check where exactly it took the wrong turn? <br />
<br />
We have something for you. Try our test recorder. It records the test execution test case wise and stores in ".mov" files.<br />
<br />
<br />
<br />
<b>Where can you get the test recorder?</b><br />
Ans: You can find the jar <a href="https://drive.google.com/folderview?id=0B7rZvkq9tkwPRy1HLVJCdWtNekE&usp=sharing" target="_blank">here : Stable version: v2.1</a><br />
<br />
<br />
<br />
<b>What additional work you have to do for this?</b><br />
Ans: You just have to add 3 lines of code for<br />
<ol><ol>
<li>Setting up a recorder</li>
<li>Starting the recorder</li>
<li>Stopping the recorder</li>
</ol>
</ol>
And its done.<br />
<br />
<br />
<b>Example:</b><br />
<span style="font-size: x-small;"></span><br />
<span style="font-size: x-small;"></span><br />
<span style="font-size: x-small;"></span><br />
<div align="LEFT">
<span style="font-size: x-small;"><span style="background-color: yellow; font-size: small;"><i>ATUTestRecorder recorder = <b><span style="color: #7f0055;">new</span></b> ATUTestRecorder("Directory",<span style="color: #2a00ff;"><span style="color: #2a00ff;">"filename"</span></span>,<b><span style="color: #7f0055;"><span style="color: #7f0055;">false</span></span></b><span style="color: #7f0055;"><span style="color: #7f0055;"></span></span>);</i></span></span></div>
<span style="font-size: x-small;">
</span>
<span style="background-color: yellow;"><i>recorder.start();</i></span><i> </i><br />
<i>WebDriver browser = <b><span style="color: #7f0055;"><span style="color: #7f0055;">new</span></span></b><span style="color: #7f0055;"><span style="color: #7f0055;"></span></span> FirefoxDriver();</i><br />
<div align="LEFT">
<i>browser.navigate().to(<span style="color: #2a00ff;"><span style="color: #2a00ff;"><a href="http://www.w3schools.com/ajax/ajax_database.asp">"http://www.w3schools.com/ajax/ajax_database.asp</a>"</span></span>);</i><br />
<i>browser.manage().window().maximize(); </i><span style="font-size: x-small;"><span style="font-size: x-small;"><span style="font-size: small;"> </span></span></span></div>
<span style="font-size: x-small;"><span style="font-size: x-small;"><span style="font-size: small;">
</span></span></span><span style="font-size: x-small;"><span style="font-size: x-small;"><i><span style="font-size: small;">browser.quit();</span></i></span></span><br />
<span style="font-size: x-small;"><span style="font-size: x-small;">
<span style="font-size: small;">
</span></span></span><span style="font-size: x-small;"><span style="font-size: x-small;"><span style="background-color: yellow; font-size: small;"><i>recorder.stop();</i></span></span></span><br />
<span style="font-size: x-small;"><span style="font-size: x-small;">
</span></span>
<br />
<div align="LEFT">
</div>
<span style="font-size: x-small;">
</span>
<br />
<div align="LEFT">
</div>
<span style="font-size: x-small;">
</span>
<br />
<div align="LEFT">
You have options to set some specific name to the recording file and to enable/disable audio recording. These options can be set while creating instance of TestRecorder class.</div>
<div align="LEFT">
</div>
<div align="LEFT">
<br />
#Happy Recording</div>
<div align="LEFT">
-AT</div>
</div>
Automation Testerhttp://www.blogger.com/profile/15092944995388094312noreply@blogger.com49tag:blogger.com,1999:blog-8053515261740493219.post-37199669325797548342014-02-04T20:04:00.000-08:002014-05-26T01:58:40.605-07:00ATU Reporter Part 4<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<h3 style="text-align: left;">
Customizing the Reports:</h3>
This Section describes how to modify some parts of the Reports as per the user requirement. This is supported from version 3.0 or above.<br />
<br />
<h3 style="text-align: left;">
<b><u>Version 3.0</u> :</b></h3>
Following are the customization's that you can do with the reports.<br />
<br />
<div style="text-align: left;">
</div>
<ul style="text-align: left;">
<li>Set a Title of the Project in the Reports Header Section.</li>
<li>Add a logo of your choice that will appear at the right side of the header section</li>
<li>Log reports of your choice: </li>
</ul>
Ex: ATUReports.add("<a href=\"#\">My Logs using ATU Reporter</a>", true);<br />
or<br />
Reporter.log("<a href=\"#\">My Logs using TestNG Reporter</a>");<br />
These reports will appear in the test case report as a link.<br />
<ul style="text-align: left;">
<li>Change the directory of the Reports folder (Name of the folder will be user's choice)</li>
<li>Description of the Project on Index page</li>
</ul>
<div>
<br /></div>
<div>
The customization's are pulled from an external properties file having key value pairs. The property file keys would be as follows.</div>
<div>
<br /></div>
<br />
#change results directory<br />
<div>
<b>atu.reports.dir</b>=D:/ATU Reporter<br />
<br />
#change header text</div>
<div>
<div>
<b>atu.proj.header.text</b>=My Proj Reports<br />
<br />
#add project/client logo, the image is copied to "HTML_Design_Files/IMG" directory</div>
<div>
<b>atu.proj.header.logo</b>=D:/google.png<br />
<br />
<br />
#specify your project description</div>
<div>
<b>atu.proj.description</b>=MyProject Testing Reports<br />
<br />
<br />
<h3 style="text-align: left;">
<b><u>Version 4.0</u> :</b></h3>
Following are the customization's that you can do with the reports.<br />
<br />
#An option for the user to set whether screenshots should be taken or not regardless of what the user has logged in the script. Setting false for taking screenshots results in faster execution time. This option is best suitable when you use HtmlUnitDriver<br />
<b>atu.reports.takescreenshot</b>=false<br />
<br />
#User has the option to choose whether configuration reports should be generated or not<br />
<b>atu.reports.configurationreports</b>=false<br />
<br />
<br />
<br />
#generate excel reports - the first preview of excel reports - with noticeable limitations<br />
#excel reports rely on external libraries - Visit <a href="http://automationtestingutilities.blogspot.in/2014/03/ATUReporterPart5.html" target="_blank">ATU Reporter Part 5</a> Post for External Dependencies - These are required<br />
<b>atu.reports.excel</b>=true<br />
<br />
#generate pdf reports, not yet implemented<br />
<b>atu.reports.pdf</b>=false</div>
</div>
<div>
<br /></div>
<div>
<br />
Once the properties file has been defined. you have to set a System property that will point to the properties file. This property must be defined within a static block in the Test Script as shown below <br />
Ex:<br />
<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: #646464; font-family: Consolas; font-size: 10.0pt;">@Listeners</span><span style="font-family: Consolas; font-size: 10pt;">({
ATUReportsListener.</span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">class</span></b><span style="font-family: Consolas; font-size: 10pt;">, ConfigurationListener.</span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">class</span></b><span style="font-family: Consolas; font-size: 10pt;">,</span><span style="font-family: Consolas; font-size: 10.0pt;"> MethodListener.<b><span style="color: #7f0055;">class</span></b> })<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">public</span></b><span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">class</span></b><span style="font-family: Consolas; font-size: 10pt;"> SampleScript {</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> {</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> System.<i>setProperty</i>(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10.0pt;">"atu.reporter.config"</span><span style="font-family: Consolas; font-size: 10pt;">, </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10.0pt;">"D:\\atu.properties"</span><span style="font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> }</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: #646464; font-family: Consolas; font-size: 10.0pt;">@Test</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">public</span></b><span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">void</span></b><span style="font-family: Consolas; font-size: 10pt;"> loginTest() {</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: Consolas; font-size: 10.0pt;">// Code..</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> }</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<br />
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in; text-align: justify; text-justify: inter-ideograph;">
<span style="font-family: Consolas; font-size: 10pt; line-height: 115%;">}</span><span style="font-size: 12.0pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><o:p></o:p></span></div>
<br />
<br />
<h3>
<b><u>Version 4.5</u> :</b></h3>
Following are the customization's that you can do with the reports<br />
<br />
<ul style="text-align: left;">
<li>Set the Test case Requirement coverage description using below code, this snippet must be called within a test method</li>
</ul>
<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: #646464; font-family: Consolas; font-size: 10.0pt;"> @Test</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;"> public</span></b><span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">void</span></b><span style="font-family: Consolas; font-size: 10pt;"> login() {</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> ATUReports.<i>setTestCaseReqCoverage</i>(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10.0pt;">"This test is
mapped to Login Requirement TC_001"</span><span style="font-family: Consolas; font-size: 10pt;">);<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> //..<o:p></o:p></span></div>
<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> }</span></div>
<ul style="text-align: left;">
<li>Set the Current run description using below code, this declaration can be done in any block</li>
</ul>
<br />
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 10pt; line-height: 115%;"> ATUReports.</span><i><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt; line-height: 115%;">currentRunDescription</span></i><span style="font-family: Consolas; font-size: 10pt; line-height: 115%;"> = </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10.0pt; line-height: 115%;">"This
is a Test Run"</span><span style="font-family: Consolas; font-size: 10pt; line-height: 115%;">;</span></div>
<div class="MsoNormal">
</div>
<ul style="text-align: left;">
<li>Filter the test case in Current Run Page</li>
</ul>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0HF-TvaWBD0kN5E8aiKv77OGDfOiqP0DB5afXNo3w0NWukvT70eQjR7sg2YLD0kXOw0PbheUDl4P7PNoC6WrBNZBStvOLmmsBhHZRwLkG589KS9mLF5rfuFzETjOihrZQcFouIPcSThQ/s1600/Untitled.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0HF-TvaWBD0kN5E8aiKv77OGDfOiqP0DB5afXNo3w0NWukvT70eQjR7sg2YLD0kXOw0PbheUDl4P7PNoC6WrBNZBStvOLmmsBhHZRwLkG589KS9mLF5rfuFzETjOihrZQcFouIPcSThQ/s1600/Untitled.png" height="90" width="320" /></a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<h3>
<b><u>Version 5.0</u> :</b></h3>
<br />
<ul style="text-align: left;">
<li>Log a step as failed (using LogAs parameter). you can continue execution of the remaining steps using this property</li>
</ul>
<br />
<b> atu.reports.continueExecutionAfterStepFailed</b> = false<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_KBB6hNk3sZKEvsaDdgKcw62OYIhxkQk5-CGXQPQwAlSsoupoFZgP55qgqsJ-9tV62fjGnuveCa5-owodcFdM343h453XOFQzO2Kgei-CAvW4Ij7PYfTon6vlZChduD73upnxGYuVvuo/s1600/logas.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_KBB6hNk3sZKEvsaDdgKcw62OYIhxkQk5-CGXQPQwAlSsoupoFZgP55qgqsJ-9tV62fjGnuveCa5-owodcFdM343h453XOFQzO2Kgei-CAvW4Ij7PYfTon6vlZChduD73upnxGYuVvuo/s1600/logas.PNG" height="133" width="320" /></a></div>
<br />
<br />
<ul style="text-align: left;">
<li>Record test execution - complete suite </li>
</ul>
<div>
<b> atu.reports.recordExecution</b>=suite<br />
Note: Add <a href="http://automationtestingutilities.blogspot.in/2014/03/how-to-record-selenium-test-execution.html" target="_blank">"<b>Test Execution Recorder</b>"</a> library to your class-path to record the execution. This is tested with VLC Player (The VLC plug-in must be enabled in the browser to play the video)</div>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7_8Wnh3jaUFvECoJLK66_W8EIlEFxdcMxOJsH0tinxv0dnscsd7VitpjzOYnRegZQfoizTFD2YI3lQ_WhlYqQX_mTYqQTgXedCs1AcgOiqFQpEg6KBJAeBcBatSKhvmWPCOvvAGnsoio/s1600/video.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7_8Wnh3jaUFvECoJLK66_W8EIlEFxdcMxOJsH0tinxv0dnscsd7VitpjzOYnRegZQfoizTFD2YI3lQ_WhlYqQX_mTYqQTgXedCs1AcgOiqFQpEg6KBJAeBcBatSKhvmWPCOvvAGnsoio/s1600/video.PNG" height="202" width="320" /></a></div>
<br />
Once the above declaration is done, the ATUReporter will pick the defined properties from the file.<br />
If there are multiple script files, then the above declaration can be done in any one of the Script.<br />
<br />
<br /></div>
<div>
We will be happy to hear your requests for new features. Let us know if any customizations are needed, we will check the feasibility and possibly implement that in the upcoming versions :). Any bugs you encounter, you can report us, we are always here, committed in resolving the bugs :)</div>
<div>
<br /></div>
<div>
<br /></div>
</div>
Automation Testerhttp://www.blogger.com/profile/15092944995388094312noreply@blogger.com116tag:blogger.com,1999:blog-8053515261740493219.post-87698506021925817282013-12-31T08:51:00.003-08:002014-04-19T23:30:39.439-07:00Handling Windows Dialogs Using Selenium Part 3<div dir="ltr" style="text-align: left;" trbidi="on">
<h3 style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; margin: 0px; position: relative;">
<b style="line-height: 18px;"><span style="font-family: 'Times New Roman', serif; font-size: medium;">Upcoming Realeases and Features</span></b></h3>
<div>
<div class="MsoNormal">
<div style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">
<b><span style="font-family: 'Times New Roman', serif; font-size: medium;"><br /></span></b></div>
<h4 style="text-align: left;">
Upcoming version : ATU Selenium Utility API v3.0</h4>
<h2 style="background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 11px; margin: 0px 0px 1em; position: relative;">
<span style="color: #222222; font-family: 'Times New Roman', serif; font-size: 16px; line-height: 18px;">***************************************************************</span></h2>
<div>
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">Features include:</span></div>
<div>
<ul style="text-align: left;">
<li>Identify the browsers installed in the System</li>
<li>Few more methods for identifying an Object</li>
<li>New API methods for working with Window Elements </li>
<li>Robot keys typing feature</li>
<li>Closing Processes</li>
<li>Start an application </li>
<li>Minor improvements</li>
</ul>
</div>
<h4 style="text-align: left;">
</h4>
<h4 style="text-align: left;">
Current and Stable : ATU Selenium Utility API v2.0</h4>
<h2 style="background-color: white; color: black; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 11px; line-height: normal; margin: 0px 0px 1em; position: relative;">
<span style="color: #222222; font-family: 'Times New Roman', serif; font-size: 16px; line-height: 18px;">***************************************************************</span></h2>
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">
Features include:</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">
<ul style="line-height: 1.4; margin: 0.5em 0px; padding: 0px 2.5em;">
<li style="margin: 0px 0px 0.25em; padding: 0px;">Ability to handle windows os level dialogs such as, Downloading, Uploading, Windows Authentication and other modal dialogs.</li>
</ul>
</div>
<div class="MsoNormal">
<h2 style="background-color: white; color: black; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 11px; line-height: normal; margin: 0px 0px 1em; position: relative;">
<span style="color: #222222; font-size: 13px; line-height: 18px;"><br /></span></h2>
<h4 style="text-align: left;">
ATU Selenium Utility API v1.0</h4>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">
<span style="font-family: 'Times New Roman', serif; font-size: 12pt;">***************************************************************</span></div>
<div style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">
Features include:</div>
<ul style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 1.4; margin: 0.5em 0px; padding: 0px 2.5em;">
<li style="margin: 0px 0px 0.25em; padding: 0px;">The WebTable API: using this api you can work with HTML table without using XPATH or ID or any other attribute. you can simply use indexes for identifying a particular row and column.</li>
</ul>
</div>
</div>
</div>
Automation Testerhttp://www.blogger.com/profile/15092944995388094312noreply@blogger.com6tag:blogger.com,1999:blog-8053515261740493219.post-83601508026398736072013-12-31T08:44:00.001-08:002014-05-06T08:21:29.482-07:00Handling Windows Dialogs Using Selenium Part 2<div dir="ltr" style="text-align: left;" trbidi="on">
In order to identify the Window Object properties, we use a tool provided by Microsoft called <b>UISpy</b>.<br />
<a href="https://docs.google.com/file/d/0B7rZvkq9tkwPY0RLWnNuYVV6YVU/edit?usp=sharing" target="_blank">Download UISpy from here</a><br />
<br />
When you run this tool, you can view all the windows objects along with their properties.<br />
<br />
The following image shows the Properties for "RUN" dialog box.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxq4hgYsXWu5JrAGSzoAkrhJV059Z-d7Qqij-wlmG9iTogxcK71tcBmIkzEgBoBPeLKUYCUOCioWkOVFptHXDf4QCKu05kU3Al_3kjNr4lFOalg6hLnOX_ZMeOhmtD8rPqUTFRLzDkG6k/s1600/example.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxq4hgYsXWu5JrAGSzoAkrhJV059Z-d7Qqij-wlmG9iTogxcK71tcBmIkzEgBoBPeLKUYCUOCioWkOVFptHXDf4QCKu05kU3Al_3kjNr4lFOalg6hLnOX_ZMeOhmtD8rPqUTFRLzDkG6k/s1600/example.jpg" height="296" width="320" /></a></div>
<br />
<br />
<br />
<br />
From the above image, we can see the list of identification properties (Highlighted in red) for the Edit Box. We use some of this Properties to Identify an Object.<br />
<br />
<br />
<b><u>Note:</u></b><br />
<b><u><br /></u></b><b><u><br /></u></b><span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">Add the </span><b style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">jacob-(version-bit-type).dll</b><span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;"> file in your project Root Directory.</span><br />
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">or</span><br />
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">Place it in any directory and use the below code to load the DLL file.</span><br />
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;"><br /></span><span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">for 32 Bit : </span><span style="background-color: #f9f9f9; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12px; line-height: 16px; text-align: justify;">jacob-version-x86.dll</span><br />
<span style="background-color: #f9f9f9; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12px; line-height: 16px; text-align: justify;">for 64 Bit : </span><span style="background-color: #f9f9f9; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12px; line-height: 16px; text-align: justify;">jacob-version-x64.dll</span><br />
<br />
Ex:<br />
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;">System.<i>setProperty</i>(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"jacob.dll.path"</span><span style="font-family: Consolas; font-size: 10pt;">, </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"D:\\jacob-1.17-M2-x86.dll"</span><span style="font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10pt;"><o:p></o:p></span></div>
<br style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;" />
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; margin-bottom: 0in;">
<span style="font-family: Consolas; font-size: 10pt; line-height: 14px;">LibraryLoader.<i>loadJacobLibrary</i>(); </span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; margin-bottom: 0in;">
<span style="font-family: Consolas; font-size: 10pt; line-height: 14px;"><br /></span></div>
<div class="MsoNormal" style="background-color: white; margin-bottom: 0in;">
<span style="font-family: Consolas;"><span style="color: #222222; font-size: x-small;"><span style="line-height: 14px;">After the above code, you can test the following snippets.</span></span></span></div>
<b><br /></b><b>Sample Code To Test Run Window:</b><br />
<br />
<b></b><br />
<b></b><br />
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">public</span><span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">static</span><span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">void</span><span style="color: black; font-family: Consolas; font-size: 10pt;"> testRUN() </span><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">throws</span><span style="color: black; font-family: Consolas; font-size: 10pt;"> AWTException, WindowsHandlerException {</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<b><span style="font-weight: normal;"></span></b><br />
<div class="MsoNormal" style="margin-bottom: 0in;">
<b><span style="font-weight: normal;"><span style="color: black; font-family: Consolas; font-size: 10pt;"> WindowHandler handler = </span><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">new</span><span style="color: black; font-family: Consolas; font-size: 10pt;"> WindowHandler();</span><span style="font-family: Consolas; font-size: 10pt;"></span></span></b></div>
<b><span style="font-weight: normal;"></span></b><br />
<div class="MsoNormal" style="margin-bottom: 0in;">
<b><span style="font-weight: normal;"><span style="color: black; font-family: Consolas; font-size: 10pt;"> WindowElement runWindowElement = handler.getWindowElement(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"Run"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10pt;"></span></span></b></div>
<b><span style="font-weight: normal;"></span></b><br />
<div class="MsoNormal" style="margin-bottom: 0in;">
<b><span style="font-weight: normal;"><span style="color: black; font-family: Consolas; font-size: 10pt;"> WindowElement textBoxElement = handler.findElementByClassName(</span><span style="font-family: Consolas; font-size: 10pt;"></span></span></b></div>
<b><span style="font-weight: normal;"></span></b><br />
<div class="MsoNormal" style="margin-bottom: 0in;">
<b><span style="font-weight: normal;"><span style="color: black; font-family: Consolas; font-size: 10pt;"> runWindowElement, </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"Edit"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10pt;"></span></span></b></div>
<b><span style="font-weight: normal;"></span></b><br />
<div class="MsoNormal" style="margin-bottom: 0in;">
<b><span style="font-weight: normal;"><span style="color: black; font-family: Consolas; font-size: 10pt;"> handler.clearText(textBoxElement);</span><span style="font-family: Consolas; font-size: 10pt;"></span></span></b></div>
<b><span style="font-weight: normal;"></span></b><br />
<div class="MsoNormal" style="margin-bottom: 0in;">
<b><span style="font-weight: normal;"><span style="color: black; font-family: Consolas; font-size: 10pt;"> handler.typeKeys(textBoxElement, </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"notepad"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10pt;"></span></span></b></div>
<b><span style="font-weight: normal;"></span></b><br />
<div class="MsoNormal" style="margin-bottom: 0in;">
<b><span style="font-weight: normal;"><span style="color: black; font-family: Consolas; font-size: 10pt;"> WindowElement okButton = handler.findElementByName(runWindowElement,</span><span style="font-family: Consolas; font-size: 10pt;"></span></span></b></div>
<b><span style="font-weight: normal;"></span></b><br />
<div class="MsoNormal" style="margin-bottom: 0in;">
<b><span style="font-weight: normal;"><span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"OK"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10pt;"></span></span></b></div>
<b><span style="font-weight: normal;"></span></b><br />
<div class="MsoNormal" style="margin-bottom: 0in;">
<b><span style="font-weight: normal;"><span style="color: black; font-family: Consolas; font-size: 10pt;"> handler.click(okButton);</span><span style="font-family: Consolas; font-size: 10pt;"></span></span></b></div>
<b><span style="font-weight: normal;"></span></b><br />
<div class="MsoNormal" style="margin-bottom: 0in;">
<b><span style="font-weight: normal;"><span style="color: black; font-family: Consolas; font-size: 10pt;"> }</span></span><span style="font-family: Consolas; font-size: 10pt;"></span></b></div>
<br />
<b>The below are the various methods provided by the API to identify an Object.</b><br />
<ol>
<li><code><b>findElementByName</b></code></li>
<li><code><b>findElementByClassName</b></code></li>
<li><code><b>findElementByNameAndClassName</b></code></li>
<li><code><b><code><b>findElementByAutomationID</b></code> </b></code></li>
<li><code><b>findElementByLocalizedControlType</b></code></li>
<li><code><b><code><b>findElementByNameAndLocalizedControlType</b></code> </b></code></li>
</ol>
<br />
<b>Sample Code for Downloading a file in Firefox:</b><br />
<br />
<br />
<br />
<div class="MsoNormal" style="margin-bottom: 0in;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">public</span></b><span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">static</span></b><span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">void</span></b><span style="color: black; font-family: Consolas; font-size: 10pt;"> testDownloadFirefox() </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">throws</span></b><span style="color: black; font-family: Consolas; font-size: 10pt;"> WindowsHandlerException, InterruptedException {</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><i><span style="color: #0000c0; font-family: Consolas; font-size: 10pt;">driver</span></i><span style="color: black; font-family: Consolas; font-size: 10pt;">.get(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"http://www.zkoss.org/zkdemo/file_handling/file_download"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><i><span style="color: #0000c0; font-family: Consolas; font-size: 10pt;">driver</span></i><span style="color: black; font-family: Consolas; font-size: 10pt;">.findElement(</span><span style="font-family: Consolas; font-size: 10pt;"></span><span style="color: black; font-family: Consolas; font-size: 10pt;">By.<i>xpath</i>(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"/html/body/div[2]/div[2]/div/div[2]/table/tbody/tr/td[2] /div[2]/div/div[2]/div/div/div/div/div[2]/span/table/tbody/tr[2]/td[2]"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">))</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> .click();</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> Thread.<i>sleep</i>(3000);</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> WindowHandler handler = </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">new</span></b><span style="color: black; font-family: Consolas; font-size: 10pt;"> WindowHandler();</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> WindowElement firefoxElement = handler</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> .getWindowElement(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"ZK Live Demo - File Download - Mozilla Firefox"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> WindowElement downloadElement = handler.findElementByClassName(</span><span style="font-family: Consolas; font-size: 10pt;"></span><span style="color: black; font-family: Consolas; font-size: 10pt;">firefoxElement, </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"MozillaDialogClass"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> WindowElement saveRadioButton = handler.findElementByName(</span><span style="font-family: Consolas; font-size: 10pt;"></span><span style="color: black; font-family: Consolas; font-size: 10pt;">downloadElement, </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"Save File"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10pt;"></span> </div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> handler.click(saveRadioButton);</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> WindowElement okButton = handler.findElementByName(downloadElement,</span><span style="font-family: Consolas; font-size: 10pt;"></span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"OK"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">);</span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> handler.click(<u>okButton</u>);</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<span style="color: black; font-family: Consolas; font-size: 10pt; line-height: 14px;">}</span><br />
<br />
<br />
<b>Sample Code for Uploading a file in Firefox:</b><br />
<br />
<br />
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"></span><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">public</span><span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">static</span><span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">void</span><span style="color: black; font-family: Consolas; font-size: 10pt;"> testUploadFileFirefox() </span><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">throws</span><span style="color: black; font-family: Consolas; font-size: 10pt;"> AWTException,</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> WindowsHandlerException, InterruptedException {</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><i><span style="color: #0000c0; font-family: Consolas; font-size: 10pt;">driver</span></i><span style="color: black; font-family: Consolas; font-size: 10pt;">.get(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"http://cgi-lib.berkeley.edu/ex/fup.html"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><i><span style="color: #0000c0; font-family: Consolas; font-size: 10pt;">driver</span></i><span style="color: black; font-family: Consolas; font-size: 10pt;">.findElement(By.<i>xpath</i>(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"/html/body/form/input"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">)).click();</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> Thread.<i>sleep</i>(3000);</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> WindowHandler handler = </span><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">new</span><span style="color: black; font-family: Consolas; font-size: 10pt;"> WindowHandler();</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> WindowElement firefoxElement = handler</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> .getWindowElement(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"Sample File Upload Form - Mozilla Firefox"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> WindowElement uploadElement = handler.findElementByName(firefoxElement,</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"File Upload"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> WindowElement fileNamePath = handler.findElementByNameAndClassName(</span><span style="font-family: Consolas; font-size: 10pt;"></span><span style="color: black; font-family: Consolas; font-size: 10pt;">uploadElement, </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"File name:"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">, </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"Edit"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> handler.typeKeys(fileNamePath, System.<i>getProperty</i>(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"user.dir"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">)</span><span style="font-family: Consolas; font-size: 10pt;"></span><span style="color: black; font-family: Consolas; font-size: 10pt;">+ </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"\\sample.txt"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> WindowElement openButton = handler.findElementByName(uploadElement,</span><span style="font-family: Consolas; font-size: 10pt;"></span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"Open"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> handler.click(openButton);</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal">
<span style="color: black; font-family: Consolas; font-size: 10pt; line-height: 14px;"> }</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<b>Sample Code for Handling Authentication in Firefox - <i>Tomcat Authentication</i>:</b><br />
<br />
<div class="MsoNormal" style="margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">public</span></b><span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">static</span></b><span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">void</span></b><span style="color: black; font-family: Consolas; font-size: 10pt;"> testTomcatAuthenticationInFirefox()</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">throws</span></b><span style="color: black; font-family: Consolas; font-size: 10pt;"> WindowsHandlerException, AWTException, InterruptedException {</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><i><span style="color: #0000c0; font-family: Consolas; font-size: 10pt;">driver</span></i><span style="color: black; font-family: Consolas; font-size: 10pt;">.get(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"http://localhost:8080/"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><i><span style="color: #0000c0; font-family: Consolas; font-size: 10pt;">driver</span></i><span style="color: black; font-family: Consolas; font-size: 10pt;">.findElement(</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> By.<i>xpath</i>(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"/html/body/div/div[3]/div[3]/div[2]/a/span"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">)).click();</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> Thread.<i>sleep</i>(3000);</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> WindowHandler handler = </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">new</span></b><span style="color: black; font-family: Consolas; font-size: 10pt;"> WindowHandler();</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> WindowElement firefoxWindowElement = handler</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> .getWindowElement(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"Apache Tomcat/7.0.42 - Mozilla Firefox"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> WindowElement authenticationElement = handler.findElementByName(</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> firefoxWindowElement, </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"Authentication Required"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> WindowElement userNameElement = handler</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> .findElementByNameAndLocalizedControlType(</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> authenticationElement, </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"User Name:"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">, </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"edit"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> handler.typeKeys(userNameElement, </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"admin"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> WindowElement passwordElement = handler</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> .findElementByNameAndLocalizedControlType(</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> authenticationElement, </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"Password:"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">, </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"edit"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> handler.typeKeys(passwordElement, </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"admin"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> WindowElement okButton = handler.findElementByName(</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> authenticationElement, </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"OK"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> handler.click(okButton);</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> }</span></div>
<br />
<br />
<h3 style="text-align: left;">
<b>Using Java Threads:</b></h3>
<b><br /></b>The above examples works fine for downloading, uploading and windows authentication.<br />
<br />
This section describes windows authentication when you encounter a Authentication Dialog Box as soon as you open the Browser using selenium. In this kind of scenarios, selenium does not execute further steps unless the Authentication Dialog box is closed. which means if you write the Windows handler Code after the browser has opened, the Windows Handler Login code will not execute.<br />
<br />
<br />
<br />
<div class="MsoNormal" style="margin-bottom: 0in; text-indent: 0.5in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;">WebDriver driver = </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10pt;">new</span></b><span style="color: black; font-family: "Courier New"; font-size: 10pt;"> FirefoxDriver();</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> driver.get(</span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 10pt;">"url"</span><span style="color: black; font-family: "Courier New"; font-size: 10pt;">);</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: "Courier New"; font-size: 10pt;">// Following code Wont Execute if Windows Authentication Dialog is </span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: #3f7f5f; font-family: "Courier New"; font-size: 10pt;"> // Opened</span><span style="font-family: "Courier New"; font-size: 10pt;"></span><span style="color: black; font-family: "Courier New"; font-size: 10pt;"></span><span style="color: #3f7f5f; font-family: "Courier New"; font-size: 10pt;"> right after driver.get("<u>url</u>") is called</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> WindowHandler <u>handler</u> = </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10pt;">new</span></b><span style="color: black; font-family: "Courier New"; font-size: 10pt;"> WindowHandler();</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: "Courier New"; font-size: 10pt;">// <u>Develop</u> Code For Handling the Dialog Box</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: "Courier New"; font-size: 10pt;">// further test code follows</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal">
<span style="color: black; font-family: "Courier New"; font-size: 10pt; line-height: 14px;"> </span><span style="color: #3f7f5f; font-family: "Courier New"; font-size: 10pt; line-height: 14px;">//driver.findElement ...</span></div>
<br />
<br />
<br />
To Handle this kind of scenarios. We use Java Threads to perform Windows Authentication using a separate Thread.<br />
<br />
<br />
<br />
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: #3f7f5f; font-family: "Courier New"; font-size: 10pt;">// Define a Separate Thread class that will wait for Certain amount of time for // the Login</span><span style="font-family: "Courier New"; font-size: 10pt;"></span><span style="color: #3f7f5f; font-family: "Courier New"; font-size: 10pt;"> Dialog Box to appear and then Window <u>Hanlder</u> Code will execute</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10pt;">public</span></b><span style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10pt;">class</span></b><span style="color: black; font-family: "Courier New"; font-size: 10pt;"> Authenticator </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10pt;">extends</span></b><span style="color: black; font-family: "Courier New"; font-size: 10pt;"> Thread {</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><span style="color: #646464; font-family: "Courier New"; font-size: 10pt;">@Override</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10pt;">public</span></b><span style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10pt;">void</span></b><span style="color: black; font-family: "Courier New"; font-size: 10pt;"> run() {</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10pt;">try</span></b><span style="color: black; font-family: "Courier New"; font-size: 10pt;"> {</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> Thread.<i>sleep</i>(5000);</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> WindowHandler <u>handler</u> = </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10pt;">new</span></b><span style="color: black; font-family: "Courier New"; font-size: 10pt;"> WindowHandler();</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: "Courier New"; font-size: 10pt;">// Develop Code For Handling the Dialog Box</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> } </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10pt;">catch</span></b><span style="color: black; font-family: "Courier New"; font-size: 10pt;"> (WindowsHandlerException e) {</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> e.printStackTrace();</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> } </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10pt;">catch</span></b><span style="color: black; font-family: "Courier New"; font-size: 10pt;"> (InterruptedException e) {</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> e.printStackTrace();</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> }</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> }</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal">
<span style="color: black; font-family: "Courier New"; font-size: 10pt; line-height: 14px;">}</span></div>
<br />
<br />
In our Selenium Test Class we call the Thread as follows<br />
<br />
<br />
<br />
<div class="MsoNormal" style="margin-bottom: 0in; text-indent: 0.5in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;">WebDriver driver = </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10pt;">new</span></b><span style="color: black; font-family: "Courier New"; font-size: 10pt;"> FirefoxDriver();</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: "Courier New"; font-size: 10pt;">// We Start the Thread before driver.get() method</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: "Courier New"; font-size: 10pt;">// so that the Thread can execute in parallel, once the Window</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: "Courier New"; font-size: 10pt;">// Authentication Dialog is opened</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: "Courier New"; font-size: 10pt;">// The Window Handler Code Executes</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> Authenticator authenticator = </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10pt;">new</span></b><span style="color: black; font-family: "Courier New"; font-size: 10pt;"> Authenticator();</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> authenticator.start();</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> driver.get(</span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 10pt;">"url"</span><span style="color: black; font-family: "Courier New"; font-size: 10pt;">);</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: "Courier New"; font-size: 10pt;">// further test code follows</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal">
<span style="color: black; font-family: "Courier New"; font-size: 10pt; line-height: 14px;"> </span><span style="color: #3f7f5f; font-family: "Courier New"; font-size: 10pt; line-height: 14px;">// driver.findElement ...</span><br />
<div>
<span style="color: #3f7f5f; font-family: "Courier New"; font-size: 10pt; line-height: 14px;"><br /></span>
<span style="color: #3f7f5f; font-family: "Courier New"; font-size: 10pt; line-height: 14px;"><br /></span>
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">Go To: </span><a href="http://automationtestingutilities.blogspot.in/2013/12/HandlingWindowsDialogsUsingSeleniumPart3.html" style="background-color: white; color: #3d85c6; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-decoration: none;" target="_blank">Handling Windows Dialogs Using Selenium Part 3</a><span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;"> - </span><i style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">Contains Details regarding Upcoming Releases and Features</i></div>
</div>
</div>
Automation Testerhttp://www.blogger.com/profile/15092944995388094312noreply@blogger.com38tag:blogger.com,1999:blog-8053515261740493219.post-11352517178059479782013-12-31T08:43:00.001-08:002014-01-11T20:27:47.259-08:00Handling Windows Dialogs Using Selenium Part 1<div dir="ltr" style="text-align: left;" trbidi="on">
<b>The API</b>:<br />
<br />
The API is small and simple. It contains two Classes that will do the work for us. :)<br />
<br />
<i>Introducing the two imp Classes,</i><br />
<br />
<b>WindowHandler - </b>Responsible for all the operations on Window Objects<br />
<b>WindowElement - </b>Represents an Element (Object) in/or a Window<br />
<br />
The API uses JACOB to communicate with a DLL component called <b>ATU_WindowsHandler.dll</b> (Developed as a part of Project) which communicates with the windows objects for performing automation <i>.</i><br />
<br />
The DLL requires Microsoft .NET v4 to be installed in the machine. <a href="http://www.microsoft.com/en-in/download/details.aspx?id=17718" target="_blank">Download .NET v4 From Here</a><br />
After installing the .NET Framework, follow the below steps for registering the DLL.<br />
<br />
<ul>
<li>Open CMD prompt with Admin Rights</li>
<li>Change the directory in CMD prompt where the DLL file is present</li>
<li>Type the below cmd without quotes and hit Enter Key</li>
</ul>
<br />
If the DLL is in the C Drive then<br />
<br />
for 32 Bit (x86) OS:<br />
<br />
"<b>C:\Windows\Microsoft.NET\Framework\v4.0.30319\regasm C:\ATU_WindowsHandler.dll /codebase</b>"<br />
<br />
<br />
for 64 Bit (x64) OS:<br />
<br style="background-color: #f9f9f9; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12px; line-height: 16px; text-align: justify;" />
"<b>C:\Windows\Microsoft.NET\Framework64\v4.0.30319\regasm C:\ATU_WindowsHandler.dll /codebase</b>"<br />
<br />
<div>
<br /></div>
<span style="background-color: #f9f9f9; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12px; line-height: 16px; text-align: justify;">Notice that the path should have "Framework64" folder for 64 bit .Net reference whereas "Framework" for 32 bit.</span><br />
<br />
<br />
<br />
You should get a message as shown in the below screenshot.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDRhQMn70Jey_A4Mow3NU4F33Ddiaj14js-duQAg2yHP-NQZ3JcQYuSo9HtHKFnKxlWECnLAB2XImF3TgUBNtREQlRltBZyHtXu-UvJV2nZB0zOSgpc1TS9yg3uAx851AisZahxzEGuLs/s1600/regCMD.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDRhQMn70Jey_A4Mow3NU4F33Ddiaj14js-duQAg2yHP-NQZ3JcQYuSo9HtHKFnKxlWECnLAB2XImF3TgUBNtREQlRltBZyHtXu-UvJV2nZB0zOSgpc1TS9yg3uAx851AisZahxzEGuLs/s1600/regCMD.jpg" height="89" width="320" /></a></div>
<br />
As you can see, in my machine, the DLL file is located in "F" drive, after the CMD operation, the DLL is registered successfully.<br />
<div>
<br />
<br />
<b>Note: Sometimes, The DLL may not get registered due to security concerns</b><span style="background-color: #f9f9f9; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12px; line-height: 16px; text-align: justify;"> </span><br />
<br style="background-color: #f9f9f9; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12px; line-height: 16px; text-align: justify;" />
<span style="background-color: #f9f9f9; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12px; line-height: 16px; text-align: justify;">to resolve this, try the below approach: </span></div>
<div>
<span style="background-color: #f9f9f9; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12px; line-height: 16px; text-align: justify;"><br /></span></div>
<div>
<ul style="text-align: left;">
<li><span style="background-color: #f9f9f9; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12px; line-height: 16px; text-align: justify;">Download the ATU WindowsHandler dll zip file.</span><span style="background-color: #f9f9f9; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12px; line-height: 16px; text-align: justify;"> </span></li>
<li><span style="background-color: #f9f9f9; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12px; line-height: 16px; text-align: justify;">Right click on the zip file</span></li>
<li><span style="background-color: #f9f9f9; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12px; line-height: 16px; text-align: justify;">Click on "Properties"</span></li>
<li><span style="background-color: #f9f9f9; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12px; line-height: 16px; text-align: justify;">Click on the "Unblock" button.</span></li>
<li><span style="background-color: #f9f9f9; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12px; line-height: 16px; text-align: justify;">Click on "Apply" button</span></li>
<li><span style="background-color: #f9f9f9; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12px; line-height: 16px; text-align: justify;">Click on "OK" button</span></li>
<li><span style="background-color: #f9f9f9; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12px; line-height: 16px; text-align: justify;">Extract the zip file</span></li>
<li><span style="background-color: #f9f9f9; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12px; line-height: 16px; text-align: justify;">Register using the same command</span></li>
</ul>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAS6acm9p2RAc9iW9-LLXj7PkM62Svrm7mYQS4mSRMiv00kESAvYEBcj9YO1yEzCbwHVjaP5NaJIBNKU8Z14eh3p8kVtar8PpQwLRzEcki9Dc9FjI1eAqmcm1jQJ16EdD5yHxLX2mhAlo/s1600/Capture.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAS6acm9p2RAc9iW9-LLXj7PkM62Svrm7mYQS4mSRMiv00kESAvYEBcj9YO1yEzCbwHVjaP5NaJIBNKU8Z14eh3p8kVtar8PpQwLRzEcki9Dc9FjI1eAqmcm1jQJ16EdD5yHxLX2mhAlo/s1600/Capture.PNG" height="320" width="230" /></a></div>
<br />
<br />
After this, the DLL should get Registered.<br />
<br />
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">Go To: </span><a href="http://automationtestingutilities.blogspot.in/2013/12/HandlingWindowsDialogsUsingSeleniumPart2.html" style="background-color: white; color: #3d85c6; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-decoration: none;" target="_blank">Handling Windows Dialogs Using Selenium Part 2</a><span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;"> - </span><i style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">Contains Details regarding The usage along with Examples</i></div>
</div>
Automation Testerhttp://www.blogger.com/profile/15092944995388094312noreply@blogger.com10tag:blogger.com,1999:blog-8053515261740493219.post-68751982811240727532013-12-27T18:43:00.001-08:002013-12-27T18:50:08.713-08:00DataDrivenFramework Part 3<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: center;">
<b><span style="font-size: 16pt; line-height: 24px;">DDF Capabilities</span></b></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">
<br /></div>
<br style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;" />
<b>Current and Stable : DataDrivenFramework v1</b><br />
<span style="font-size: large;"><br style="background-color: white;" /></span><span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">This framework is developed using Java programming language hence it can be used with any Automation Tool that supports Java. </span><br />
<br style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;" />
<br style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;" />
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">Automation tools like </span><br />
<ul style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; margin: 0.5em 0px; padding: 0px 2.5em;">
<li style="margin: 0px 0px 0.25em; padding: 0px;">Selenium (Open Source)</li>
<li style="margin: 0px 0px 0.25em; padding: 0px;">IBM Rational Functional Tester (Commercial)</li>
<li style="margin: 0px 0px 0.25em; padding: 0px;">Open Script bundled along with OATS (Commercial)</li>
<li style="margin: 0px 0px 0.25em; padding: 0px;">Any Other Java Supported Automation Tool</li>
</ul>
<br style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;" />
<br style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;" />
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">Supports Data Sources which includes Flat files and Databases </span><br />
<ul style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; margin: 0.5em 0px; padding: 0px 2.5em;">
<li style="margin: 0px 0px 0.25em; padding: 0px;">Excel Files ( .xls and .xlsx) [2003 , 2007 , 2010, 2013 Editions]</li>
<li style="margin: 0px 0px 0.25em; padding: 0px;">CSV [comma separated values]</li>
<li style="margin: 0px 0px 0.25em; padding: 0px;">Oracle Database</li>
<li style="margin: 0px 0px 0.25em; padding: 0px;">MySQL Database</li>
</ul>
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">Supports storing runtime output results in Excel File: using this feature, you can backup the excel data, and write the new data to excel file.</span></div>
Automation Testerhttp://www.blogger.com/profile/15092944995388094312noreply@blogger.com8tag:blogger.com,1999:blog-8053515261740493219.post-19442908033648790252013-12-27T18:41:00.001-08:002013-12-27T18:47:37.810-08:00DataDrivenFramework Part 2<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">
<b>Examples: </b><br />
<br />
Working with Flat Files:<br />
The format for Excel Data is shown below :</div>
<div style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div class="separator" style="background-color: white; clear: both; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghm_HHHs0xHBdXUNBZO_PYMk5gdWI9z0B3wWS_2-xpqXbB4UfK9CQdRhrrCaqgZS9BAcSg_YP3NVRHLSvufxYCr1ayh7IEtWeP7xQsWvpJtLbuB8v0eoSe-SgK3amufVWe5NqCOQL-xTU/s1600/excel.png" imageanchor="1" style="color: #3d85c6; margin-left: 1em; margin-right: 1em; text-decoration: none;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghm_HHHs0xHBdXUNBZO_PYMk5gdWI9z0B3wWS_2-xpqXbB4UfK9CQdRhrrCaqgZS9BAcSg_YP3NVRHLSvufxYCr1ayh7IEtWeP7xQsWvpJtLbuB8v0eoSe-SgK3amufVWe5NqCOQL-xTU/s400/excel.png" style="-webkit-box-shadow: rgba(0, 0, 0, 0.0980392) 1px 1px 5px; border: 1px solid rgb(238, 238, 238); box-shadow: rgba(0, 0, 0, 0.0980392) 1px 1px 5px; padding: 5px; position: relative;" width="400" /></a></div>
<div style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">
<br /></div>
<br style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: center;" />
<br />
<div style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">
<br /></div>
<div style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">
</div>
<div style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">
</div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">
<span style="font-size: 12pt;">The Following Example Demonstrates how to access data from excel</span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">
<u><span style="font-size: 12pt;">Selenium Code along with TestNG Framework:</span></u></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">
<u><span style="font-size: 12pt;">For Reading Flat Files : Excel and CSV</span></u></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">package</span></b><span style="color: black; font-family: Consolas; font-size: 10pt;"> sample;</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">import</span></b><span style="color: black; font-family: Consolas; font-size: 10pt;"> java.util.Iterator;</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">import</span></b><span style="color: black; font-family: Consolas; font-size: 10pt;"> java.util.List;</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">import</span></b><span style="color: black; font-family: Consolas; font-size: 10pt;"> java.util.concurrent.TimeUnit;</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">import</span></b><span style="color: black; font-family: Consolas; font-size: 10pt;"> org.openqa.selenium.By;</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">import</span></b><span style="color: black; font-family: Consolas; font-size: 10pt;"> org.openqa.selenium.WebDriver;</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">import</span></b><span style="color: black; font-family: Consolas; font-size: 10pt;"> org.openqa.selenium.firefox.FirefoxDriver;</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">import</span></b><span style="color: black; font-family: Consolas; font-size: 10pt;"> org.testng.annotations.BeforeClass;</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">import</span></b><span style="color: black; font-family: Consolas; font-size: 10pt;"> org.testng.annotations.DataProvider;</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">import</span></b><span style="color: black; font-family: Consolas; font-size: 10pt;"> org.testng.annotations.Test;</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">import</span></b><span style="color: black; font-family: Consolas; font-size: 10pt;"> atu.ddf.exceptions.DataDrivenFrameworkException;</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">import</span></b><span style="color: black; font-family: Consolas; font-size: 10pt;"> atu.ddf.file.CSVFile;</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">import</span></b><span style="color: black; font-family: Consolas; font-size: 10pt;"> atu.ddf.file.ExcelFile;</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">import</span></b><span style="color: black; font-family: Consolas; font-size: 10pt;"> atu.ddf.selenium.SeleniumTestNGHelper;</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: #3f5fbf; font-family: Consolas; font-size: 10pt;">/**</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: #3f5fbf; font-family: Consolas; font-size: 10pt;"> *</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: #3f5fbf; font-family: Consolas; font-size: 10pt;"> * </span><b><span style="color: #7f9fbf; font-family: Consolas; font-size: 10pt;">@author</span></b><span style="color: #3f5fbf; font-family: Consolas; font-size: 10pt;"> Automation Tester http://automationtestingutilities.blogspot.in/</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: #3f5fbf; font-family: Consolas; font-size: 10pt;"> */</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">public</span></b><span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">class</span></b><span style="color: black; font-family: Consolas; font-size: 10pt;"> ReadingFromFaltFile {</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> WebDriver </span><span style="color: #0000c0; font-family: Consolas; font-size: 10pt;">driver</span><span style="color: black; font-family: Consolas; font-size: 10pt;">;</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><span style="color: #646464; font-family: Consolas; font-size: 10pt;">@BeforeClass</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">public</span></b><span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">void</span></b><span style="color: black; font-family: Consolas; font-size: 10pt;"> init() {</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><span style="color: #0000c0; font-family: Consolas; font-size: 10pt;">driver</span><span style="color: black; font-family: Consolas; font-size: 10pt;"> = </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">new</span></b><span style="color: black; font-family: Consolas; font-size: 10pt;"> FirefoxDriver();</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><span style="color: #0000c0; font-family: Consolas; font-size: 10pt;">driver</span><span style="color: black; font-family: Consolas; font-size: 10pt;">.manage().timeouts().implicitlyWait(30, TimeUnit.</span><i><span style="color: #0000c0; font-family: Consolas; font-size: 10pt;">SECONDS</span></i><span style="color: black; font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> }</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: Consolas; font-size: 10pt;">// login into WordPress web site and publish a new Post</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: Consolas; font-size: 10pt;">// Another Example of Data Driven while working with Excel files having .<u>xls</u> extension</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><span style="color: #646464; font-family: Consolas; font-size: 10pt;">@Test</span><span style="color: black; font-family: Consolas; font-size: 10pt;">(dataProvider = </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"iteratorTestData"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">)</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">public</span></b><span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">void</span></b><span style="color: black; font-family: Consolas; font-size: 10pt;"> addPost(String username, String password, String title,</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> String content) </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">throws</span></b><span style="color: black; font-family: Consolas; font-size: 10pt;"> InterruptedException {</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: Consolas; font-size: 10pt;">// Open <u>App</u></span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><span style="color: #0000c0; font-family: Consolas; font-size: 10pt;">driver</span><span style="color: black; font-family: Consolas; font-size: 10pt;">.get(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"http://demo.opensourcecms.com/wordpress/wp-login.php"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: Consolas; font-size: 10pt;">// Enter UserName</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> Thread.<i>sleep</i>(3000);</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><span style="color: #0000c0; font-family: Consolas; font-size: 10pt;">driver</span><span style="color: black; font-family: Consolas; font-size: 10pt;">.findElement(By.<i>id</i>(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"user_login"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">)).clear();</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><span style="color: #0000c0; font-family: Consolas; font-size: 10pt;">driver</span><span style="color: black; font-family: Consolas; font-size: 10pt;">.findElement(By.<i>id</i>(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"user_login"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">)).sendKeys(username);</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: Consolas; font-size: 10pt;">// Enter Password</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><span style="color: #0000c0; font-family: Consolas; font-size: 10pt;">driver</span><span style="color: black; font-family: Consolas; font-size: 10pt;">.findElement(By.<i>id</i>(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"user_pass"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">)).clear();</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><span style="color: #0000c0; font-family: Consolas; font-size: 10pt;">driver</span><span style="color: black; font-family: Consolas; font-size: 10pt;">.findElement(By.<i>id</i>(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"user_pass"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">)).sendKeys(password);</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: Consolas; font-size: 10pt;">// Click on Submit button</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><span style="color: #0000c0; font-family: Consolas; font-size: 10pt;">driver</span><span style="color: black; font-family: Consolas; font-size: 10pt;">.findElement(By.<i>id</i>(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"wp-submit"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">)).submit();</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: Consolas; font-size: 10pt;">// Enter Title</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><span style="color: #0000c0; font-family: Consolas; font-size: 10pt;">driver</span><span style="color: black; font-family: Consolas; font-size: 10pt;">.findElement(By.<i>id</i>(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"title"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">)).sendKeys(title);</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: Consolas; font-size: 10pt;">// Enter Content</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><span style="color: #0000c0; font-family: Consolas; font-size: 10pt;">driver</span><span style="color: black; font-family: Consolas; font-size: 10pt;">.findElement(By.<i>id</i>(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"content"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">)).sendKeys(content);</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: Consolas; font-size: 10pt;">// Click on Publish Button</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><span style="color: #0000c0; font-family: Consolas; font-size: 10pt;">driver</span><span style="color: black; font-family: Consolas; font-size: 10pt;">.findElement(By.<i>id</i>(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"publish"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">)).click();</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> }</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: Consolas; font-size: 10pt;">//Another Example of Data Driven Using CSV File</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><span style="color: #646464; font-family: Consolas; font-size: 10pt;">@Test</span><span style="color: black; font-family: Consolas; font-size: 10pt;">(dataProvider = </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"csvData"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">)</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">public</span></b><span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">void</span></b><span style="color: black; font-family: Consolas; font-size: 10pt;"> csvDataExample(String username, String password, String title)</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">throws</span></b><span style="color: black; font-family: Consolas; font-size: 10pt;"> InterruptedException {</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> System.</span><i><span style="color: #0000c0; font-family: Consolas; font-size: 10pt;">out</span></i><span style="color: black; font-family: Consolas; font-size: 10pt;">.println(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"Username: "</span><span style="color: black; font-family: Consolas; font-size: 10pt;"> + username + </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">": password: "</span><span style="color: black; font-family: Consolas; font-size: 10pt;"> + password</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> + </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">": title: "</span><span style="color: black; font-family: Consolas; font-size: 10pt;"> + title);</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> }</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: Consolas; font-size: 10pt;">// Another Example of Data Driven while working with Excel files having .<u>xlsx</u> extension</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><span style="color: #646464; font-family: Consolas; font-size: 10pt;">@Test</span><span style="color: black; font-family: Consolas; font-size: 10pt;">(dataProvider = </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"objectTestData"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">)</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">public</span></b><span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">void</span></b><span style="color: black; font-family: Consolas; font-size: 10pt;"> registerUser(String username, String gender, String location,</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> String language, String age, String email) {</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> System.</span><i><span style="color: #0000c0; font-family: Consolas; font-size: 10pt;">out</span></i><span style="color: black; font-family: Consolas; font-size: 10pt;">.println(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"Username: "</span><span style="color: black; font-family: Consolas; font-size: 10pt;"> + username + </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">": Gender: "</span><span style="color: black; font-family: Consolas; font-size: 10pt;"> + gender</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> + </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">": Location: "</span><span style="color: black; font-family: Consolas; font-size: 10pt;"> + location + </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">": Language: "</span><span style="color: black; font-family: Consolas; font-size: 10pt;"> + language</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> + </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">": Age: "</span><span style="color: black; font-family: Consolas; font-size: 10pt;"> + age + </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">": Email: "</span><span style="color: black; font-family: Consolas; font-size: 10pt;"> + email);</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> }</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: Consolas; font-size: 10pt;">//Example of 2-Dimensional Object Array DataProvider</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><span style="color: #646464; font-family: Consolas; font-size: 10pt;">@DataProvider</span><span style="color: black; font-family: Consolas; font-size: 10pt;">(name = </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"objectTestData"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">)</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">public</span></b><span style="color: black; font-family: Consolas; font-size: 10pt;"> Object[][] data() </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">throws</span></b><span style="color: black; font-family: Consolas; font-size: 10pt;"> DataDrivenFrameworkException {</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> String excelResource = System.<i>getProperty</i>(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"user.dir"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">)</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> + System.<i>getProperty</i>(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"file.separator"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">) + </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"resources"</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> + System.<i>getProperty</i>(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"file.separator"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">) +</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"ExcelTestData.xlsx"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">;</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: Consolas; font-size: 10pt;">// provide your excel file path here</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> ExcelFile excelFile = </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">new</span></b><span style="color: black; font-family: Consolas; font-size: 10pt;"> ExcelFile(excelResource);</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: Consolas; font-size: 10pt;">// provide the Sheet name</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> excelFile.setSheetName(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"MyScenario"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: Consolas; font-size: 10pt;">// provide the Column Name where Test Case names will be given</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> excelFile.setTestCaseHeaderName(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"TestCaseNameColumn"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: Consolas; font-size: 10pt;">// provide the Test Case Name</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> List<List<String>> data = excelFile</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> .getDataUsingTestCaseName(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"RegisterUser"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: Consolas; font-size: 10pt;">// SeleniumTestNGHelper is a utility class that will help in converting</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: Consolas; font-size: 10pt;">// the Test data into TestNG Data Provider supported format</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: Consolas; font-size: 10pt;">// One such format here is a 2-Dimensional Object Array</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">return</span></b><span style="color: black; font-family: Consolas; font-size: 10pt;"> SeleniumTestNGHelper.<i>toObjectArray</i>(data);</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> }</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: Consolas; font-size: 10pt;">//Example of DataProvider whose return type is Object Array Iterator</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><span style="color: #646464; font-family: Consolas; font-size: 10pt;">@DataProvider</span><span style="color: black; font-family: Consolas; font-size: 10pt;">(name = </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"iteratorTestData"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">)</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">public</span></b><span style="color: black; font-family: Consolas; font-size: 10pt;"> Iterator<Object[]> data1() </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">throws</span></b><span style="color: black; font-family: Consolas; font-size: 10pt;"> DataDrivenFrameworkException {</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> String excelResource = System.<i>getProperty</i>(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"user.dir"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">)</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> + System.<i>getProperty</i>(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"file.separator"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">) + </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"resources"</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> + System.<i>getProperty</i>(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"file.separator"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">) +</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"ExcelTestData.xls"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">;</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> ExcelFile excelFile = </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">new</span></b><span style="color: black; font-family: Consolas; font-size: 10pt;"> ExcelFile(excelResource);</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> excelFile.setSheetName(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"MyScenario"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> excelFile.setTestCaseHeaderName(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"TestCaseNameColumn"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> List<List<String>> data = excelFile.getDataUsingTestCaseName(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"AddPost"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">return</span></b><span style="color: black; font-family: Consolas; font-size: 10pt;"> SeleniumTestNGHelper.<i>toObjectArrayIterator</i>(data);</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> }</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><span style="color: #646464; font-family: Consolas; font-size: 10pt;">@DataProvider</span><span style="color: black; font-family: Consolas; font-size: 10pt;">(name = </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"csvData"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">)</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">public</span></b><span style="color: black; font-family: Consolas; font-size: 10pt;"> Object[][] csvData() </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">throws</span></b><span style="color: black; font-family: Consolas; font-size: 10pt;"> DataDrivenFrameworkException {</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> String csvResource = System.<i>getProperty</i>(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"user.dir"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">)</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> + System.<i>getProperty</i>(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"file.separator"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">) + </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"resources"</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> + System.<i>getProperty</i>(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"file.separator"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">) +</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"CSVTestData.csv"</span><span style="color: black; font-family: Consolas; font-size: 10pt;">;</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> CSVFile csvFile = </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">new</span></b><span style="color: black; font-family: Consolas; font-size: 10pt;"> CSVFile();</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> List<List<String>> data = csvFile.getTestData(csvResource);</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">return</span></b><span style="color: black; font-family: Consolas; font-size: 10pt;"> SeleniumTestNGHelper.<i>toObjectArray</i>(data);</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;"> }</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; margin-bottom: 0.0001pt;">
<span style="color: black; font-family: Consolas; font-size: 10pt;">}</span><span style="font-family: Consolas; font-size: 10pt;"></span></div>
<br style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: center;" />
<br />
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">Go To: </span><a href="http://automationtestingutilities.blogspot.in/2013/12/DataDrivenFrameworkPart3.html" style="background-color: white; color: #3d85c6; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-decoration: none;" target="_blank">DataDrivenFramework Part 3</a><span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;"> - </span><i style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">Contains Details regarding Upcoming Releases and </i><i style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">Features</i></div>
Automation Testerhttp://www.blogger.com/profile/15092944995388094312noreply@blogger.com12tag:blogger.com,1999:blog-8053515261740493219.post-76201032959552710952013-12-27T18:40:00.001-08:002013-12-27T18:47:13.150-08:00DataDrivenFramework Part 1<div dir="ltr" style="text-align: left;" trbidi="on">
<div align="center" class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; margin-left: 0.25in; text-align: center;">
<b><span style="font-size: 16pt; line-height: 24px;">How does DDF work?</span></b></div>
<div align="center" class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-align: center;">
<br /></div>
<br style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;" />
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">As described, DDF supports Excel files that are prepared from various editions of Office [2003, 2007, and 2010] which are in two different extensions [.xls and .xlsx] </span><br />
<br style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;" />
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">The Framework uses Apache POI (A Robust and Reliable library that is intended to work with Microsoft Office Files) </span><br />
<br style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;" />
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">Apache Commons CSV is used for supporting CSV files </span><br />
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">To Support Oracle Database, It uses Oracle DB driver jar file </span><br />
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">To Support MySQL Database, It uses MySQL Java Connector jar file </span><br />
<br style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;" />
<br style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;" />
<br style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;" />
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">/**********For Reading Excel*********/ </span><br />
<br style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;" />
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">Download Apache POI from </span><br />
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">http://poi.apache.org/download.html </span><br />
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">After downloading Add the following five jars in the build Path </span><br />
<br style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;" />
<br style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;" />
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">From the POI "root folder" use the following </span><br />
<br style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;" />
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">1 >> poi-version.jar </span><br />
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">2 >> poi-ooxml-version.jar </span><br />
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">3 >> poi-ooxml-schemas-version.jar </span><br />
<br style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;" />
<br style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;" />
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">From the POI "ooxml-lib folder" use the following </span><br />
<br style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;" />
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">4 >> dom4j-version.jar </span><br />
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">5 >> xmlbeans-version.jar </span><br />
<br style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;" />
<br style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;" />
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">/**********For Reading CSV*********/</span><br />
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">Download the latest CSV Jar from</span><br />
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">http://commons.apache.org/proper/commons-csv/</span><br />
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">After downloading Add the jar to your Build Path</span><br />
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">1 >> commons-csv-version.jar</span><br />
<br style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;" />
<br style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;" />
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">/**********For Working with MySQL*********/ </span><br />
<br style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;" />
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">Download MySQL Connector from </span><br />
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">http://dev.mysql.com/downloads/connector/j/ </span><br />
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">Add the JAR file to your path </span><br />
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">Mysql-connector-java-version-bin.jar </span><br />
<br style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;" />
<br style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;" />
<br style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;" />
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">/**********For Working with Oracle DB*********/ </span><br />
<br style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;" />
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">Use the Driver jar file located in the Oracle Installed Machine </span><br />
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">Typically located in... </span><br />
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">C:\oraclexe\app\oracle\product\10.2.0 (Version)\server\jdbc\lib\drivername.jar </span><br />
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">Example >> ojdbc14.jar (For Oracle 10G version)</span><br />
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;"><br /></span>
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;"><br /></span><br />
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">Go To: </span><a href="http://automationtestingutilities.blogspot.in/2013/12/DataDrivenFrameworkPart2.html" style="background-color: white; color: #3d85c6; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-decoration: none;" target="_blank">DataDrivenFramework Part 2</a><span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;"> - </span><i style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">Contains Details regarding The usage along with Examples</i></div>
Automation Testerhttp://www.blogger.com/profile/15092944995388094312noreply@blogger.com1tag:blogger.com,1999:blog-8053515261740493219.post-54626678003426327262013-12-27T18:31:00.003-08:002013-12-27T18:31:22.120-08:00ALM ServiceWrapper Part 3<div dir="ltr" style="text-align: left;" trbidi="on">
<b><span style="font-family: "Times New Roman","serif"; font-size: 13.5pt;"><br /></span></b>
<b><span style="font-family: "Times New Roman","serif"; font-size: 13.5pt;">Current and Stable : ALM Service Wrapper ( v2.0 )</span></b><br />
<div class="MsoNormal">
<span style="font-family: "Times New Roman","serif"; font-size: 12pt;">***************************************************************<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Times New Roman","serif"; font-size: 12pt;">with this new version of the project, the following things can be done through code :)<o:p></o:p></span></div>
<div class="MsoNormal">
<br />
<span style="font-family: "Times New Roman","serif"; font-size: 12pt;">* For a Test Set you can do the Following</span><br />
<ul>
<li><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"> Create Attachment</span></li>
</ul>
<br /></div>
<div class="MsoNormal">
<span style="font-family: "Times New Roman","serif"; font-size: 12pt;">* Ability to Create a Run for a given Test Case and Set the Following fields</span><br />
<ul>
<li><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"> Set Run Name</span></li>
<li><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"> Set Run Status</span></li>
<li><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"> Create Attachment</span></li>
</ul>
</div>
<div class="MsoNormal">
<span style="font-family: "Times New Roman","serif"; font-size: 12pt;">* Ability to Create Test Execution Steps </span><span style="font-family: 'Times New Roman', serif; font-size: 16px;">and Set the Following fields for a Test Case Run</span><br />
<ul>
<li><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"> Step Name</span></li>
<li><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"> Step Result</span></li>
<li><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"> Step Description</span></li>
<li><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"> Expected Result</span></li>
<li><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"> Actual Result</span></li>
<li><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"> Create Attachment</span></li>
</ul>
</div>
<div class="MsoNormal">
<span style="font-family: "Times New Roman","serif"; font-size: 12pt;">* Ability to Create Defects/Bugs <o:p></o:p></span><span style="font-family: 'Times New Roman', serif; font-size: 16px;">and Set the Following fields</span></div>
<br />
<div class="MsoNormal" style="margin-bottom: 0in;">
</div>
<br />
<div class="MsoNormal" style="-webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">
<ul style="text-align: left;">
<li><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"> DetectedBy</span></li>
<li><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"> AssignedTo</span></li>
<li><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"> Defect Priority</span></li>
<li><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"> Defect Severity</span></li>
<li><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"> Defect Status</span></li>
<li><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"> Defect Detection Date</span></li>
<li><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"> Summary</span></li>
<li><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"> Description</span></li>
<li><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"> is</span><span style="font-family: Times New Roman, serif;">Reproducible</span></li>
<li><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"> Project</span></li>
<li><span style="font-family: 'Times New Roman', serif; font-size: 12pt;"> Create Attachment</span></li>
</ul>
</div>
</div>
Automation Testerhttp://www.blogger.com/profile/15092944995388094312noreply@blogger.com68tag:blogger.com,1999:blog-8053515261740493219.post-37752500975706366472013-12-27T18:28:00.001-08:002014-06-16T22:06:25.036-07:00ALM Service Wrapper Part 2<div dir="ltr" style="text-align: left;" trbidi="on">
Following is the Example that demonstrates how to use the ALM Service Wrapper.<br />
<br />
<br />
<b>//How to write</b><br />
<br />
<b>//Step1</b><br />
<br />
<a href="http://sourceforge.net/projects/jacob-project/">Download the JACOB project</a><br />
<br />
<b>Note that, if your machine is either 32 or 64 bit OS, you should use jacob-(version)-x86.dll in your project. </b><br />
<br />
Add the <b>jacob-(version)-x86.dll</b> file in your project Root Directory.<br />
or<br />
Place it in any directory and use the below code to load the DLL file.<br />
<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;">System.<i>setProperty</i>(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"jacob.dll.path"</span><span style="font-family: Consolas; font-size: 10pt;">, </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"D:\\jacob-1.17-M2-x86.dll"</span><span style="font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10pt;"><o:p></o:p></span></div>
<br />
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="font-family: Consolas; font-size: 10pt; line-height: 14px;">LibraryLoader.<i>loadJacobLibrary</i>();</span><o:p></o:p><br />
<span style="font-family: Consolas; font-size: 10pt; line-height: 14px;"><br /></span>
<b>NOTE: Many users are experiencing issues with combination of 64bit JDK+ JACOB 32bit dll.</b><br />
<b>To avoid this issue, use JDK 32bit on a 64bit machine.</b></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="font-family: Consolas; font-size: 10pt; line-height: 14px;"><br /></span></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgI3HlQegKXJYmbXC56nxyXEXj5z-lAOUBR8dW7SHA6aYOQBp2bSN76MmKQ19zan0DK3l55lhl5E3m9NF98_D1zLtJV5Az7Y4F7lA16bPgtcnpLTFoKzlB5ivjAB_Jsi5NBeeBJS9taUys/s1600/jacob+dll+path.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgI3HlQegKXJYmbXC56nxyXEXj5z-lAOUBR8dW7SHA6aYOQBp2bSN76MmKQ19zan0DK3l55lhl5E3m9NF98_D1zLtJV5Az7Y4F7lA16bPgtcnpLTFoKzlB5ivjAB_Jsi5NBeeBJS9taUys/s320/jacob+dll+path.png" height="320" width="246" /></a></div>
<br />
<br />
<b>//Step2: The following is the method of writing the code</b><br />
<br />
ALMServiceWrapper wrapper = new ALMServiceWrapper(url);<br />
wrapper.connect(username,password, domain, project);<br />
wrapper.updateResult(pathToTestSetFolder, testSetName, testSetID, testCaseName, result);<br />
wrapper.close();<br />
<br />
<br />
<a href="http://automationtestingutilities.blogspot.in/2014/06/CreatingNewDefectNewRunAttachingFilesAddSteps.html" target="_blank">Example for: Creating New Defect, Adding TestCase Run, Attaching Files, Add Execution Steps</a><br />
<br />
<br />
<div class="MsoNormal">
<b><span style="font-size: 12pt; line-height: 18px;">//Tested Code on my machine</span></b></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;">ALMServiceWrapper wrapper = </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10pt;">new</span></b><span style="color: black; font-family: "Courier New"; font-size: 10pt;"> ALMServiceWrapper( </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 10pt;">"http://localhost:8081/qcbin"</span><span style="color: black; font-family: "Courier New"; font-size: 10pt;">);</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;">wrapper.connect(</span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 10pt;">"admin"</span><span style="color: black; font-family: "Courier New"; font-size: 10pt;">, </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 10pt;">"admin"</span><span style="color: black; font-family: "Courier New"; font-size: 10pt;">, </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 10pt;">"DEFAULT"</span><span style="color: black; font-family: "Courier New"; font-size: 10pt;">, </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 10pt;">"SampleProject"</span><span style="color: black; font-family: "Courier New"; font-size: 10pt;">);</span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;">wrapper.updateResult(</span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 10pt;">"SampleTestSetFolder"</span><span style="color: black; font-family: "Courier New"; font-size: 10pt;">, </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 10pt;">"TestSet1"</span><span style="color: black; font-family: "Courier New"; font-size: 10pt;">, 92, </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 10pt;">"Logout"</span><span style="color: black; font-family: "Courier New"; font-size: 10pt;">,</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> StatusAs.</span><i><span style="color: #0000c0; font-family: "Courier New"; font-size: 10pt;">FAILED</span></i><span style="color: black; font-family: "Courier New"; font-size: 10pt;">);</span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;">wrapper.updateResult(</span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 10pt;">"SampleTestSetFolder\\SubTestSetFolder1"</span><span style="color: black; font-family: "Courier New"; font-size: 10pt;">,</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 10pt;">"TestSet1"</span><span style="color: black; font-family: "Courier New"; font-size: 10pt;">, 61, </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 10pt;">"Logout"</span><span style="color: black; font-family: "Courier New"; font-size: 10pt;">, StatusAs.</span><i><span style="color: #0000c0; font-family: "Courier New"; font-size: 10pt;">PASSED</span></i><span style="color: black; font-family: "Courier New"; font-size: 10pt;">);</span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;">wrapper.updateResult(</span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 10pt;">"SampleTestSetFolder\\SubTestSetFolder1"</span><span style="color: black; font-family: "Courier New"; font-size: 10pt;">,</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 10pt;">"TestSet3"</span><span style="color: black; font-family: "Courier New"; font-size: 10pt;">, 62, </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 10pt;">"Login"</span><span style="color: black; font-family: "Courier New"; font-size: 10pt;">, StatusAs.</span><i><span style="color: #0000c0; font-family: "Courier New"; font-size: 10pt;">BLOCKED</span></i><span style="color: black; font-family: "Courier New"; font-size: 10pt;">);</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;">wrapper.close();</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<br />
<br />
<br />
<br />
<div class="MsoNormal">
<span style="font-size: small; line-height: 18px;">Screenshot of ALM from my machine</span></div>
<div class="MsoNormal">
<br /></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgclUV6zFOhNNNf3l2UrECEGZEafz-P9LT6FxPPfkHeHzrNYVla9iveK2IPBhVTUMbMAuwYkQH0gKc-97L7xT79LWdLnmAArV_6zeJ49KiCEXVDnhIGAw1mvxt-tsI6ocCCnZt-Yq19nys/s1600/sample.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgclUV6zFOhNNNf3l2UrECEGZEafz-P9LT6FxPPfkHeHzrNYVla9iveK2IPBhVTUMbMAuwYkQH0gKc-97L7xT79LWdLnmAArV_6zeJ49KiCEXVDnhIGAw1mvxt-tsI6ocCCnZt-Yq19nys/s320/sample.png" height="224" width="320" /></a></div>
<br />
<br />
<b>For Test Set ID: </b>Refer to below screenshot. when you click on a Test Set the details can be viewed.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwvY65WFd5HvuRb2WHbgYDKvelG8vrc84rNNR3VKeQ3y7BzsTKYcX7Ezc12wV11vlG_lzqY83eTXeAzJTo7TiW526zrOFncUvK6vLBXJlCvYQPseFVH5KzvAb01Gv5npzISv-Mb-VRjBM/s1600/testsetID.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwvY65WFd5HvuRb2WHbgYDKvelG8vrc84rNNR3VKeQ3y7BzsTKYcX7Ezc12wV11vlG_lzqY83eTXeAzJTo7TiW526zrOFncUvK6vLBXJlCvYQPseFVH5KzvAb01Gv5npzISv-Mb-VRjBM/s320/testsetID.jpg" height="110" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<br />
<br />
<b>A Full Example using Selenium and TestNG Framework</b><br />
<br />
<br />
<br />
<div class="MsoNormal" style="margin-bottom: 0in;">
<b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10pt;">package</span></b><span style="color: black; font-family: "Courier New"; font-size: 10pt;"> test;</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10pt;">import</span></b><span style="color: black; font-family: "Courier New"; font-size: 10pt;"> java.util.concurrent.TimeUnit;</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10pt;">import</span></b><span style="color: black; font-family: "Courier New"; font-size: 10pt;"> org.openqa.selenium.By;</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10pt;">import</span></b><span style="color: black; font-family: "Courier New"; font-size: 10pt;"> org.openqa.selenium.WebDriver;</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10pt;">import</span></b><span style="color: black; font-family: "Courier New"; font-size: 10pt;"> org.openqa.selenium.firefox.FirefoxDriver;</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10pt;">import</span></b><span style="color: black; font-family: "Courier New"; font-size: 10pt;"> org.testng.annotations.AfterClass;</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10pt;">import</span></b><span style="color: black; font-family: "Courier New"; font-size: 10pt;"> org.testng.annotations.BeforeClass;</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10pt;">import</span></b><span style="color: black; font-family: "Courier New"; font-size: 10pt;"> org.testng.annotations.Test;</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10pt;">import</span></b><span style="color: black; font-family: "Courier New"; font-size: 10pt;"> atu.alm.wrapper.ALMServiceWrapper;</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10pt;">import</span></b><span style="color: black; font-family: "Courier New"; font-size: 10pt;"> atu.alm.wrapper.enums.StatusAs;</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10pt;">import</span></b><span style="color: black; font-family: "Courier New"; font-size: 10pt;"> atu.alm.wrapper.exceptions.ALMServiceException;</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10pt;">public</span></b><span style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10pt;">class</span></b><span style="color: black; font-family: "Courier New"; font-size: 10pt;"> SeleniumALMIntegrationExample {</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> WebDriver </span><span style="color: #0000c0; font-family: "Courier New"; font-size: 10pt;">driver</span><span style="color: black; font-family: "Courier New"; font-size: 10pt;">;</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><span style="color: #646464; font-family: "Courier New"; font-size: 10pt;">@BeforeClass</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10pt;">public</span></b><span style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10pt;">void</span></b><span style="color: black; font-family: "Courier New"; font-size: 10pt;"> init() {</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><span style="color: #0000c0; font-family: "Courier New"; font-size: 10pt;">driver</span><span style="color: black; font-family: "Courier New"; font-size: 10pt;"> = </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10pt;">new</span></b><span style="color: black; font-family: "Courier New"; font-size: 10pt;"> FirefoxDriver();</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><span style="color: #0000c0; font-family: "Courier New"; font-size: 10pt;">driver</span><span style="color: black; font-family: "Courier New"; font-size: 10pt;">.manage().timeouts().<span style="background-color: silver; background-position: initial initial; background-repeat: initial initial;">implicitlyWait</span>(30, TimeUnit.</span><i><span style="color: #0000c0; font-family: "Courier New"; font-size: 10pt;">SECONDS</span></i><span style="color: black; font-family: "Courier New"; font-size: 10pt;">);</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> }</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><span style="color: #646464; font-family: "Courier New"; font-size: 10pt;">@Test</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10pt;">public</span></b><span style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10pt;">void</span></b><span style="color: black; font-family: "Courier New"; font-size: 10pt;"> login() </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10pt;">throws</span></b><span style="color: black; font-family: "Courier New"; font-size: 10pt;"> InterruptedException, ALMServiceException {</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: "Courier New"; font-size: 10pt;">// Open <u>Wordpress</u> <u>App</u></span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><span style="color: #0000c0; font-family: "Courier New"; font-size: 10pt;">driver</span><span style="color: black; font-family: "Courier New"; font-size: 10pt;">.get(</span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 10pt;">"http://demo.opensourcecms.com/wordpress/wp-login.php"</span><span style="color: black; font-family: "Courier New"; font-size: 10pt;">);</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: "Courier New"; font-size: 10pt;">// Enter UserName</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> Thread.<i>sleep</i>(3000);</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><span style="color: #0000c0; font-family: "Courier New"; font-size: 10pt;">driver</span><span style="color: black; font-family: "Courier New"; font-size: 10pt;">.findElement(By.<i>id</i>(</span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 10pt;">"user_login"</span><span style="color: black; font-family: "Courier New"; font-size: 10pt;">)).clear();</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><span style="color: #0000c0; font-family: "Courier New"; font-size: 10pt;">driver</span><span style="color: black; font-family: "Courier New"; font-size: 10pt;">.findElement(By.<i>id</i>(</span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 10pt;">"user_login"</span><span style="color: black; font-family: "Courier New"; font-size: 10pt;">)).sendKeys(</span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 10pt;">"admin"</span><span style="color: black; font-family: "Courier New"; font-size: 10pt;">);</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: "Courier New"; font-size: 10pt;">// Enter Password</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><span style="color: #0000c0; font-family: "Courier New"; font-size: 10pt;">driver</span><span style="color: black; font-family: "Courier New"; font-size: 10pt;">.findElement(By.<i>id</i>(</span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 10pt;">"user_pass"</span><span style="color: black; font-family: "Courier New"; font-size: 10pt;">)).clear();</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><span style="color: #0000c0; font-family: "Courier New"; font-size: 10pt;">driver</span><span style="color: black; font-family: "Courier New"; font-size: 10pt;">.findElement(By.<i>id</i>(</span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 10pt;">"user_pass"</span><span style="color: black; font-family: "Courier New"; font-size: 10pt;">)).sendKeys(</span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 10pt;">"demo123"</span><span style="color: black; font-family: "Courier New"; font-size: 10pt;">);</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: "Courier New"; font-size: 10pt;">// Click on Submit button</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><span style="color: #0000c0; font-family: "Courier New"; font-size: 10pt;">driver</span><span style="color: black; font-family: "Courier New"; font-size: 10pt;">.findElement(By.<i>id</i>(</span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 10pt;">"wp-submit"</span><span style="color: black; font-family: "Courier New"; font-size: 10pt;">)).submit();</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> updateResults();</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> System.</span><i><span style="color: #0000c0; font-family: "Courier New"; font-size: 10pt;">out</span></i><span style="color: black; font-family: "Courier New"; font-size: 10pt;">.println(</span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 10pt;">"Done Updating Results"</span><span style="color: black; font-family: "Courier New"; font-size: 10pt;">);</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> }</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10pt;">public</span></b><span style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10pt;">void</span></b><span style="color: black; font-family: "Courier New"; font-size: 10pt;"> updateResults() </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10pt;">throws</span></b><span style="color: black; font-family: "Courier New"; font-size: 10pt;"> ALMServiceException {</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> ALMServiceWrapper wrapper = </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10pt;">new</span></b><span style="color: black; font-family: "Courier New"; font-size: 10pt;"> ALMServiceWrapper(</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 10pt;">"http://localhost:8081/qcbin"</span><span style="color: black; font-family: "Courier New"; font-size: 10pt;">);</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> wrapper.connect(</span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 10pt;">"admin"</span><span style="color: black; font-family: "Courier New"; font-size: 10pt;">, </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 10pt;">"admin"</span><span style="color: black; font-family: "Courier New"; font-size: 10pt;">, </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 10pt;">"DEFAULT"</span><span style="color: black; font-family: "Courier New"; font-size: 10pt;">, </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 10pt;">"SampleProject"</span><span style="color: black; font-family: "Courier New"; font-size: 10pt;">);</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> wrapper.updateResult(</span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 10pt;">"SampleTestSetFolder\\SubTestSetFolder1"</span><span style="color: black; font-family: "Courier New"; font-size: 10pt;">,</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 10pt;">"TestSet3"</span><span style="color: black; font-family: "Courier New"; font-size: 10pt;">, 62, </span><span style="color: #2a00ff; font-family: "Courier New"; font-size: 10pt;">"Login"</span><span style="color: black; font-family: "Courier New"; font-size: 10pt;">, StatusAs.</span><i><span style="color: #0000c0; font-family: "Courier New"; font-size: 10pt;">PASSED</span></i><span style="color: black; font-family: "Courier New"; font-size: 10pt;">);</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> wrapper.close();</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> }</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><span style="color: #646464; font-family: "Courier New"; font-size: 10pt;">@AfterClass</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10pt;">public</span></b><span style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: "Courier New"; font-size: 10pt;">void</span></b><span style="color: black; font-family: "Courier New"; font-size: 10pt;"> close(){</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> </span><span style="color: #0000c0; font-family: "Courier New"; font-size: 10pt;">driver</span><span style="color: black; font-family: "Courier New"; font-size: 10pt;">.quit();</span><span style="font-family: "Courier New"; font-size: 10pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0in;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"> }</span></div>
<div class="MsoNormal" style="-webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin-bottom: 0in; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">
<div style="margin: 0px;">
<span style="color: black; font-family: "Courier New"; font-size: 10pt;">}</span><br />
<span style="color: black; font-family: "Courier New"; font-size: 10pt;"><br /></span>
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">Go To: </span><a href="http://automationtestingutilities.blogspot.in/2013/12/IntegrationWithQCorALMusingALMServiceWrapperPart3.html" style="background-color: white; color: #3d85c6; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-decoration: none;" target="_blank">ALM ServiceWrapper Part 3</a><span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;"> - </span><i style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">Contains Details regarding Upcoming Releases and Features</i></div>
</div>
</div>
Automation Testerhttp://www.blogger.com/profile/15092944995388094312noreply@blogger.com154tag:blogger.com,1999:blog-8053515261740493219.post-67120951692681634362013-12-27T18:24:00.001-08:002014-06-13T03:52:24.620-07:00ALM Service Wrapper Part 1<div dir="ltr" style="text-align: left;" trbidi="on">
The ATU ALM Service Wrapper is written in Java (using JACOB library) which is wrapped around the OTA API. For the wrapper to work correctly, the OTAClient.dll must be registered in your machine by the following approach.<br />
<br />
With the help of <b>regsvr32.exe</b> tool, we will register the <b>OTAClient.dll</b><br />
<br />
<b><u>On a 32-Bit OS:</u> </b><br />
<br />
1) Open CMD prompt. Change your directory to <b>C:\Windows\System32</b><br />
<br />
<br />
<b>OTAClient.dll</b> is typically located in C drive ,<br />
C:\Users\<username>\AppData\Local\HP\ALM-Client\localhost\<br />
If you are unable to see The <b>AppData</b> folder, enable viewing of Hidden files as <b>AppData</b> is a Hidden Folder<br />
<br />
For registering the dll, use the below command.<br />
<br />
<br />
<b>C:\Windows\System32></b><b>regsvr32.exe C:\Users\Administrator\AppData\Local\HP\ALM-Client\localhost\OTAClient.dll</b><br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUPsLBAKyjICOIMlxg0WQ7Raio3AJvenc6rPCPD-lPNA2nVoMbSWm527Hyt8u57HXnXdy-18GqlTVHPS9DRF1ciBr8yhaiNg8UHPb1qyRGlMWebKFWCzbFiGknUWdcjB8PwvLkJXsw7zM/s1600/register.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUPsLBAKyjICOIMlxg0WQ7Raio3AJvenc6rPCPD-lPNA2nVoMbSWm527Hyt8u57HXnXdy-18GqlTVHPS9DRF1ciBr8yhaiNg8UHPb1qyRGlMWebKFWCzbFiGknUWdcjB8PwvLkJXsw7zM/s1600/register.jpg" height="248" width="320" /></a></div>
<br />
<br />
Press Enter Key, once it is done, you will get a Message as "DLL Register succeeded".<br />
<br />
-----------------------------------------------------------------------------------------------------<br />
<b><u>On a 64-Bit OS:</u></b><br />
<br />
<br />
<h3 style="text-align: left;">
<b>NOTE: Many users are experiencing issues with combination of 64bit JDK+ JACOB 32bit dll.</b><b>To avoid this issue, use JDK 32bit on a 64bit machine.</b></h3>
<br />
<br />
1) Open CMD prompt. Change your directory to <b>C:\Windows\System32</b><br />
<br />
<br />
<b>OTAClient.dll</b> is typically located in C drive ,<br />
C:\Users\<username>\AppData\Local\HP\ALM-Client\localhost\<br />
If you are unable to see The <b>AppData</b> folder, enable viewing of Hidden files as <b>AppData</b> is a Hidden Folder<br />
<br />
For registering the dll, use the below command.<br />
<br />
<b>C:\Windows\System32>regsvr32.exe C:\Users\Administrator\AppData\Local\HP\ALM-Client\localhost\OTAClient.dll</b><br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEZp-Zno7GcIsYZGTJ_-kwvj2_-guzE7uvfTzqmVCVnGHhXxog4l9nxqR5Bof142br04_KhIxFQSz4PXLs0Rf3jEl9EmFGP6cy0qEjXe2rh5Aiie_H5JgbpE5FWUW3mZNlA9WMsx8c4hs/s1600/64bit.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEZp-Zno7GcIsYZGTJ_-kwvj2_-guzE7uvfTzqmVCVnGHhXxog4l9nxqR5Bof142br04_KhIxFQSz4PXLs0Rf3jEl9EmFGP6cy0qEjXe2rh5Aiie_H5JgbpE5FWUW3mZNlA9WMsx8c4hs/s1600/64bit.jpg" height="210" width="320" /></a></div>
<br />
<br />
<br />
Press Enter Key, once it is done, you will get a Message as "DLL Register succeeded".<br />
<br />
----------------------------------------------------------------------------------------------------<br />
Once the above operation is done, we are ready to use the ALM Service Wrapper. with just four lines of code you can update the results into QC/ALM.<br />
<div>
<br />
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">Go To: </span><a href="http://automationtestingutilities.blogspot.in/2013/12/IntegrationWithQCorALMusingALMServiceWrapperPart2.html" style="background-color: white; color: #3d85c6; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-decoration: none;" target="_blank">ALM ServiceWrapper Part 2</a><span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;"> - </span><i style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">Contains Details regarding The usage along with Examples</i></div>
</div>
Automation Testerhttp://www.blogger.com/profile/15092944995388094312noreply@blogger.com15tag:blogger.com,1999:blog-8053515261740493219.post-49278262540589308672013-12-27T00:05:00.002-08:002013-12-27T18:38:15.052-08:00ATU Reporter Part 1<div dir="ltr" style="text-align: left;" trbidi="on">
<h3>
what details can we get from this Reports ?</h3>
<div>
<br /></div>
For each execution of a TestNG script the following things are generated in the form of HTML pages<br />
<br />
* An Index page - <i> A Start Page, you can set any Description in this page</i><br />
<i><br /></i><i>* </i>A Consolidated Report Page<i> - Displays all the Runs in the form of Line and Bar Charts</i><br />
<i><br /></i><i>* </i>A Current Run Report Page<i> - For each run, The Current Run page shows the number of Test cases executed in a tabular format along with the Iteration details, a Summary section and a Pie Chart</i><br />
<i><br /></i><i>* </i>A Test Case Report Page<i> - This Page gives the information about a Test Case with detailed steps in a tabular format along with the screenshot, a Summary section, Execution Platform details, Author Details and provides information about Failure / Skipped / Parameters</i><br />
<br />
For generating this Graphs we have used JQuery, CSS, HTML and jqPlot charting library.<br />
<br />
<br />
* An Index page<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfCmWQd5ehIVdhYWAUIGJaEChhqrYUSUfW69-txaXSachbiRv508hLVLTmg0AyLbl1FOM11ib616gWMchChlaC8Yv-10DLNrl4M1JSjCQJB2iL45prVa-54xi7fxKYphL_YMgkaUGGbFM/s1600/index.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfCmWQd5ehIVdhYWAUIGJaEChhqrYUSUfW69-txaXSachbiRv508hLVLTmg0AyLbl1FOM11ib616gWMchChlaC8Yv-10DLNrl4M1JSjCQJB2iL45prVa-54xi7fxKYphL_YMgkaUGGbFM/s320/index.jpg" width="320" /></a></div>
<br />
<br />
<br />
<i>* </i>A Consolidated Report Page<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQXcNLHr2QfI_DX2XAIryQJooVxtIIxtmQZk_IvHoa-bQJSWIbFgzIdPXGssw3OEUxGqeWCbM_7uzqwetyw9IqET4GZBsKlyfgbTw-jqd2Gv00_vIRCHKiQLHlQZ_bhawbc7mVEg-XAWA/s1600/bar.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQXcNLHr2QfI_DX2XAIryQJooVxtIIxtmQZk_IvHoa-bQJSWIbFgzIdPXGssw3OEUxGqeWCbM_7uzqwetyw9IqET4GZBsKlyfgbTw-jqd2Gv00_vIRCHKiQLHlQZ_bhawbc7mVEg-XAWA/s320/bar.jpg" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxh1faovfhJ089ZJfQaCdJ-OTmhfyuNquTE7K9cs1yFOtoCgjqG9mc_a2p_fX6VRujlmjFezXset_RjwJS85RcpmeieQ_vvtMjafn9e0dEiZOynQu_JQVutS0dXgF4PkFpiXjbx3miCc0/s1600/line.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxh1faovfhJ089ZJfQaCdJ-OTmhfyuNquTE7K9cs1yFOtoCgjqG9mc_a2p_fX6VRujlmjFezXset_RjwJS85RcpmeieQ_vvtMjafn9e0dEiZOynQu_JQVutS0dXgF4PkFpiXjbx3miCc0/s320/line.jpg" width="320" /></a></div>
<br />
<h3>
<i style="font-size: medium; font-weight: normal;">* </i><span style="font-size: small; font-weight: normal;">A Current Run Report Page</span></h3>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIwAwt9Th-RD_-PzdiU9jHBt6nZJVORY3EobnaIhfFe3p4fHBxqIquvebMIwezhT-8ALVlSSIbdOVlB2amy46h4PUDWdA0V1V97kgy5FYlh7NnDIxTdWDuNw3B2so2_k2z_5GACNLdmn8/s1600/cureent_run.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIwAwt9Th-RD_-PzdiU9jHBt6nZJVORY3EobnaIhfFe3p4fHBxqIquvebMIwezhT-8ALVlSSIbdOVlB2amy46h4PUDWdA0V1V97kgy5FYlh7NnDIxTdWDuNw3B2so2_k2z_5GACNLdmn8/s320/cureent_run.jpg" width="320" /></a></div>
<div>
<span style="font-size: small;"><br /></span></div>
<h3>
</h3>
<div>
<i>* </i>A Test Case Report Page</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhH3pFh-h5rYEJFivjtzie3fAY2uAiV7M6zzeauEiVC30FV5KeblDKvyjcnP1nZzegB5fzmDn9htLF1lOJUb1WbSasdK3_HKl9JBUqpHVk_oI4AUKUgkljpI-fk9afIgDvWJIAomapkyKI/s1600/tcreport.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhH3pFh-h5rYEJFivjtzie3fAY2uAiV7M6zzeauEiVC30FV5KeblDKvyjcnP1nZzegB5fzmDn9htLF1lOJUb1WbSasdK3_HKl9JBUqpHVk_oI4AUKUgkljpI-fk9afIgDvWJIAomapkyKI/s320/tcreport.jpg" width="320" /></a></div>
<div>
<br />
<br />
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">Go To: </span><a href="http://automationtestingutilities.blogspot.in/2013/12/ATUReporterPart2.html" style="background-color: white; color: #3d85c6; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px; text-decoration: none;" target="_blank">ATU Reporter Part 2</a><span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;"> - </span><i style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">Contains Details regarding The usage along with Examples</i><br />
<br /></div>
</div>
Automation Testerhttp://www.blogger.com/profile/15092944995388094312noreply@blogger.com39tag:blogger.com,1999:blog-8053515261740493219.post-35359255950937155402013-12-27T00:05:00.000-08:002014-07-30T11:48:21.160-07:00ATU Reporter Part 3<div dir="ltr" style="text-align: left;" trbidi="on">
<h3 style="text-align: left;">
Upcoming Releases and Features</h3>
<div>
<div class="MsoNormal">
<h4 style="text-align: left;">
</h4>
<h4 style="text-align: left;">
Expected Version: ATU Reporter (Expected in v6)</h4>
<div>
<h2>
<span style="background-color: white; color: #222222; font-family: 'Times New Roman', serif; font-size: 16px; line-height: 18px;">***************************************************************</span></h2>
</div>
<h4 style="text-align: left;">
<span style="font-weight: normal;">Features include:</span></h4>
<div>
<ul style="text-align: left;">
<li>PDF Reports</li>
</ul>
<div>
<br />
<h4>
Current Version: ATU Reporter 5.5 BETA</h4>
<div>
<h2>
<span style="background-color: white; color: #222222; font-family: 'Times New Roman', serif; font-size: 16px; line-height: 18px;">***************************************************************</span></h2>
</div>
<h4>
<span style="font-weight: normal;">Features include:</span></h4>
<div>
<ul>
<li>Fixed a bug that generated incorrect Runs when multiple Suite files are executed [*Issue reported by users]**</li>
<li>Fixed: Default package throwing null pointer exception [*Issue reported by users]**</li>
<li>Fixed - Overlapping of chart graph when there are more number of tests [*Issue reported by users]**</li>
<li>Added support for - org.testng.SkipException [*Feature requested by users]**</li>
<li>Added support for - Filter by Suites [*Feature requested by users]**</li>
<li>Added support for - Setting class level author info for all the test cases within that class. you can override this in the test method to give a different author details</li>
</ul>
</div>
<br />
<h4>
Stable Version: ATU Reporter 5.1.1</h4>
<div>
<h2>
<span style="background-color: white; color: #222222; font-family: 'Times New Roman', serif; font-size: 16px; line-height: 18px;">***************************************************************</span></h2>
</div>
<h4>
<span style="font-weight: normal;">Features include:</span></h4>
<div>
<ul style="text-align: left;">
<li>Fixed: Video Recording is unable to play due to a missing attribute.</li>
<li>If execution recording is disabled then the "<span style="background-color: white; color: #585858; font-family: 'Trebuchet MS', Arial, Helvetica, sans-serif; font-size: 14px; text-align: center;">Click Me to Show/Hide the Execution Video</span>" should not be displayed [Feature Requested by users]**</li>
</ul>
</div>
<br />
<h4>
ATU Reporter 5.1</h4>
<div>
<h2>
<span style="background-color: white; color: #222222; font-family: 'Times New Roman', serif; font-size: 16px; line-height: 18px;">***************************************************************</span></h2>
</div>
<h4>
<span style="font-weight: normal;">Features include:</span></h4>
<div>
<ul>
<li>Fixed a bug that failed in extracting browser details when working with a RemoteWebDriver instance. [Issue reported by user]**</li>
</ul>
</div>
<br />
<h4>
</h4>
<h4>
ATU Reporter 5.0 (A major Milestone of ATU Reporter which includes some of the exciting new features )</h4>
<h4>
<span style="background-color: white; color: #222222; font-family: 'Times New Roman', serif; font-size: 16px; line-height: 18px;">***************************************************************</span> </h4>
<h4>
<span style="font-weight: normal;">Features include: </span></h4>
<div>
<ul style="text-align: left;">
<li>User can log a step status as (implemented in new overloaded add methods) </li>
<ul>
<li>INFO</li>
<li>WARNING</li>
<li>PASSED</li>
<li>FAILED [Feature Requested by users]**</li>
</ul>
<li>If a step has been logged as failed, an option is provided for the user to continue the execution of remaining steps</li>
<li>Record the test execution</li>
<li>Capture screenshot of Desktop/Browser Page/Element</li>
</ul>
</div>
<div>
<span style="font-weight: normal;"><br /></span></div>
<div>
<br /></div>
<h4>
ATU Reporter v4.6</h4>
<div>
<span style="background-color: white; color: #222222; font-family: 'Times New Roman', serif; font-size: 16px; line-height: 18px;">***************************************************************</span></div>
<h4>
<span style="font-weight: normal;">Features include:</span></h4>
<div>
<ul style="text-align: left;">
<li>Fixed a bug - when running multi browser tests from testng.xml, the browser details in the reports were captured incorrectly. [*Issue reported by user]</li>
</ul>
</div>
<br />
<h4>
ATU Reporter v4.5</h4>
<div>
<span style="background-color: white; color: #222222; font-family: 'Times New Roman', serif; font-size: 16px; line-height: 18px;">***************************************************************</span></div>
<div>
<h4>
<span style="font-weight: normal;">Features include:</span></h4>
</div>
<div>
<ul><span style="font-weight: normal;">
<li>Filter the Test Cases in Current Run Page to view grouped results of Test Methods [Feature Requested by users]**</li>
<li>Give description about Current execution, This description is displayed in the Current Run page [Feature Requested by users]**</li>
<li>Give description of the Requirement coverage for individual test cases. you can provide more information on Build, Release, Cycle etc. This information is displayed in the Test Case execution report page.</li>
</span></ul>
<span style="font-weight: normal;">
</span></div>
<div>
<br /></div>
<h4>
ATU Reporter v 4.0</h4>
</div>
</div>
<div>
<h2>
<span style="background-color: white; color: #222222; font-family: 'Times New Roman', serif; font-size: 16px; line-height: 18px;">***************************************************************</span></h2>
</div>
<div>
<h4>
<span style="font-weight: normal;">Features include: </span></h4>
</div>
<div>
<ul style="text-align: left;">
<li>User has the option to choose whether configuration reports should be generated or not. This property must be set in the property file [*Feature Requested by users]</li>
<li>An option for the user to set whether screenshots should be taken or not regardless of what the user has logged in the script. Setting false for taking screenshots results in faster execution time. This option is best suitable when you use HtmlUnitDriver</li>
<li>The ATU Reporter has the ability to generate Excel Reports</li>
<li>Minor improvements</li>
</ul>
</div>
<div>
<h4>
<span style="font-weight: normal;">All the above options should be set in the property file</span></h4>
<div>
<span style="font-weight: normal;"><br /></span></div>
<h4>
ATU Reporter v3.5</h4>
<h2>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-weight: normal; line-height: 18px;">
<span style="font-family: 'Times New Roman', serif; font-size: 12pt;">***************************************************************</span></div>
<div>
<span style="font-size: small; font-weight: normal;"><br />Features include:</span></div>
<span style="font-size: small; font-weight: normal;"><ul style="text-align: left;">
<li>Improved code for copying the project logo, this applies only if the logo is available in the given path. This eliminates the process of manually copying the logo. [*Feature Requested by users]</li>
<li>Internet Explorer browser does not display the screenshot image (in some versions of IE, Possibly due to security reasons/incompatible encoding of image ). This is not an issue with the ATU Reporter. To overcome this we have changed the screenshot format to .png instead of .jpg. This change works fine in IE. [*Reported by users]</li>
</ul>
</span><ul>
</ul>
</h2>
</div>
<div>
<br /></div>
<h4 style="text-align: left;">
</h4>
<h4 style="text-align: left;">
ATU Reporter v3.0</h4>
<h2 style="text-align: left;">
<span style="background-color: white; color: #222222; font-family: 'Times New Roman', serif; font-size: 16px; font-weight: normal; line-height: 18px;">***************************************************************</span></h2>
</div>
<div class="MsoNormal">
Features include:</div>
<div class="MsoNormal">
<ul style="text-align: left;">
<li>Customizing the HTML reports : This feature enables the end user to generate the reports with user defined settings</li>
<li>Put a logo</li>
<li>Set Project Title</li>
<li>Index Page Description</li>
<li>Change the Reports folder Name (say Sanity Test Reports or Integration Test Reports), Save the reports folder to any specified location [Feature Requested by users]** </li>
<li>Filter the Test Cases in Current Run Page to view grouped results of Passed or Failed or Skipped etc. [Feature Requested by users]**</li>
<li>Fixed a NullPointerException </li>
<li>Minor improvements</li>
</ul>
</div>
<div class="MsoNormal">
<h2>
<span style="font-size: small;"><br /></span></h2>
<h2>
<span style="font-size: small;">ATU Reporter v2.5</span></h2>
<h2>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-weight: normal; line-height: 18px;">
<span style="font-family: 'Times New Roman', serif; font-size: 12pt;">***************************************************************</span></div>
<div style="text-align: left;">
<span style="font-size: small; font-weight: normal;"><br />Features include:</span></div>
<span style="font-size: small; font-weight: normal;"><ul style="text-align: left;">
<li>Fixed an issue that caused improper styling of HTML Reports on Linux based machines [*Issue reported by user]</li>
</ul>
</span><ul style="text-align: left;">
</ul>
<div style="text-align: left;">
<span style="font-size: small;"><span style="font-weight: normal;"><br /></span></span></div>
</h2>
<h2>
<span style="font-size: small;">ATU Reporter v2.2.1</span></h2>
<h2>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-weight: normal; line-height: 18px;">
<span style="font-family: 'Times New Roman', serif; font-size: 12pt;">***************************************************************</span></div>
<div style="text-align: left;">
<span style="font-weight: normal;"><span style="font-size: small;"><br />Features include:</span></span></div>
<span style="font-size: small; font-weight: normal;"><ul style="text-align: left;">
<li>Fixed an issue that was causing not to display "input value" in the execution report [*Issue reported by user]</li>
</ul>
</span><ul style="text-align: left;">
</ul>
</h2>
<h2>
<span style="font-size: small;"><br /></span></h2>
<h2>
<span style="font-size: small;">ATU Reporter v2.2</span></h2>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">
<span style="font-family: 'Times New Roman', serif; font-size: 12pt;">***************************************************************</span></div>
<br />
Features include: <br />
<ul style="text-align: left;">
<li>Fixed an issue that was causing not to generate reports when failed tests are executed</li>
</ul>
</div>
<h2 style="text-align: left;">
<span style="font-size: small;"><br /></span></h2>
<h2 style="text-align: left;">
<span style="font-size: small;">ATU Reporter v2.1</span></h2>
<div class="MsoNormal" style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">
<span style="font-family: 'Times New Roman', serif; font-size: 12pt;">***************************************************************</span></div>
Features include:<br />
<ul>
<li>Detailed description of a Method</li>
<li>Reporting for Configuration Annotated Methods </li>
</ul>
</div>
</div>
Automation Testerhttp://www.blogger.com/profile/15092944995388094312noreply@blogger.com28tag:blogger.com,1999:blog-8053515261740493219.post-71128616833870759662013-12-27T00:01:00.000-08:002014-05-26T01:44:11.031-07:00ATU Reporter Part 2<div dir="ltr" style="text-align: left;" trbidi="on">
<h3>
How to Use the Project:</h3>
Two important classes which we will be using<br />
<br />
<ul>
<li>ATUReportsListener - <i>A TestNG Listener</i></li>
<li>ConfigurationListener - <i>A TestNG Listener</i></li>
<li>MethodListener - <i>A TestNG Listener</i></li>
<li>ATUReports - <i>Used</i> <i>for logging the report data</i></li>
</ul>
<br />
<i><br /></i>The above listeners must be called in the TestNG script or used in the testng.xml file.<br />
<br />
<h3>
Using The Listener in a TestNG Script:</h3>
In a TestNG Script, use the Listener as<br />
<br />
import atu.testng.reports.listeners.ATUReportsListener;<br />
import atu.testng.reports.listeners.ConfigurationListener;<br />
import atu.testng.reports.listeners.MethodListener;<br />
@Listeners({ ATUReportsListener.class, ConfigurationListener.class,<br />
MethodListener.class })<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">public</span></b><span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">class</span></b><span style="font-family: Consolas; font-size: 10pt;"> TestNGScript {</span><span style="font-family: Consolas; font-size: 10pt;"><o:p></o:p></span></div>
}<br />
<br />
<br />
<b>NOTE: If you plan to work with ATU Reporter for Selenium TestNG then follow next procedure else skip it</b><br />
<b><br /></b>
<b>-------------------------------------------------------------------------------------------------------</b><br />
<b><br /></b>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
Set the driver Object to the ATUReporter as follows.<br />
<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: #0000c0; font-family: Consolas; font-size: 10pt;">driver</span><span style="font-family: Consolas; font-size: 10pt;"> = </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">new</span></b><span style="font-family: Consolas; font-size: 10pt;"> FirefoxDriver();</span><span style="font-family: Consolas; font-size: 10pt;"><o:p></o:p></span></div>
<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;">ATUReports.<i>setWebDriver</i>(</span><span style="color: #0000c0; font-family: Consolas; font-size: 10pt;">driver</span><span style="font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
This is required to retrieve the browser information and taking screenshots. If this is not set, Screenshots will not be captured.<br />
<br />
---------------------------------------------------------------------------------------<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
Setting Index page Description, this is Optional<br />
<span style="font-family: Consolas; font-size: 10pt; line-height: 14px;">ATUReports.</span><i><span style="color: #0000c0; font-family: Consolas; font-size: 10pt; line-height: 14px;">indexPageDescription</span></i><span style="font-family: Consolas; font-size: 10pt; line-height: 14px;"> = </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt; line-height: 14px;">"My Project Description"</span><span style="font-family: Consolas; font-size: 10pt; line-height: 14px;">;</span><br />
<span style="font-family: Consolas; font-size: 10pt; line-height: 14px;"><br /></span>Setting Author Details, this is Optional<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: #646464; font-family: Consolas; font-size: 10pt;">@Test</span><span style="font-family: Consolas; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">public</span></b><span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">void</span></b><span style="font-family: Consolas; font-size: 10pt;"> testME() {</span><span style="font-family: Consolas; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> setAuthorInfoForReports();</span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;">}</span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">private</span></b><span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">void</span></b><span style="font-family: Consolas; font-size: 10pt;"> setAuthorInfoForReports() {</span><span style="font-family: Consolas; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> ATUReports.<i>setAuthorInfo</i>(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"Automation Tester"</span><span style="font-family: Consolas; font-size: 10pt;">, Utils.<i>getCurrentTime</i>(),</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"1.0"</span><span style="font-family: Consolas; font-size: 10pt;">);</span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
</div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;">}</span><span style="font-family: Consolas; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
This must be set for every test case so that the author details are set on the Test Case Report Page.</div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
Finally, we log the Test Step execution as follows.</div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: #646464; font-family: Consolas; font-size: 10pt;">@Test</span><span style="font-family: Consolas; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">public</span></b><span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">void</span></b><span style="font-family: Consolas; font-size: 10pt;"> testME() {</span><span style="font-family: Consolas; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> setAuthorInfoForReports();</span><span style="font-family: Consolas; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> ATUReports.<i>add</i>(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"Step Desc"</span><span style="font-family: Consolas; font-size: 10pt;">, </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">false</span></b><span style="font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> ATUReports.<i>add</i>(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"Step Desc"</span><span style="font-family: Consolas; font-size: 10pt;">, </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"inputValue"</span><span style="font-family: Consolas; font-size: 10pt;">, </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">false</span></b><span style="font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> ATUReports.<i>add</i>(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"Step Desc"</span><span style="font-family: Consolas; font-size: 10pt;">, </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"expectedValue"</span><span style="font-family: Consolas; font-size: 10pt;">, </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"actualValue"</span><span style="font-family: Consolas; font-size: 10pt;">, </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">false</span></b><span style="font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> ATUReports.<i>add</i>(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"Step Desc"</span><span style="font-family: Consolas; font-size: 10pt;">, </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"inputValue"</span><span style="font-family: Consolas; font-size: 10pt;">, </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"expectedValue"</span><span style="font-family: Consolas; font-size: 10pt;">,</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"actualValue"</span><span style="font-family: Consolas; font-size: 10pt;">, </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">false</span></b><span style="font-family: Consolas; font-size: 10pt;">);</span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
</div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;">}</span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
The ATUReports class has four overloaded add methods for logging the Step information. </div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
The Boolean value tells whether a screenshot should be taken for the current Step.</div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
true : Takes Screenshot</div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
false : No Screenshot</div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b>Full Program:</b></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">package</span></b><span style="font-family: Consolas; font-size: 10pt;"> com.testcases;</span><span style="font-family: Consolas; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">import</span></b><span style="font-family: Consolas; font-size: 10pt;"> org.openqa.selenium.WebDriver;</span><span style="font-family: Consolas; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">import</span></b><span style="font-family: Consolas; font-size: 10pt;"> org.openqa.selenium.firefox.FirefoxDriver;</span><span style="font-family: Consolas; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">import</span></b><span style="font-family: Consolas; font-size: 10pt;"> org.testng.annotations.BeforeClass;</span><span style="font-family: Consolas; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">import</span></b><span style="font-family: Consolas; font-size: 10pt;"> org.testng.annotations.Listeners;</span><span style="font-family: Consolas; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">import</span></b><span style="font-family: Consolas; font-size: 10pt;"> org.testng.annotations.Test;</span><span style="font-family: Consolas; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">import</span></b><span style="font-family: Consolas; font-size: 10pt;"> atu.testng.reports.ATUReports;</span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">import</span></b><span style="font-family: Consolas; font-size: 10pt;"> atu.testng.reports.utils.Utils;</span><br />
<span style="font-family: Consolas; font-size: 10pt;"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: inherit;"><span style="color: #646464;">import </span>atu.testng.reports.listeners.ATUReportsListener;</span><br />
<span style="font-family: inherit;"><span style="color: #646464;">import </span>atu.testng.reports.listeners.ConfigurationListener;</span><br />
<span style="font-family: inherit;"><span style="color: #646464;">import </span>atu.testng.reports.listeners.MethodListener;</span><br />
<span style="font-family: inherit;"><span style="color: #646464;"><br /></span><span style="color: #646464;">@Listeners({ ATUReportsListener.class, ConfigurationListener.class,</span></span><br />
<span style="color: #646464; font-family: inherit;"><span class="Apple-tab-span" style="white-space: pre;"> </span>MethodListener.class })</span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">public</span></b><span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">class</span></b><span style="font-family: Consolas; font-size: 10pt;"> TestNGScript {</span><span style="font-family: Consolas; font-size: 10pt;"><o:p></o:p></span><br />
<span style="font-family: Consolas; font-size: 10pt;"><br /></span>
<span style="font-family: Consolas; font-size: 10pt;"><br /></span>
<span style="font-family: Consolas; font-size: 10pt;"> //Set Property for ATU Reporter Configuration</span><br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> {</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> System.<i>setProperty</i>(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10.0pt;">"atu.reporter.config"</span><span style="font-family: Consolas; font-size: 10pt;">, </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10.0pt;">"Path to the properties file"</span><span style="font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<br />
<div class="MsoNormal">
<span style="font-family: Consolas; font-size: 10pt; line-height: 115%;"> }</span><o:p></o:p></div>
<span style="font-family: Consolas; font-size: 10pt;"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> WebDriver </span><span style="color: #0000c0; font-family: Consolas; font-size: 10pt;">driver</span><span style="font-family: Consolas; font-size: 10pt;">;</span><span style="font-family: Consolas; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: #646464; font-family: Consolas; font-size: 10pt;">@BeforeClass</span><span style="font-family: Consolas; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">public</span></b><span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">void</span></b><span style="font-family: Consolas; font-size: 10pt;"> init() {</span><span style="font-family: Consolas; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: #0000c0; font-family: Consolas; font-size: 10pt;">driver</span><span style="font-family: Consolas; font-size: 10pt;"> = </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">new</span></b><span style="font-family: Consolas; font-size: 10pt;"> FirefoxDriver();</span><span style="font-family: Consolas; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> ATUReports.<i>setWebDriver</i>(</span><span style="color: #0000c0; font-family: Consolas; font-size: 10pt;">driver</span><span style="font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> setIndexPageDescription();</span><span style="font-family: Consolas; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> }</span><span style="font-family: Consolas; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">private</span></b><span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">void</span></b><span style="font-family: Consolas; font-size: 10pt;"> setAuthorInfoForReports() {</span><span style="font-family: Consolas; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> ATUReports.<i>setAuthorInfo</i>(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"Automation Tester"</span><span style="font-family: Consolas; font-size: 10pt;">, Utils.<i>getCurrentTime</i>(),</span><span style="font-family: Consolas; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"1.0"</span><span style="font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> }</span><span style="font-family: Consolas; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">private</span></b><span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">void</span></b><span style="font-family: Consolas; font-size: 10pt;"> setIndexPageDescription() {</span><span style="font-family: Consolas; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> ATUReports.</span><i><span style="color: #0000c0; font-family: Consolas; font-size: 10pt;">indexPageDescription</span></i><span style="font-family: Consolas; font-size: 10pt;"> = </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"My Project Description <br/> <b>Can include Full set of HTML Tags</b>"</span><span style="font-family: Consolas; font-size: 10pt;">;</span><span style="font-family: Consolas; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> }</span><span style="font-family: Consolas; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br />
<span style="font-family: Consolas; font-size: 10pt;">//Deprecated Methods</span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: #646464; font-family: Consolas; font-size: 10pt;">@Test</span><span style="font-family: Consolas; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">public</span></b><span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">void</span></b><span style="font-family: Consolas; font-size: 10pt;"> testME() {</span><span style="font-family: Consolas; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> setAuthorInfoForReports();</span><span style="font-family: Consolas; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> ATUReports.<i>add</i>(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"Step Desc"</span><span style="font-family: Consolas; font-size: 10pt;">, </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">false</span></b><span style="font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> ATUReports.<i>add</i>(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"Step Desc"</span><span style="font-family: Consolas; font-size: 10pt;">, </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"inputValue"</span><span style="font-family: Consolas; font-size: 10pt;">, </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">false</span></b><span style="font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> ATUReports.<i>add</i>(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"Step Desc"</span><span style="font-family: Consolas; font-size: 10pt;">, </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"expectedValue"</span><span style="font-family: Consolas; font-size: 10pt;">, </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"actualValue"</span><span style="font-family: Consolas; font-size: 10pt;">, </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">false</span></b><span style="font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> ATUReports.<i>add</i>(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"Step Desc"</span><span style="font-family: Consolas; font-size: 10pt;">, </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"inputValue"</span><span style="font-family: Consolas; font-size: 10pt;">, </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"expectedValue"</span><span style="font-family: Consolas; font-size: 10pt;">,</span><span style="font-family: Consolas; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10pt;">"actualValue"</span><span style="font-family: Consolas; font-size: 10pt;">, </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10pt;">false</span></b><span style="font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> }</span><br />
<br />
<br />
<span style="font-family: Consolas; font-size: 10pt;"> //New Way of Logging</span><!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
</o:OfficeDocumentSettings>
</xml><![endif]--><br />
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" DefPriority="99"
LatentStyleCount="267">
<w:LsdException Locked="false" Priority="0" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" Priority="39" Name="toc 1"/>
<w:LsdException Locked="false" Priority="39" Name="toc 2"/>
<w:LsdException Locked="false" Priority="39" Name="toc 3"/>
<w:LsdException Locked="false" Priority="39" Name="toc 4"/>
<w:LsdException Locked="false" Priority="39" Name="toc 5"/>
<w:LsdException Locked="false" Priority="39" Name="toc 6"/>
<w:LsdException Locked="false" Priority="39" Name="toc 7"/>
<w:LsdException Locked="false" Priority="39" Name="toc 8"/>
<w:LsdException Locked="false" Priority="39" Name="toc 9"/>
<w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
<w:LsdException Locked="false" Priority="10" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" Priority="11" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" Priority="22" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" Priority="20" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" Priority="59" SemiHidden="false"
UnhideWhenUsed="false" Name="Table Grid"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
</w:LatentStyles>
</xml><![endif]--><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin-top:0in;
mso-para-margin-right:0in;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0in;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
</style>
<![endif]-->
<br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: #646464; font-family: Consolas; font-size: 10.0pt;"> @Test</span><span style="font-family: Consolas; font-size: 10.0pt;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt;"><span style="mso-tab-count: 1;"> </span></span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">public</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">void</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt;"> testNewLogs() </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">throws</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt;"> AWTException,
IOException {</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span>ATUReports.<i>add</i>(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10.0pt;">"INfo
Step"</span><span style="color: black; font-family: Consolas; font-size: 10.0pt;">,
LogAs.</span><i><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt;">INFO</span></i><span style="color: black; font-family: Consolas; font-size: 10.0pt;">, </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">new</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt;"> CaptureScreen(</span><span style="font-family: Consolas; font-size: 10.0pt;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt;"><span style="mso-tab-count: 4;"> </span>ScreenshotOf.</span><i><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt;">BROWSER_PAGE</span></i><span style="color: black; font-family: Consolas; font-size: 10.0pt;">));</span><span style="font-family: Consolas; font-size: 10.0pt;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span>ATUReports.<i>add</i>(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10.0pt;">"Pass
Step"</span><span style="color: black; font-family: Consolas; font-size: 10.0pt;">,
LogAs.</span><i><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt;">PASSED</span></i><span style="color: black; font-family: Consolas; font-size: 10.0pt;">, </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">new</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt;"> CaptureScreen(</span><span style="font-family: Consolas; font-size: 10.0pt;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt;"><span style="mso-tab-count: 4;"> </span>ScreenshotOf.</span><i><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt;">DESKTOP</span></i><span style="color: black; font-family: Consolas; font-size: 10.0pt;">));</span><span style="font-family: Consolas; font-size: 10.0pt;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span>WebElement
element = </span><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt;">driver</span><span style="font-family: Consolas; font-size: 10.0pt;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt;"><span style="mso-tab-count: 4;"> </span>.findElement(By.<i>xpath</i>(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10.0pt;">"/html/body/div/h1/a"</span><span style="color: black; font-family: Consolas; font-size: 10.0pt;">));</span><span style="font-family: Consolas; font-size: 10.0pt;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span>ATUReports.<i>add</i>(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10.0pt;">"Warning
Step"</span><span style="color: black; font-family: Consolas; font-size: 10.0pt;">,
LogAs.</span><i><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt;">WARNING</span></i><span style="color: black; font-family: Consolas; font-size: 10.0pt;">,</span><span style="font-family: Consolas; font-size: 10.0pt;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt;"><span style="mso-tab-count: 4;"> </span></span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">new</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt;">
CaptureScreen(element));</span><span style="font-family: Consolas; font-size: 10.0pt;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt;"><span style="mso-tab-count: 2;"> </span>ATUReports.<i>add</i>(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10.0pt;">"Fail
step"</span><span style="color: black; font-family: Consolas; font-size: 10.0pt;">,
LogAs.</span><i><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt;">FAILED</span></i><span style="color: black; font-family: Consolas; font-size: 10.0pt;">, </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">new</span></b><span style="color: black; font-family: Consolas; font-size: 10.0pt;"> CaptureScreen(</span><span style="font-family: Consolas; font-size: 10.0pt;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: black; font-family: Consolas; font-size: 10.0pt;"><span style="mso-tab-count: 4;"> </span>ScreenshotOf.</span><i><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt;">DESKTOP</span></i><span style="color: black; font-family: Consolas; font-size: 10.0pt;">));</span><span style="font-family: Consolas; font-size: 10.0pt;"></span></div>
<div class="MsoNormal">
<span style="color: black; font-family: Consolas; font-size: 10.0pt; line-height: 115%;"><span style="mso-tab-count: 1;"> </span>}</span><span style="background: #EDEDED; color: black; font-family: "Tahoma","sans-serif"; font-size: 10.0pt; line-height: 115%;"></span></div>
<br />
</div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;">}</span><span style="font-family: Consolas; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
</div>
<div class="MsoNormal">
<br />
<br />
<h3>
Using The Listener in testng.xml File</h3>
<div>
Create a listener tag and add the Listener.</div>
<div>
<br /></div>
<div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: teal; font-family: Consolas; font-size: 10pt;"><?</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10pt;">xml</span><span style="font-family: Consolas; font-size: 10pt;"> <span style="color: #7f007f;">version</span>=<i><span style="color: #2a00ff;">"1.0"</span></i> <span style="color: #7f007f;">encoding</span>=<i><span style="color: #2a00ff;">"UTF-8"</span></i><span style="color: teal;">?></span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: teal; font-family: Consolas; font-size: 10pt;"><!</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10pt;">DOCTYPE</span><span style="font-family: Consolas; font-size: 10pt;"> <span style="color: teal;">suite</span> <span style="color: grey;">SYSTEM</span> <span style="color: #3f7f5f;">"http://testng.org/testng-1.0.dtd"</span><span style="color: teal;">></span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: teal; font-family: Consolas; font-size: 10pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10pt;">suite</span><span style="font-family: Consolas; font-size: 10pt;"> <span style="color: #7f007f;">name</span>=<i><span style="color: #2a00ff;">"Suite"</span></i> <span style="color: #7f007f;">parallel</span>=<i><u><span style="color: #2a00ff;">"none"</span></u></i><span style="color: teal;">></span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10pt;">test</span><span style="font-family: Consolas; font-size: 10pt;"> <span style="color: #7f007f;">name</span>=<i><span style="color: #2a00ff;">"Test"</span></i><span style="color: teal;">></span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10pt;">classes</span><span style="color: teal; font-family: Consolas; font-size: 10pt;">></span><span style="font-family: Consolas; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10pt;">class</span><span style="font-family: Consolas; font-size: 10pt;"> <span style="color: #7f007f;">name</span>=<i><span style="color: #2a00ff;">"com.testcases.TestNGScript"</span></i><span style="color: teal;">/></span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10pt;">class</span><span style="font-family: Consolas; font-size: 10pt;"> <span style="color: #7f007f;">name</span>=<i><span style="color: #2a00ff;">"com.testcases.WordPress"</span></i><span style="color: teal;">/></span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10pt;"></</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10pt;">classes</span><span style="color: teal; font-family: Consolas; font-size: 10pt;">></span><span style="font-family: Consolas; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10pt;"></</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10pt;">test</span><span style="color: teal; font-family: Consolas; font-size: 10pt;">></span><span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: #3f5fbf; font-family: Consolas; font-size: 10pt;"><!-- Test --></span><span style="font-family: Consolas; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10pt;">listeners</span><span style="color: teal; font-family: Consolas; font-size: 10pt;">></span><span style="font-family: Consolas; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10pt;">listener</span><span style="font-family: Consolas; font-size: 10pt;"> <span style="color: #7f007f;">class-name</span>=<i><span style="color: #2a00ff;">"atu.testng.reports.listeners.ATUReportsListener"</span></i><span style="color: teal;">></</span><span style="color: #3f7f7f;">listener</span><span style="color: teal;">></span><o:p></o:p></span><br />
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10pt;">listener</span><span style="font-family: Consolas; font-size: 10pt;"> <span style="color: #7f007f;">class-name</span>=<i><span style="color: #2a00ff;">"atu.testng.reports.listeners.</span></i></span><span style="background-color: white; font-family: Consolas; font-size: x-small;"><span style="color: blue;"><i>ConfigurationListener</i></span></span><span style="font-family: Consolas; font-size: 10pt;"><i><span style="color: #2a00ff;">"</span></i><span style="color: teal;">></</span><span style="color: #3f7f7f;">listener</span><span style="color: teal;">></span></span><br />
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10pt;">listener</span><span style="font-family: Consolas; font-size: 10pt;"> <span style="color: #7f007f;">class-name</span>=<i><span style="color: #2a00ff;">"atu.testng.reports.listeners.</span></i></span><span style="font-family: Consolas; font-size: x-small;"><i><span style="color: blue;">MethodListener</span></i></span><span style="font-family: Consolas; font-size: 10pt;"><i><span style="color: #2a00ff;">"</span></i><span style="color: teal;">></</span><span style="color: #3f7f7f;">listener</span><span style="color: teal;">></span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10pt;"></</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10pt;">listeners</span><span style="color: teal; font-family: Consolas; font-size: 10pt;">></span><span style="font-family: Consolas; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal">
<span style="color: teal; font-family: Consolas; font-size: 10pt; line-height: 14px;"></</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10pt; line-height: 14px;">suite</span><span style="color: teal; font-family: Consolas; font-size: 10pt; line-height: 14px;">></span><span style="font-family: Consolas; font-size: 10pt; line-height: 14px;"> </span><span style="color: #3f5fbf; font-family: Consolas; font-size: 10pt; line-height: 14px;"><!-- Suite --></span><o:p></o:p></div>
</div>
</div>
<div class="MsoNormal">
<o:p><br /></o:p>
<br />
<h3>
<o:p>Note: The Listener must be used Either in Test Script or testng.xml but not both. This will cause errors. </o:p></h3>
<div>
<o:p><br /></o:p></div>
<div>
<o:p><br /></o:p></div>
<div>
<o:p>Go To: <a href="http://automationtestingutilities.blogspot.in/2013/12/ATUReporterPart3.html" target="_blank">ATU Reporter Part 3</a> </o:p></div>
</div>
</div>
Automation Testerhttp://www.blogger.com/profile/15092944995388094312noreply@blogger.com195tag:blogger.com,1999:blog-8053515261740493219.post-29881481293978335862013-12-04T20:07:00.000-08:002013-12-04T20:25:46.993-08:00Selenium TestNG Excel Based Reports<div dir="ltr" style="text-align: left;" trbidi="on">
<i>This Post features the Next release of the ATU Reporter which can generate excel based reports for Selenium TestNG.</i><br />
<div>
<i><br /></i></div>
<div>
<i>to be Contd..</i><br />
<i><br /></i>
<span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">We love Automation; we love to keep its utilities Open Source. </span><br style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;" /><span style="background-color: white; color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;"> – Automation Testing Utilities</span></div>
</div>
Automation Testerhttp://www.blogger.com/profile/15092944995388094312noreply@blogger.com1tag:blogger.com,1999:blog-8053515261740493219.post-47555736654344913532013-11-15T20:41:00.000-08:002013-11-15T20:42:04.038-08:00Multi Browser Testing using Selenium TestNG<div dir="ltr" style="text-align: left;" trbidi="on">
This Section describes how to run your Test cases on different browsers.<br />
<br />
<b>Few Simple steps Using TestNG :)</b><br />
<br />
<b>Step 1: </b>Create your Script. Using TestNG annotations. Define parameters (using @Parameters) for taking input value i.e, which browser should be used for Running the Test<br />
<br />
<b>Step 2: </b>Create a TestNG XML for running your script<br />
<br />
<b>Step 3: </b>Configure the TestNG XML for passing parameters i.e, to tell which browser should be used for Running the Test<br />
<br />
<b>Step 4: </b>Run the TestNG XML which can pass the appropriate browser name to the Script such that the Test Case is executed in a specified browser<br />
<br />
<br />
Programatically this can be Done as follows:<br />
<br />
<b>Step 1:</b><br />
<b><br /></b>
<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">package</span></b><span style="font-family: Consolas; font-size: 10pt;"> atu.multibrowser;</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">import</span></b><span style="font-family: Consolas; font-size: 10pt;">
org.openqa.selenium.By;</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">import</span></b><span style="font-family: Consolas; font-size: 10pt;">
org.openqa.selenium.WebDriver;</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">import</span></b><span style="font-family: Consolas; font-size: 10pt;">
org.openqa.selenium.chrome.ChromeDriver;</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">import</span></b><span style="font-family: Consolas; font-size: 10pt;">
org.openqa.selenium.firefox.FirefoxDriver;</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">import</span></b><span style="font-family: Consolas; font-size: 10pt;">
org.openqa.selenium.ie.InternetExplorerDriver;</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">import</span></b><span style="font-family: Consolas; font-size: 10pt;">
org.testng.annotations.AfterClass;</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">import</span></b><span style="font-family: Consolas; font-size: 10pt;">
org.testng.annotations.BeforeClass;</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">import</span></b><span style="font-family: Consolas; font-size: 10pt;">
org.testng.annotations.Parameters;</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">import</span></b><span style="font-family: Consolas; font-size: 10pt;">
org.testng.annotations.Test;</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">public</span></b><span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">class</span></b><span style="font-family: Consolas; font-size: 10pt;"> MultiBrowserTest {</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">private</span></b><span style="font-family: Consolas; font-size: 10pt;"> WebDriver </span><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt;">driver</span><span style="font-family: Consolas; font-size: 10pt;">;</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: Consolas; font-size: 10.0pt;">// Configure for <u>multi</u>
browser drivers</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: #646464; font-family: Consolas; font-size: 10.0pt;">@Parameters</span><span style="font-family: Consolas; font-size: 10pt;">(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10.0pt;">"browser"</span><span style="font-family: Consolas; font-size: 10pt;">)</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: #646464; font-family: Consolas; font-size: 10.0pt;">@BeforeClass</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">public</span></b><span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">void</span></b><span style="font-family: Consolas; font-size: 10pt;"> beforeTest(String
browser) {</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">if</span></b><span style="font-family: Consolas; font-size: 10pt;">
(browser.equalsIgnoreCase(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10.0pt;">"firefox"</span><span style="font-family: Consolas; font-size: 10pt;">)) {</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt;">driver</span><span style="font-family: Consolas; font-size: 10pt;"> = </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">new</span></b><span style="font-family: Consolas; font-size: 10pt;"> FirefoxDriver();</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> }
</span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">else</span></b><span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">if</span></b><span style="font-family: Consolas; font-size: 10pt;">
(browser.equalsIgnoreCase(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10.0pt;">"chrome"</span><span style="font-family: Consolas; font-size: 10pt;">)) {</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: Consolas; font-size: 10.0pt;">// Set Path for the
executable file</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> System.<i>setProperty</i>(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10.0pt;">"webdriver.chrome.driver"</span><span style="font-family: Consolas; font-size: 10pt;">,</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10.0pt;">"D:\\chromedriver.exe"</span><span style="font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt;">driver</span><span style="font-family: Consolas; font-size: 10pt;"> = </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">new</span></b><span style="font-family: Consolas; font-size: 10pt;"> ChromeDriver();</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> }
</span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">else</span></b><span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">if</span></b><span style="font-family: Consolas; font-size: 10pt;">
(browser.equalsIgnoreCase(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10.0pt;">"ie"</span><span style="font-family: Consolas; font-size: 10pt;">)) {</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: Consolas; font-size: 10.0pt;">// Set Path for the
executable file</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> System.<i>setProperty</i>(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10.0pt;">"webdriver.ie.driver"</span><span style="font-family: Consolas; font-size: 10pt;">, </span><span style="color: #2a00ff; font-family: Consolas; font-size: 10.0pt;">"D:\\IEDriverServer.exe"</span><span style="font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt;">driver</span><span style="font-family: Consolas; font-size: 10pt;"> = </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">new</span></b><span style="font-family: Consolas; font-size: 10pt;">
InternetExplorerDriver();</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> }
</span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">else</span></b><span style="font-family: Consolas; font-size: 10pt;"> {</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">throw</span></b><span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">new</span></b><span style="font-family: Consolas; font-size: 10pt;">
IllegalArgumentException(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10.0pt;">"The Browser Type is Undefined"</span><span style="font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> }</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: Consolas; font-size: 10.0pt;">// Open <u>App</u></span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt;">driver</span><span style="font-family: Consolas; font-size: 10pt;">.get(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10.0pt;">"http://demo.opensourcecms.com/wordpress/wp-login.php"</span><span style="font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> }</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: #646464; font-family: Consolas; font-size: 10.0pt;">@Test</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">public</span></b><span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">void</span></b><span style="font-family: Consolas; font-size: 10pt;"> login() </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">throws</span></b><span style="font-family: Consolas; font-size: 10pt;"> InterruptedException
{</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: Consolas; font-size: 10.0pt;">// Enter UserName</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt;">driver</span><span style="font-family: Consolas; font-size: 10pt;">.findElement(By.<i>id</i>(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10.0pt;">"user_login"</span><span style="font-family: Consolas; font-size: 10pt;">)).clear();</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt;">driver</span><span style="font-family: Consolas; font-size: 10pt;">.findElement(By.<i>id</i>(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10.0pt;">"user_login"</span><span style="font-family: Consolas; font-size: 10pt;">)).sendKeys(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10.0pt;">"admin"</span><span style="font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: Consolas; font-size: 10.0pt;">// Enter Password</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt;">driver</span><span style="font-family: Consolas; font-size: 10pt;">.findElement(By.<i>id</i>(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10.0pt;">"user_pass"</span><span style="font-family: Consolas; font-size: 10pt;">)).clear();</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt;">driver</span><span style="font-family: Consolas; font-size: 10pt;">.findElement(By.<i>id</i>(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10.0pt;">"user_pass"</span><span style="font-family: Consolas; font-size: 10pt;">)).sendKeys(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10.0pt;">"demo123"</span><span style="font-family: Consolas; font-size: 10pt;">);</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: #3f7f5f; font-family: Consolas; font-size: 10.0pt;">// Click on Submit
button</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt;">driver</span><span style="font-family: Consolas; font-size: 10pt;">.findElement(By.<i>id</i>(</span><span style="color: #2a00ff; font-family: Consolas; font-size: 10.0pt;">"wp-submit"</span><span style="font-family: Consolas; font-size: 10pt;">)).submit();</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> }</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: #646464; font-family: Consolas; font-size: 10.0pt;">@AfterClass</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">public</span></b><span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">void</span></b><span style="font-family: Consolas; font-size: 10pt;"> afterTest() {</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">try</span></b><span style="font-family: Consolas; font-size: 10pt;"> {</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt;">driver</span><span style="font-family: Consolas; font-size: 10pt;">.quit();</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> }
</span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">catch</span></b><span style="font-family: Consolas; font-size: 10pt;"> (Exception e) {</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: #0000c0; font-family: Consolas; font-size: 10.0pt;">driver</span><span style="font-family: Consolas; font-size: 10pt;"> = </span><b><span style="color: #7f0055; font-family: Consolas; font-size: 10.0pt;">null</span></b><span style="font-family: Consolas; font-size: 10pt;">;</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> }</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> }</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;">}</span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<br />
<div class="MsoNormal">
<br /></div>
<br />
<br />
<b>Step 2 & Step 3: </b>The below XML is configured to run the Test Case in Firefox, Chrome and IE browser in sequential manner<br />
<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><?</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">xml</span><span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">version</span>=<i><span style="color: #2a00ff;">"1.0"</span></i>
<span style="color: #7f007f;">encoding</span>=<i><span style="color: #2a00ff;">"UTF-8"</span></i><span style="color: teal;">?></span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><!</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">DOCTYPE</span><span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: teal;">suite</span>
<span style="color: grey;">SYSTEM</span> <span style="color: #3f7f5f;">"http://testng.org/testng-1.0.dtd"</span><span style="color: teal;">></span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">suite</span><span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">name</span>=<i><span style="color: #2a00ff;">"Suite"</span></i>
<span style="color: #7f007f;">parallel</span>=<i><u><span style="color: #2a00ff;">"none"</span></u></i><span style="color: teal;">></span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">test</span><span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">name</span>=<i><span style="color: #2a00ff;">"FirefoxTest"</span></i><span style="color: teal;">></span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">parameter</span><span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">name</span>=<i><span style="color: #2a00ff;">"browser"</span></i>
<span style="color: #7f007f;">value</span>=<i><span style="color: #2a00ff;">"firefox"</span></i> <span style="color: teal;">/></span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">classes</span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;">></span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">class</span><span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">name</span>=<i><span style="color: #2a00ff;">"atu.multibrowser.MultiBrowserTest"</span></i>
<span style="color: teal;">/></span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"></</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">classes</span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;">></span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"></</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">test</span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;">></span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">test</span><span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">name</span>=<i><span style="color: #2a00ff;">"ChromeTest"</span></i><span style="color: teal;">></span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">parameter</span><span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">name</span>=<i><span style="color: #2a00ff;">"browser"</span></i>
<span style="color: #7f007f;">value</span>=<i><span style="color: #2a00ff;">"chrome"</span></i> <span style="color: teal;">/></span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">classes</span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;">></span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">class</span><span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">name</span>=<i><span style="color: #2a00ff;">"atu.multibrowser.MultiBrowserTest"</span></i>
<span style="color: teal;">/></span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"></</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">classes</span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;">></span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"></</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">test</span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;">></span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">test</span><span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">name</span>=<i><span style="color: #2a00ff;">"IETest"</span></i><span style="color: teal;">></span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">parameter</span><span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">name</span>=<i><span style="color: #2a00ff;">"browser"</span></i>
<span style="color: #7f007f;">value</span>=<i><span style="color: #2a00ff;">"ie"</span></i> <span style="color: teal;">/></span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">classes</span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;">></span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">class</span><span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">name</span>=<i><span style="color: #2a00ff;">"atu.multibrowser.MultiBrowserTest"</span></i>
<span style="color: teal;">/></span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"></</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">classes</span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;">></span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"></</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">test</span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;">></span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: teal; font-family: Consolas; font-size: 10.0pt;"></</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">suite</span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;">></span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<br />
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<o:p><br /></o:p></div>
<div class="MsoNormal">
<o:p><b>Step 4:</b></o:p></div>
<div class="MsoNormal">
<o:p><b><br /></b></o:p></div>
<div class="MsoNormal">
<o:p>Run the above XML as TestNG Suite from Eclipse IDE as shown below.</o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br />
<o:p></o:p></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhyw-2cubFHpIsZi-UYTg7WXSCRcHaCDjgFV-ARBMMX_EkAmg3LUO3bIEu2whbTri2OuI7jqNoatN3awRJ1-hG777WBX-98Mat_-8gdYXRZHbhji8DIZmCSSrrXfD6V_KZ80ug_OP6rHg/s1600/multi+browser.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhyw-2cubFHpIsZi-UYTg7WXSCRcHaCDjgFV-ARBMMX_EkAmg3LUO3bIEu2whbTri2OuI7jqNoatN3awRJ1-hG777WBX-98Mat_-8gdYXRZHbhji8DIZmCSSrrXfD6V_KZ80ug_OP6rHg/s1600/multi+browser.jpg" height="300" width="320" /></a></div>
<br />
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
/***********************************************************************/</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Enhancing your TestNG xml for running the Test Case on Different browsers Simultaneously. Speeding up the execution process :)</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Using the feature provided by TestNG for Parallel Executions. Set the<b>"parallel"</b> attribute to <b>"tests" </b>so that the all the three browser tests can be executed Simultaneously.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><?</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">xml</span><span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">version</span>=<i><span style="color: #2a00ff;">"1.0"</span></i>
<span style="color: #7f007f;">encoding</span>=<i><span style="color: #2a00ff;">"UTF-8"</span></i><span style="color: teal;">?></span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><!</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">DOCTYPE</span><span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: teal;">suite</span>
<span style="color: grey;">SYSTEM</span> <span style="color: #3f7f5f;">"http://testng.org/testng-1.0.dtd"</span><span style="color: teal;">></span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10.0pt;"><span style="color: teal;"><br /></span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: teal; font-family: Consolas; font-size: x-small;"><!--Change The Parallel attribute</span><span style="color: teal; font-family: Consolas; font-size: x-small;"> for parallel Execution--></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">suite</span> <span style="color: #7f007f; font-family: Consolas; font-size: 10pt;">name</span><span style="font-family: Consolas; font-size: x-small;">=</span><i style="font-family: Consolas; font-size: 10pt;"><span style="color: #2a00ff;">"Suite"</span></i>
<b style="font-family: Consolas; font-size: 10pt;"><span style="color: #7f007f;">parallel</span>=<i><span style="color: #2a00ff;">"tests"</span></i></b><span style="color: teal; font-family: Consolas; font-size: x-small;">></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">test</span><span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">name</span>=<i><span style="color: #2a00ff;">"FirefoxTest"</span></i><span style="color: teal;">></span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">parameter</span><span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">name</span>=<i><span style="color: #2a00ff;">"browser"</span></i>
<span style="color: #7f007f;">value</span>=<i><span style="color: #2a00ff;">"firefox"</span></i> <span style="color: teal;">/></span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">classes</span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;">></span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">class</span><span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">name</span>=<i><span style="color: #2a00ff;">"atu.multibrowser.MultiBrowserTest"</span></i>
<span style="color: teal;">/></span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"></</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">classes</span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;">></span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"></</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">test</span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;">></span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">test</span><span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">name</span>=<i><span style="color: #2a00ff;">"ChromeTest"</span></i><span style="color: teal;">></span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">parameter</span><span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">name</span>=<i><span style="color: #2a00ff;">"browser"</span></i>
<span style="color: #7f007f;">value</span>=<i><span style="color: #2a00ff;">"chrome"</span></i> <span style="color: teal;">/></span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">classes</span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;">></span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">class</span><span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">name</span>=<i><span style="color: #2a00ff;">"atu.multibrowser.MultiBrowserTest"</span></i>
<span style="color: teal;">/></span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"></</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">classes</span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;">></span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"></</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">test</span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;">></span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">test</span><span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">name</span>=<i><span style="color: #2a00ff;">"IETest"</span></i><span style="color: teal;">></span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">parameter</span><span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">name</span>=<i><span style="color: #2a00ff;">"browser"</span></i>
<span style="color: #7f007f;">value</span>=<i><span style="color: #2a00ff;">"ie"</span></i> <span style="color: teal;">/></span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">classes</span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;">></span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"><</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">class</span><span style="font-family: Consolas; font-size: 10.0pt;"> <span style="color: #7f007f;">name</span>=<i><span style="color: #2a00ff;">"atu.multibrowser.MultiBrowserTest"</span></i>
<span style="color: teal;">/></span><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"></</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">classes</span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;">></span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Consolas; font-size: 10pt;"> </span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;"></</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">test</span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;">></span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="color: teal; font-family: Consolas; font-size: 10.0pt;"></</span><span style="color: #3f7f7f; font-family: Consolas; font-size: 10.0pt;">suite</span><span style="color: teal; font-family: Consolas; font-size: 10.0pt;">></span><span style="font-family: Consolas; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<o:p><br /></o:p></div>
<div class="MsoNormal">
This is one short and quick way of setting up Multiple Browser Testing :)</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<a href="https://drive.google.com/file/d/0B7rZvkq9tkwPa05TYU1BUXQ3aVk/edit?usp=sharing" target="_blank">Download the Sample Project</a></div>
</div>
Automation Testerhttp://www.blogger.com/profile/15092944995388094312noreply@blogger.com59tag:blogger.com,1999:blog-8053515261740493219.post-44565412909867719352013-05-11T23:10:00.001-07:002013-12-04T20:11:38.182-08:00Know the Utilities<div dir="ltr" style="text-align: left;" trbidi="on">
Hello there... :)<br />
<br />
The Utilities that are described in this blog are all Open Source Projects.<br />
You are free to request new features, We will try to incorporate it in the upcoming releases.<br />
<br />
Currently we are actively involved in developing the list of following Utilities<br />
<br />
<ul style="text-align: left;">
<li>Keyword Driven Framework [for Selenium]</li>
<li>Selenium Object Bank [An Object Repository Utility for Selenium]</li>
<li>Data Driven Framework [for Selenium and any Other Java Based Automation tool like, RFT, OATS etc..]</li>
<li>Selenium Integration with QC / ALM [for Selenium and any Other Java Based Automation tool like, RFT, OATS etc..]</li>
<li>Selenium Utility API - A Collection of Re usable Functions</li>
<ul>
<li>WebTable API - <i>The First Utility</i></li>
<li>Handling Windows Dialogs - <i>The Second Utility</i></li>
<li>Execution Recoder - <i>The Third Utility [under dev...]</i></li>
</ul>
<li>Customized Graphical Reporting for Selenium using TestNG Framework</li>
<ul>
<li>HTML Reports with Graphical Charts</li>
<li>Excel Reports - <i>[Under Dev]</i></li>
</ul>
</ul>
<br />
Fun learning posts :)<br />
<ul style="text-align: left;">
<li><a href="http://automationtestingutilities.blogspot.in/2013/11/multi-browser-testing-using-selenium.html" target="_blank">Multi Browser Testing</a></li>
</ul>
<br />
<br />
Many more utilities will be coming followed by these... Hope you will like it :)<br />
<br />
<br />
Thanks<br />
Automation Testing Utilities</div>
Automation Testerhttp://www.blogger.com/profile/15092944995388094312noreply@blogger.com3tag:blogger.com,1999:blog-8053515261740493219.post-36675286679066207712013-03-17T02:44:00.003-07:002014-03-01T02:14:03.731-08:00What is Model Based Testing?<div dir="ltr" style="text-align: left;" trbidi="on">
<h3 style="text-align: justify;">
<span style="font-family: Arial,Helvetica,sans-serif;">A new paradigm for manual and automated functional testing.</span></h3>
<h3 style="text-align: justify;">
<span style="font-family: Arial,Helvetica,sans-serif;"> </span></h3>
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-size: small;">Testing is an essential, but time and
resource consuming activity in the software
development process. Generating a short, but effective test suite usually
needs a lot of
manual work and expert knowledge. In a model-based process, among other <span style="font-size: small;">sub-tasks</span>,
test construction and test execution can be automated.</span></span><br />
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span>
<br />
<h3 style="text-align: justify;">
<span style="font-family: Arial,Helvetica,sans-serif;">What is Model Based Testing?</span></h3>
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-size: small;">Model based testing is a black box testing technique where run
time behavior of a software under test is checked against predictions
made by a formal specification or model. In other means, it describes
how system behaves in response to an action ( determined by a model).
Supply action ,and see, if the system responds as per the expectation.</span></span><br />
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span>
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-size: small;">Testers construct mental models anyway during their testing. Those
mental models can be transformed to models on paper. This helps testers
to achieve readability and re-usability.</span></span><br />
<span style="font-family: Arial,Helvetica,sans-serif;"><br /></span>
<br />
<h4>
<span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-size: small;">What are the advantages of Model based T<span style="font-size: small;">esting</span>? </span></span></h4>
<ul>
<li><span style="font-family: Arial,Helvetica,sans-serif;">
Easy test case/suite maintenance</span></li>
<li><span style="font-family: Arial,Helvetica,sans-serif;">
Reduction in Cost</span></li>
<li><span style="font-family: Arial,Helvetica,sans-serif;">
Improved Test Coverage</span></li>
<li><span style="font-family: Arial,Helvetica,sans-serif;">
Can run different tests on n number of machines</span></li>
<li><span style="font-family: Arial,Helvetica,sans-serif;">
Early defect detection</span></li>
<li><span style="font-family: Arial,Helvetica,sans-serif;">
Increase in defect count</span></li>
<li><span style="font-family: Arial,Helvetica,sans-serif;">
Time savings</span></li>
<li><span style="font-family: Arial,Helvetica,sans-serif;">
Improved tester job satisfaction</span></li>
</ul>
</div>
Automation Testerhttp://www.blogger.com/profile/15092944995388094312noreply@blogger.com0tag:blogger.com,1999:blog-8053515261740493219.post-24631062262155042542013-02-20T07:52:00.003-08:002013-03-02T20:10:39.011-08:00About the Blog<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
</div>
<div style="text-align: justify;">
<h2>
<span style="color: #666666;"><i><br /></i></span></h2>
<h2>
<span style="background-color: #eeeeee;">
<span style="font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;">Worried about Automation Testing ??</span></span></h2>
<h3>
<span style="background-color: #f3f3f3;"><span style="color: #666666;"><span style="background-color: #eeeeee;"></span></span></span></h3>
<h3>
<span style="background-color: #f3f3f3;"><span style="color: #666666;"><span style="background-color: #eeeeee;"></span></span></span></h3>
<h3>
<span style="background-color: #f3f3f3;"><span style="color: #666666;"><span style="background-color: #eeeeee;"><span style="background-color: #cccccc;"></span></span></span></span></h3>
</div>
<div style="text-align: justify;">
<span style="background-color: white; font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; line-height: 14px; text-align: justify;">Don’t panic!! For all those people out there who are worried about automation testing tools and related challenges, here is something that might help you. This blog would definitely make some benefit to you. </span></div>
<div style="text-align: justify;">
<span style="background-color: white; font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; line-height: 14px; text-align: justify;"><br /></span>
<span id=".reactRoot[49].[1][2][1]{comment159728100848334_159728170848327}.0.[1].0.[1].0.[0].[0][2].0.[0]" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; line-height: 14px; text-align: justify;"><span id=".reactRoot[49].[1][2][1]{comment159728100848334_159728170848327}.0.[1].0.[1].0.[0].[0][2].0.[0].[7]">Here,</span></span><span id=".reactRoot[49].[1][2][1]{comment159728100848334_159728170848327}.0.[1].0.[1].0.[0].[0][2].0.[3]" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; line-height: 14px; text-align: justify;"><span id=".reactRoot[49].[1][2][1]{comment159728100848334_159728170848327}.0.[1].0.[1].0.[0].[0][2].0.[3].0"><span id=".reactRoot[49].[1][2][1]{comment159728100848334_159728170848327}.0.[1].0.[1].0.[0].[0][2].0.[3].0.[0]"> you will find various utilities that are generally used in automation testing. We provide you with different frameworks used in our day to day work life. In addition to the frameworks, we would also include the process of integrating different tools to construct a complete testing package. Hope you all will enjoy it. </span></span></span></div>
<div style="text-align: justify;">
<span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; line-height: 14px; text-align: justify;"><span style="background-color: white;"><br /></span></span>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span id=".reactRoot[49].[1][2][1]{comment159728100848334_159728170848327}.0.[1].0.[1].0.[0].[0][2].0.[0]" style="background-color: white; line-height: 14px;">
</span><span id=".reactRoot[49].[1][2][1]{comment159728100848334_159728170848327}.0.[1].0.[1].0.[0].[0][2].0.[3]"></span></span></div>
<div style="text-align: justify;">
<div style="text-align: justify;">
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span id=".reactRoot[49].[1][2][1]{comment159728100848334_159728170848327}.0.[1].0.[1].0.[0].[0][2].0.[3]"><span style="background-color: white; line-height: 14px;">That’s all for now. Stay tuned. Lot’s coming up :) !! </span></span></span></div>
<span style="color: #666666;"><i><span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span id=".reactRoot[49].[1][2][1]{comment159728100848334_159728170848327}.0.[1].0.[1].0.[0].[0][2].0.[3]"><br /></span></span></i></span></div>
<span style="color: #666666;"><i><span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span id=".reactRoot[49].[1][2][1]{comment159728100848334_159728170848327}.0.[1].0.[1].0.[0].[0][2].0.[3]">
</span></span></i></span>
<br />
<div style="text-align: left;">
<h2 style="text-align: left;">
<span style="background-color: #eeeeee;"><span style="font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;">The Rise of The Blog</span></span></h2>
<div style="text-align: justify;">
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span style="background-color: #edeff4;"></span><span id=".reactRoot[49].[1][2][1]{comment159728100848334_159728170848327}.0.[1].0.[1].0.[0].[0][2].0.[3].0.[9]" style="line-height: 14px;"><span style="background-color: white;">We are a group of ardent people working in the field of automation testing. This blog was primarily created for those people who do not have the knowledge of programming and need to develop assets for automation. You can use the frameworks embedded here to perform the testing activities. However, it is not restricted to the novice members but also to the others wherein they can use these contents as examples for developing their own frameworks</span><span style="background-color: white;">.</span></span></span></div>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span style="background-color: #edeff4;"><span id=".reactRoot[49].[1][2][1]{comment159728100848334_159728170848327}.0.[1].0.[1].0.[0].[0][2].0.[3].0.[9]" style="line-height: 14px;">
</span></span></span></div>
</div>
Automation Testerhttp://www.blogger.com/profile/15092944995388094312noreply@blogger.com0