tag:blogger.com,1999:blog-57891366380331631542024-03-13T14:02:44.434-07:00Getting Started with JMeter ,Selenium RC,WebDriverThis blog comprises of learning to get started with Open source automation tools.
Mentions best practices of Agile,Xtreme Programming
Selenium In nutshell.Shabanahttp://www.blogger.com/profile/13859572556639838691noreply@blogger.comBlogger49125tag:blogger.com,1999:blog-5789136638033163154.post-53836154461195060992015-05-29T08:23:00.002-07:002015-05-29T08:42:15.009-07:00Building a Nested JSON using HTTPBuilder in Groovy
Here is an example of how to pass a JSON that is nested with a HTTPBuilder
<pre class="prettyprint">
private def getWorkingLatitude(String additionalInfo)
{
def json = new JsonBuilder()
json {
"jobId" additionalInfo
"phoneList"{
"mobilePhone" "0123469521"
"homePhone" "01235698470"
}
}
return json;
}
</pre>
Here is how you wrap it with HTTPBuilder
<pre class = "prettyprint">
HTTP_BUILDER.request(Method.PUT, ContentType.JSON){
headers.'Authorization' = "Bearer "+ ACCESS_TOKEN_TM
uri.path = JOB_URI_PREFIX +USER_ID_TM+"/reject"
println "uri job is : "+uri.path
body = json.toString()
}
</pre>Shabanahttp://www.blogger.com/profile/13859572556639838691noreply@blogger.com1tag:blogger.com,1999:blog-5789136638033163154.post-70014470664243533962015-05-29T07:57:00.001-07:002015-05-29T07:57:11.184-07:00How to disable and enable behaviour driven tests in SpockI wanted to disable Spock Tests
Adding @Ignore Annotation above the Test will not execute the test you may also add at Class Level Tests
Shabanahttp://www.blogger.com/profile/13859572556639838691noreply@blogger.com0tag:blogger.com,1999:blog-5789136638033163154.post-43333798667372255312013-02-25T07:39:00.003-08:002013-02-25T07:41:40.050-08:00Selenium WebDriver and Sikuli <br>With Introduction of more & more gadgets ,HTML5, Flash objects and many more technologies to come in near future </br>
<br>It often becomes annoying when you can't incorporate those in your test suite for some weird reason</br>
<br>I was assigned a Microsoft DX Project as most of you are aware those annoying Lookup's which you can't even know what objects you are going to work with.</br>
<br>In traversing through the DOM.Which is crucial for WebDriver/Selenium RC</br>
<br>Here's how i dealt with it by implementing sikuli within my webDriver scripts</br>
<b><br>What/Why is Sikuli now ?</br>
<br>Sikuli Script automates anything you see on the screen. It uses image recognition to identify and control GUI components. </br>
<br>It is useful when there is no easy access to a GUI's internal or source code so that you interact with it or complex flash objects list the is not limited to only these many more cross browser,operating system compatible</br> </b>
<br>Download the latest version based on your Operating System from <a>http://www.sikuli.org/download.html </a></br>
<br>For windows here are steps with Pre-requisites & installation :</br>
<br>Only 32-bit version is provided. But this version should run on both 32-bit and 64-bit Windows systems. </br>
<b><br>Prerequisites: </br></b>
<br>1. Make sure you have installed the official Sun Java 6 JRE 32-bit version (Java 7 or 64-bit are not supported).</br>
<br>2. Make sure you have uninstalled all previous versions of Sikuli (especially 0.10.x versions).</br>
<br>3. Make sure you have restarted your system after you installed JRE and uninstalled old Sikuli installations.</br>
<b><br>Installation Steps:</br></b>
<br>1. Download and install Sikuli using the self-extracting installer: Sikuli-X-1.0rc3 (r905)-win32.exe.</br>
<br> After installation is completed, a folder named Sikuli X should be created on your system.</br>
<br>2. Do not start using Sikuli X now because it has some bugs.</br>
<br>3. Download the following zip file: Sikuli X r930. This contains important bug fixes</br>
<br>4. Open the downloaded zip file and locate the folder called SIKULI-IDE.</br>
<br>5. Copy the content in SIKULI-IDE to Sikuli X. The purpose of this step is to replace the files associated with r905 (the buggy version) </br>
<br>by the files associated with r930 that has the most recent bug fixes.</br>
<br></br>
<br>After all the above steps you should be able to see sikuli installed in your All programs or whereever you have installed</br>
<br>Now,Let's get started launching Sikuli if you've installed in your All Programs > Sikuli X > Sikuli IDE </br>
<br>Sikuli IDE Editor will be launched - Just, like the one shown in below screen shot</br>
<br><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjKQHyEa-3z66WphoLcDMSbVNGaxpCT1SxtIcjamtJWA8-75HPAFawNbvVrJzFvMW-lKxjxt4a-P5mlkbmuoj3cf0wCguAJ_Oqs4BeX07mJkfH6utAfs7t9bE5gBKRC819gwKv0sS3x2Pw/s1600/sikuliIDE.bmp" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjKQHyEa-3z66WphoLcDMSbVNGaxpCT1SxtIcjamtJWA8-75HPAFawNbvVrJzFvMW-lKxjxt4a-P5mlkbmuoj3cf0wCguAJ_Oqs4BeX07mJkfH6utAfs7t9bE5gBKRC819gwKv0sS3x2Pw/s320/sikuliIDE.bmp" /></a></br>
<br>On the left hand side of the IDE you see different commands available on the right side is where you would see commands copied</br>
<br>Below is an example with some random click an object on the web page,find a object on the web page ,doubleClick an object on the webpage</br>
<br><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhs71W13fAZC05VEtmam62RabrTO5aVXnHl844qGjhWZVaS9_fNI6da7E4ma5-EZHGzCY0xx9p0E1IhPUGgnuEjI8t6-2ZjNDkBt6bsRQflfjFJUiaBxjFDpQe0di0MkpJmFZb5To2eY4Sh/s1600/sikuliscript.bmp" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhs71W13fAZC05VEtmam62RabrTO5aVXnHl844qGjhWZVaS9_fNI6da7E4ma5-EZHGzCY0xx9p0E1IhPUGgnuEjI8t6-2ZjNDkBt6bsRQflfjFJUiaBxjFDpQe0di0MkpJmFZb5To2eY4Sh/s320/sikuliscript.bmp" /></a></br>
<br>You can build as complex a script as you want.</br>
<br></br>
<br>An amazing feature Sikuli has to offer other than being open source and matching images is that one can use <b>Sikuli features in your Java program</b> through the <b>Sikuli Script Java API </b></br>
<br>Here's are steps how you add Sikuli API to your existing library</br>
<br>I am using Eclipse IDE so steps mentioned will be what needs to be done with Eclipse</br>
<br><b>How do i add the jar to eclipse ?</b></br>
<br><b>Right click on your project > Build Path > Configure Build Path</b></br>
<br>Now that you see a popup with Properties to Java Build</br>
<br><b>Click on the Libraries tab</b> then click on <b>Add External Jars</b></br>
<br><b>Add sikuli-api-1.0.2-standalone.jar that you have downloaded earlier</b></br>
<br><b><pre>
import org.sikuli.script.FindFailed;
import org.sikuli.script.Screen;
public class SomeTest
{
public static Screen screen;
@BeforeClass
public static void setUp()
{
System.setProperty("webdriver.ie.driver", "C:\\Eclipse\\Selenium\\IEDriverServer.exe");
screen = new Screen();
}
public void popUp() throws FindFailed, InterruptedException
{
screen.exists("C:\LookupRecords.png", 10); //here you will specify the location of your image file
Thread.sleep(10);
screen.click("C:\\OK.png",0); //here you will specify the location of your image file
}
@Test
public void someSikulitest()
{
// do something ...
// call the above method
popUp();
}
@AfterClass
public static void tearDown()
{
driver.close();
driver.quit();
}
}</b>
</pre></br>
<br>feel free to let me know how it goes , your comments are valuable</br>
<br></br>
<br></br>
Shabanahttp://www.blogger.com/profile/13859572556639838691noreply@blogger.com1tag:blogger.com,1999:blog-5789136638033163154.post-17314188395724159352013-02-19T06:07:00.003-08:002013-02-19T06:52:13.657-08:00Selenium WebDriver and AutoIT<br>It is often possible in this web world that we get to work with objects which is either out of box,flash or webpages that are added with extra layer of security like a single sign-on for example windows credentials</br>
<br>Also another example is if one works with Microsoft technologies or Oracle CRM Web Applications which are only compatible with IE browsers there LOV(List of Values) popup , not to forget the modal popup </br>
<b><br>In the above situations it's hard to achieve or progress with automation with Selenium RC/Selenium WebDriver </br></b>
<br>Hence the simplest and fairly easy option is AutoIT</br>
<b><br>What is AutoIt ?</br></b>
<br>AutoIt v3 is a freeware BASIC-like scripting language designed for automating the Windows GUI and general scripting. It uses a combination of simulated keystrokes, mouse movement and window/control manipulation in order to automate tasks in a way not possible or reliable with other languages (e.g. VBScript and SendKeys). AutoIt is also very small, self-contained and will run on all versions of Windows out-of-the-box with no annoying "runtimes" required! </br>
<br>Let's get started with having AutoIt installed on your local box</br>
<br>Download latest version of AutoIt from the official release page here
<a href="http://autoitscript.com/site/autoit/downloads/"></a>
</br>
<br>It's better you download AutoIt Full Installation which will help you in scripting & compiling as well</br>
<br>Once installation is completed you should see the application being installed in your All Programs or which ever location you have installed</br>
<br>Now, let's get started - What is that we are trying to automate or use AutoIt for</br>
<br>Given this Scenario : Of Logging in the windows Authentication to your webapplication</br>
<br>Just like the below screen shot</br>
<br><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEieY2bKRCR4AWR8WIZSCTC1S-DL05SPt0a0a2OfRL4_BrhA3mwHTf_DJyg2iezaj8AuNNCW6cL-t7Ry8iYdfo4slRQrLzalrco0pDDDcnBFnjSNZjIpJw7gTcztVatx_FelOb3azkFGhlBT/s1600/Authenticationllookup.bmp" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEieY2bKRCR4AWR8WIZSCTC1S-DL05SPt0a0a2OfRL4_BrhA3mwHTf_DJyg2iezaj8AuNNCW6cL-t7Ry8iYdfo4slRQrLzalrco0pDDDcnBFnjSNZjIpJw7gTcztVatx_FelOb3azkFGhlBT/s320/Authenticationllookup.bmp" /></a></br>
<br>Now that is quiet a common to have a windows authentication if it's a product built by Microsoft themselves ;) </br>
<br>Here is how the AutoIt Script should look</br>
<div class="frame">
<pre>
<br><b>
<i>
WinWaitActive("Connect to yourservername","","60")
If WinExists("Connect to yourservername") Then
ControlSend("Connect to yourservername","", "[CLASS:Edit; INSTANCE:2]","DomainName\username")
ControlSend("Connect to yourservername","", "[CLASS:Edit; INSTANCE:3]","Password")
ControlClick("Connect to yourservername","","[CLASS:Button; INSTANCE:3,button[,clicks[,153[,223]]]]")
EndIf
</i></b></br>
</pre>
</div>
<br>Once you have the above script compiled - You are all ready to use them in your webDriver / selenium RC script </br>
<br>I assume it should be able to work with both .Net & Java </br>
<br>For now i have just tried only on with WebDriver Java Bindings </br>
<br>So here's the code that goes in your webDriver script</br>
<div class="frame">
<pre><br><b><i>
@BeforeClass
public static void setUp()
{
System.setProperty("webdriver.ie.driver", "C:\\Eclipse\\Selenium\\IEDriverServer.exe");
driver = new InternetExplorerDriver();
driver.get("your url");
try {
Runtime.getRuntime().exec("C:\\Eclipse\\Selenium\\Autentication.exe");
} catch (IOException e)
{
e.printStackTrace();
}
}</i></b></pre></div>
<br>You are all set now : both the code snippets together should help in working on Windows Authentication</br>
<br>If you are keen on learning about how & when should i use working on Image recognition</br>
<br>Read my next post on using Sikuli for doing the same functionality or different scenario</br>Shabanahttp://www.blogger.com/profile/13859572556639838691noreply@blogger.com0tag:blogger.com,1999:blog-5789136638033163154.post-15650436700709774352012-12-27T10:09:00.001-08:002013-02-12T06:16:07.492-08:00NTLM authentication aka Windows Authentication - JMeter<br>Recently was given an application with Windows Authentication that i had to create performance test scripts using JMeter as a tool.</br>
<br><b>Microsoft CRM Dynamics</b> in itself is a complex system adding lengthy scenarios for performance testing would make it worse if you can't quickly get going recording, Hence i went ahead recording the scipts</br>
<br><b>Follow the usual steps of setting up Proxy Server & Overriding any group policy set : </b></br>
<br>1. Create a New Test Plan</br>
<br>2. Right Click on WorkBench Click on Non Test Elements >HTTP Proxy Elements Just like shown below</br>
<br><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhW_bwvoneKRwqcBCsehiY7Puvcmhvoaed0mJWbeH_KQOFSvok38v72MJm_3IMe-LWj6IxtKxd2_tu1thcpD97l_PKrFIGLQW6iNXRzlHvEL75tcOgNV-BiwRgH1Blv022kpapnHUslNyXS/s1600/Proxyserver.bmp" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="246" width="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhW_bwvoneKRwqcBCsehiY7Puvcmhvoaed0mJWbeH_KQOFSvok38v72MJm_3IMe-LWj6IxtKxd2_tu1thcpD97l_PKrFIGLQW6iNXRzlHvEL75tcOgNV-BiwRgH1Blv022kpapnHUslNyXS/s320/Proxyserver.bmp" /></a></div>
</br>
<br>3. Enter all details you would like to have refer to my other post on how to exclude or include a specific URL patterns</br>
<br><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwTHsLsoeULRtkMqLeNLrxxjfgNJqTnsy818tKykhI9hTMTHBkeoqUNCS_WxinBCqUGMX3YnJI7d_-aVmU5WKoEs2KqKFHjgyrpbZeheImHDBikW1Haz_c1QeNHISCEUAHBBm11QDbiLYQ/s1600/proxyserver2.bmp" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="206" width="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwTHsLsoeULRtkMqLeNLrxxjfgNJqTnsy818tKykhI9hTMTHBkeoqUNCS_WxinBCqUGMX3YnJI7d_-aVmU5WKoEs2KqKFHjgyrpbZeheImHDBikW1Haz_c1QeNHISCEUAHBBm11QDbiLYQ/s320/proxyserver2.bmp" /></a></div>
</br>
<br>If you have strict network settings just like ours where you can't chnage your local network settings</br>
<br>4. <b>Change the Group Policy </b> The local Group Policy object on <YourComputer> gpedit.msc /gpcomputer:" <YourComputer> ". Go to run command type in <b>gpedit.msc</b> enter . A group policy window will open up & navigate all the way upto local settings</br>
<br><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifFKG2WuM9fdFe2wx1m4TfgkPul2uMR12PDoWKo6rVx70GXMS3YDmyPZY2xfBopxnel-ZBuRboBsZHB4rlojRh3RbUYMwHAGrYY0NW-8nKct7P7ZQPswZs9TeIsaxKBeKi_wF44R2WA3CC/s1600/grppolicy.bmp" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="159" width="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifFKG2WuM9fdFe2wx1m4TfgkPul2uMR12PDoWKo6rVx70GXMS3YDmyPZY2xfBopxnel-ZBuRboBsZHB4rlojRh3RbUYMwHAGrYY0NW-8nKct7P7ZQPswZs9TeIsaxKBeKi_wF44R2WA3CC/s320/grppolicy.bmp" /></a></div>
</br>
<br>5. Check the option for Enable Proxy Settings.</br>
<br>6. Now access <b>regedit</b> from the run command. Windows > Internet Settings > Proxy Server - Enter <b>localhost:8080</b></br>
<br>7. Now Click on ProxyEnable <b>1</b> like the two options shown</br>
<br><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiON7fuLcXIgG3sc50PMZR5Q3PKr8sDZfzoeh08P4LwRDy8a7Vc9_OAw1fRhLXZKZxtBzN1xeQvIeOX-7x8a4uIiBooId44UpXD-3mRTlw0u8MeShCPWSj46ng9FjztN6wiA7MoMlobI5AN/s1600/regedit.bmp" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="264" width="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiON7fuLcXIgG3sc50PMZR5Q3PKr8sDZfzoeh08P4LwRDy8a7Vc9_OAw1fRhLXZKZxtBzN1xeQvIeOX-7x8a4uIiBooId44UpXD-3mRTlw0u8MeShCPWSj46ng9FjztN6wiA7MoMlobI5AN/s320/regedit.bmp" /></a></div>
</br>
<br>8. Now that we have all we need to start recording over firewall.</br>
<br>9. So we have a Test plan with a Thread Group,HTTP Proxy Server being added to it all you now need to do is click on start</br>
<br>10. You'll see all your actions recorded as a child to the Thread group.</br>
<br>Now let's not forget we did all the above to capture actions of an application that needs a Windows Authentication. So when you playback</br>
<br>11. Make sure you add a <b>HTTP Authorization Manager</b> to each of your transaction.</br>
<br>12. Enter the Server name,Domain,Username,Password just like shown ins creen shot </br>
<br><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiif3E2zoeaVtMnHWHUUv3hj6gZG1Hwzy1Vzoo1jKLmfyg8goaTUGsA-hmJBTNKyZzRG4bHri-3t4tCn1opcM4g2MH-NMUzSXHty65_ONUhslctoC3Cikav8ecW_gWa3v0a3yO3GCnkjC6d/s1600/authomgr.bmp" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="65" width="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiif3E2zoeaVtMnHWHUUv3hj6gZG1Hwzy1Vzoo1jKLmfyg8goaTUGsA-hmJBTNKyZzRG4bHri-3t4tCn1opcM4g2MH-NMUzSXHty65_ONUhslctoC3Cikav8ecW_gWa3v0a3yO3GCnkjC6d/s320/authomgr.bmp" /></a></div>
</br>
<br>Hope these steps help in recording Windows Based Applications and reinventing the wheel again save time</br>
<a href='http://www.webstatsdomain.com/domains/www.automationwithselenium.blogspot.com/'><img alt='Check google pagerank for automationwithselenium.blogspot.com' title='Check google pagerank for automationwithselenium.blogspot.com' style='border:none;' src='http://www.webstatsdomain.com/widget/prbutton/www.automationwithselenium.blogspot.com'/></a>Shabanahttp://www.blogger.com/profile/13859572556639838691noreply@blogger.com1tag:blogger.com,1999:blog-5789136638033163154.post-69905706531619190702012-10-23T08:55:00.001-07:002013-02-12T06:18:10.383-08:00WebDriver C# Implicit & Explicit Wait<br>Earlier versions of Selenium most of us ended up using Thread.Sleep()</br>
<br>To wait for objects to render the page fully so that we can access the object from the DOM else Selenium would fail with errors for No such Element </br>
<br>Here is an example of how to use implicit wait using WebDriver FindElement </br>
<br>Code snippet for a single element</br>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaDL_stahRooveIFSkS69sBZeXvS3HHFUwz0QnvKtOcJmTyH-a0OkfhFYc228Lzz9FQHN4T6BigNwl0y5oJ9mYz3r-IGci6jXRdEJ9ZlJLtTBhJ-UU1207Tfy-zsacWS26MtCkb6eZJjQA/s1600/implicitwait.png" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="60" width="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaDL_stahRooveIFSkS69sBZeXvS3HHFUwz0QnvKtOcJmTyH-a0OkfhFYc228Lzz9FQHN4T6BigNwl0y5oJ9mYz3r-IGci6jXRdEJ9ZlJLtTBhJ-UU1207Tfy-zsacWS26MtCkb6eZJjQA/s320/implicitwait.png" /></a></div>
<br>Code snippet for multiple elements</br>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDcGrkuBByQREzyRnGHRj-VCFkZWqG9YR_Rt4o7uk7whItNwVHbOVv0Ste4S_QxXngd0q5BjS0xKZUaPcNLbvehq_er-z-P7R61qGLF-ioNSl_uV9skApxHsCx3HpAa_HIOiARr3pgvmDj/s1600/implicitwait2.png" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="65" width="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDcGrkuBByQREzyRnGHRj-VCFkZWqG9YR_Rt4o7uk7whItNwVHbOVv0Ste4S_QxXngd0q5BjS0xKZUaPcNLbvehq_er-z-P7R61qGLF-ioNSl_uV9skApxHsCx3HpAa_HIOiARr3pgvmDj/s320/implicitwait2.png" /></a></div>
<br>Most of the webpages have jQueries running some take longer to load,If a page doesn't load in 60 seconds then it is never going to load</br>
<br>here is the code snippet</br>
<br>However,You will have to ask your developers to set a flag within Javascript that says that the jquery is loaded.</br><b>
<br> public bool IsPageLoaded(IWebDriver driver)</br>
<br> {</br>
<br> try</br>
<br> {</br>
<br> //First wait for the browser to register the new URL;</br>
<br> if (driver.Url.Equals(OldUrl, StringComparison.OrdinalIgnoreCase))</br>
<br> {</br>
<br> return false;</br>
<br> }</br>
<br> log.Debug("Waiting for Page to load. Current URL: " + driver.Url);</br>
<br> //Second wait for JQuery to become available.</br>
<br> if (IsCheapflightsPage) </br>
<br> {</br>
<br> IJavaScriptExecutor executor = (IJavaScriptExecutor)driver; </br>
<br> return (bool)executor.ExecuteScript("return CF.isReady;"); </br>
<br> }</br>
<br> return true;</br>
<br> }</br>
<br> catch (InvalidElementStateException)</br>
<br> {</br>
<br> log.Error("Caught InvalidElementStateException. Assume page not yet loaded and continute waiting.");</br>
<br> return false;</br>
<br> }</br>
<br> }</br> </b>
<a href="http://www.webstatsdomain.com/domains/automationwithselenium.blogspot.com/" target="_blank"><img src="http://www.webstatsdomain.com/widget/informer/automationwithselenium.blogspot.com/1-7.png" alt="automationwithselenium.blogspot.com-Google pagerank and Worth" title="automationwithselenium.blogspot.com-Google pagerank and Worth" style="border:none;"/></a>Shabanahttp://www.blogger.com/profile/13859572556639838691noreply@blogger.com0tag:blogger.com,1999:blog-5789136638033163154.post-82686474621374509732012-10-23T06:26:00.004-07:002013-02-12T06:18:26.741-08:00WebDriver C#,using log4net - logging <br>Most of us want our logs to be written to a file externally.</br>
<br>Whether they are <b>application logs,console logs.</b></br>
<br>In our case have used to grab the logs for the WebDriver C# bindings using the log4net.dll's</br>
<b><br>Below are step by step instructions as to go about using log4net :</br></b>
<br>1. Add a config section in the app.config file under configuration <br>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1lOrMnWybdpcvlTokdSbopG2n5TbekUtvvlJXxCs9WF07_hJ0Yph_92MX2t4YaOvO89fNepB_fOwbTdTdeKHhfP1kMSISSbtwXh0h7YP0_awqiBV-P0CGSzR-m2NIx8Y-AW2s17YvDK0Z/s1600/configsections.png" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="36" width="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1lOrMnWybdpcvlTokdSbopG2n5TbekUtvvlJXxCs9WF07_hJ0Yph_92MX2t4YaOvO89fNepB_fOwbTdTdeKHhfP1kMSISSbtwXh0h7YP0_awqiBV-P0CGSzR-m2NIx8Y-AW2s17YvDK0Z/s320/configsections.png" /></a></div>
<br>2. Add a appSettings section where you define a key value pair </br>
<br>Which would facilitate ConfigurationManager to get the value</br>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1U0Sn6-nPgCMk6l_hDWZSQF3YboCCO2qmYUQTCcKunokOZ4Lfz5Nb5FxkvJ9ijvc9jYoG-c35NrRCBRcMH-MRzJy0K0bQEqe3UPYPHCV4K9rhqGmEphP112RnQhyphenhyphenDTDhBmUBcTzGi7k_T/s1600/appsettings.png" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="66" width="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1U0Sn6-nPgCMk6l_hDWZSQF3YboCCO2qmYUQTCcKunokOZ4Lfz5Nb5FxkvJ9ijvc9jYoG-c35NrRCBRcMH-MRzJy0K0bQEqe3UPYPHCV4K9rhqGmEphP112RnQhyphenhyphenDTDhBmUBcTzGi7k_T/s320/appsettings.png" /></a></div>
<br>3. I have created a config file other than that of the app.config & named it as log4net.config - below is the configuration </br>
<br>Have used <b>RollingFileAppender</b> and specified a location where these logs are to be written.</br>
<br>RollingFileAppender - This is just like LogFileAppender with an exception doesn't create a new file</br>
<br>Until it has reached the MaximumFilesize that we have configured initially</br>
<br>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8tYgW5fegdUNlQd2v58GEDOGiZJ-URyQ8DxtywWRO58ug0hcsm9PCK_eIhS4NPGXjhZdc2pQ4Zd4v8deqWUGaRXA5twqL0yX7_WZCPOBpg8A63Ejszp2Ium6JPrWhXyl_bcSPkvEJg8Ab/s1600/log4netconfig.png" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="161" width="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8tYgW5fegdUNlQd2v58GEDOGiZJ-URyQ8DxtywWRO58ug0hcsm9PCK_eIhS4NPGXjhZdc2pQ4Zd4v8deqWUGaRXA5twqL0yX7_WZCPOBpg8A63Ejszp2Ium6JPrWhXyl_bcSPkvEJg8Ab/s320/log4netconfig.png" /></a></div>
<br>4. The below code snippet shows how we need to initialize the logger </br>
<br><b> private static readonly ILog log = LogManager.GetLogger(typeof(<classname>));</b></br>
<br>5. Now accessing the key value pair from the app.config file</br>
<br><b>log4net.Config.XmlConfigurator.Configure(new FileInfo(ConfigurationManager.AppSettings["log4netConfig"]));</b></br>
<a href="http://www.webstatsdomain.com/domains/automationwithselenium.blogspot.com/" target="_blank"><img src="http://www.webstatsdomain.com/widget/informer/automationwithselenium.blogspot.com/1-7.png" alt="automationwithselenium.blogspot.com-Google pagerank and Worth" title="automationwithselenium.blogspot.com-Google pagerank and Worth" style="border:none;"/></a>
Shabanahttp://www.blogger.com/profile/13859572556639838691noreply@blogger.com3tag:blogger.com,1999:blog-5789136638033163154.post-89984940865647207522012-08-16T08:42:00.001-07:002013-02-12T06:18:40.900-08:00Setting up WebDriver for C# bindings with VS2010 ,NuGet , NUnit , TFS<br>With changing need & moving onto different businesses/work place. </br>
<br>We are thrown different challenges !!!! mine was get the framework done in C# </br>
<br>As the technology stack was .Net/IIS servers.</br>
<br><b>Here's a step by step illustration of Integrating Visual Studio 2010 with NuGet, webDriver C# bindings ,Team Foundation Server </b></br>
<br><b>Pre-requisites :</b> </br>
<br>1. I have a licensed Visual Studio 2010 installed on my box,if you don't you can live with a trial version too </br>
<br>2. Now adding NuGet to Visual Studio 2010 </br>
<br><b>A bit about NuGet : </b> <i> Yeah it’s NuGet & not Nugget to all those nugget fans
<br>NuGet is a Visual Studio that makes it easy to install and update third party<br>libraries(In our case it is webDriver API’s) and tools in Visual Studio.</i> </br>
<br>3. VS 2010 > Click on Tools > Extension Manager </br>
<br><b>a.</b> As shown in the screen shot as you don’t have NuGet already installed you should see DOWNLOAD against the NuGet Package Manager</t> </br>
<br><b>b.</b> I have NuGet on my box so a little green icon.</br>
</br><br><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZTTZZXrRjxYRCo15g0_ifo6RvOODcfn2B0xGok_ZYxufYF9z7TW_C-M8O781TPnqu0dZTn1gaDfamrIpcnPH8gf6VlPx105t3-secxcESdAbzG3tvMstUzKcswlfLVDI0xokCbS4Li00N/s1600/1nuget.png" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="92" width="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZTTZZXrRjxYRCo15g0_ifo6RvOODcfn2B0xGok_ZYxufYF9z7TW_C-M8O781TPnqu0dZTn1gaDfamrIpcnPH8gf6VlPx105t3-secxcESdAbzG3tvMstUzKcswlfLVDI0xokCbS4Li00N/s320/1nuget.png" /></a></div>
</br>
<br><b>We are now done with adding NuGet Package Manager</b> </br>
<br><b>Pre-requisite : </b>TFS access if you are using Team Foundation Server as your version control get your Login details from whoever manages it</br>
<br><b>1.</b>Start your Visual Studio 2010 on start you should your screen just like the one one displayed in screen shot</br>
<br><b>a.</b>Click on servers and add your TFS server</br>
<br><b>b.</b>Assuming that you have already identified location to check-in your code select that directory</br>
<br><b>d.</b>Click on Connect </br>
<br><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCM0AjOiDdAu2NWilavRN4QHxLdMHJQI-S2MYbVj4a4AhB6NHxFDO7cnjaaQz_y_COSpDuR1TmLEfi0vGNZ8S_NwkkEVvZduKxC5zF31ayAi5KmwrJPLXG4qhnoPQrzq-xKQAhl_R7Kx7v/s1600/1vs2010.png" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="320" width="311" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCM0AjOiDdAu2NWilavRN4QHxLdMHJQI-S2MYbVj4a4AhB6NHxFDO7cnjaaQz_y_COSpDuR1TmLEfi0vGNZ8S_NwkkEVvZduKxC5zF31ayAi5KmwrJPLXG4qhnoPQrzq-xKQAhl_R7Kx7v/s320/1vs2010.png" /></a></div>
</br>
<br><b>2.</b> On click to connect a pop-up opens up </br>
<br><b>a.</b>Enter the TFS server name /url just as shown in the screen shot</br>
<br><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTU53cVT5m0aecbGSpWLnIHVJfrjf3RYbNPLMA3hsVjwaBxIXKW4lcay1nS7RwiF8Z_-Et4ms8VFbLCytgizebUOTvVRV-UfwmvZnSFKk5eSaxCJIu4I02hyphenhyphenTCTKSVRq3VhexuDnt3S7xE/s1600/2vs2010.png" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="118" width="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTU53cVT5m0aecbGSpWLnIHVJfrjf3RYbNPLMA3hsVjwaBxIXKW4lcay1nS7RwiF8Z_-Et4ms8VFbLCytgizebUOTvVRV-UfwmvZnSFKk5eSaxCJIu4I02hyphenhyphenTCTKSVRq3VhexuDnt3S7xE/s320/2vs2010.png" /></a></div>
</br>
<br><b>3.</b> Now to we have gained access to TFS & integrated with VS 2010 we have to create a local folder that maps to the folder in TFS</br>
<br><b><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhY2D68W5Hv3RAiqU48qwi4PkpOw2typxrs1oMnvcpqoq_E2j4hHdeTQGtLr1g1RC2Ye-L0qUR6gP3UW23x7hFnnWY2F0pc-Ed2NfUUvjv1lJ7j4_GTDLkCxHedA_sZaqgEy1rIBArm9fS6/s1600/3vs2010.png" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="320" width="306" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhY2D68W5Hv3RAiqU48qwi4PkpOw2typxrs1oMnvcpqoq_E2j4hHdeTQGtLr1g1RC2Ye-L0qUR6gP3UW23x7hFnnWY2F0pc-Ed2NfUUvjv1lJ7j4_GTDLkCxHedA_sZaqgEy1rIBArm9fS6/s320/3vs2010.png" /></a></div>
</b></br>
<br><b>4.</b> Either select the default Workspace or create a new one. while you are on a Source Control Explorer view- like shown in the screen shot</br>
<br><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqLkuKUaGX1Inl_9TRAtP44paICTkwtP4oTJLh1KiJBrHcobQrJ43IfLle07RRUsiQVyYQWlvHEwhyphenhyphenVzyLFfX3B8JmW81IP57mIPWZYh1lGLIx79ASirIHEXByKKdvL9fr9iKp2cARGx_m/s1600/4vs2010.png" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="79" width="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqLkuKUaGX1Inl_9TRAtP44paICTkwtP4oTJLh1KiJBrHcobQrJ43IfLle07RRUsiQVyYQWlvHEwhyphenhyphenVzyLFfX3B8JmW81IP57mIPWZYh1lGLIx79ASirIHEXByKKdvL9fr9iKp2cARGx_m/s320/4vs2010.png" /></a></div>
</br>
<br><b>5.</b> On selecting one of the workspaces you'l see a popup just as shown in the screen shot</br>
<br><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjN4YFe0REXzHLYdBjRn00xsiqCnea9X7BHufaYktUbz0HkjgzmtKiEWv7B2XJbQk0ENuNd4iY6NhN3bOp85cRYHLblNNvQNM1INja6x4_iG-qKcaoXv6Qj8nCIb_-gOWUGzcTiGct8jvVC/s1600/5vs2010.png" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="241" width="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjN4YFe0REXzHLYdBjRn00xsiqCnea9X7BHufaYktUbz0HkjgzmtKiEWv7B2XJbQk0ENuNd4iY6NhN3bOp85cRYHLblNNvQNM1INja6x4_iG-qKcaoXv6Qj8nCIb_-gOWUGzcTiGct8jvVC/s320/5vs2010.png" /></a></div>
</br>
<br><b>6.</b>Now Click on Add & enter all details required as shown in screen shot </br>
<br><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9QS4EttyrCrNpzKlX8WSeIpfVK7vexvwDH3nCV27NrC6vuDh2x2SfOvBLdMxXBFx5X-iu1QD3SAax_rm_IkcX22aXaE5Hp4twXM8KmfWVwsgEesDEOI9hF1kvrTD0RhMXA9StM_7xyjx5/s1600/6vs2010.png" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="261" width="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9QS4EttyrCrNpzKlX8WSeIpfVK7vexvwDH3nCV27NrC6vuDh2x2SfOvBLdMxXBFx5X-iu1QD3SAax_rm_IkcX22aXaE5Hp4twXM8KmfWVwsgEesDEOI9hF1kvrTD0RhMXA9StM_7xyjx5/s320/6vs2010.png" /></a></div>
</br>
<br><b>7.</b>We are nearly there Switch to Source Control Explorer and get the latest version </br>
<br><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguWrLzCNmci-BALV225ap4qHfdK6QkDM4oSu-qVvvCd_69nL4iKWmIFSh-esvmB91ZnWQOrjjbEjhJqlThvHg494u1_NfArjoDLETGrIuWp4y3Crqid1ze83cNi7JLn57HFC6ynVqsVfdJ/s1600/8vs2010.png" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="296" width="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguWrLzCNmci-BALV225ap4qHfdK6QkDM4oSu-qVvvCd_69nL4iKWmIFSh-esvmB91ZnWQOrjjbEjhJqlThvHg494u1_NfArjoDLETGrIuWp4y3Crqid1ze83cNi7JLn57HFC6ynVqsVfdJ/s320/8vs2010.png" /></a></div>
</br>
<br><b>8.</b>Let's verify if a local sync was actually through just like the one displayed in screen shot</br>
<br><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyvxTcBO_n5rNWwQPXqiDGSxLOW9g4Hyjx-Lz41OpCF-cRVrrg9TkigXIaqFmW7l8791kpoPTEORGjh3xP6mb8oNVxwf2kkNeFOZFulb1rSSZW_SY4MgAEF3KmOjqZMNOMRu17eYGoe9Kl/s1600/9vs2010.png" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="76" width="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyvxTcBO_n5rNWwQPXqiDGSxLOW9g4Hyjx-Lz41OpCF-cRVrrg9TkigXIaqFmW7l8791kpoPTEORGjh3xP6mb8oNVxwf2kkNeFOZFulb1rSSZW_SY4MgAEF3KmOjqZMNOMRu17eYGoe9Kl/s320/9vs2010.png" /></a></div>
</br>
<br><b>9.</b>Add a file called packages.config look at the screen shot</br>
<br></br>
<br><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjn_jouEpKgfX1iQoo8KkOtfIE5Bv42esU26TUyYoXdm_XgcLR0XHHEhuA6_yQOSoPY7iKXv0M0naDrlTH1rHGv2dgTvo3TLcVndMR6vzccrIj4vHW0DrOuOqzcQ0hWIgl4vOKElt3HqPPL/s1600/11vs2010.png" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="251" width="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjn_jouEpKgfX1iQoo8KkOtfIE5Bv42esU26TUyYoXdm_XgcLR0XHHEhuA6_yQOSoPY7iKXv0M0naDrlTH1rHGv2dgTvo3TLcVndMR6vzccrIj4vHW0DrOuOqzcQ0hWIgl4vOKElt3HqPPL/s320/11vs2010.png" /></a></div>
</br>
<br><b>10.</b>For getting latest updates for any of your third party tool set.</br>
<br>Use NuGet - go to Extension manager & click on updates you'l be able to see them click on update you are all done.</br>
<a href="http://www.webstatsdomain.com/domains/automationwithselenium.blogspot.com/" target="_blank"><img src="http://www.webstatsdomain.com/widget/informer/automationwithselenium.blogspot.com/1-7.png" alt="automationwithselenium.blogspot.com-Google pagerank and Worth" title="automationwithselenium.blogspot.com-Google pagerank and Worth" style="border:none;"/></a>
Shabanahttp://www.blogger.com/profile/13859572556639838691noreply@blogger.com0tag:blogger.com,1999:blog-5789136638033163154.post-41326993739615401712012-05-23T05:53:00.001-07:002013-02-12T06:19:04.608-08:00Invoking a InternetExplorer using InternetExplorerDriver<br>It is been a struggle to get the InternetExplorer work with different drivers available specifically for each browser.</br>
<br>Life would be easy at work when we move finally to Selenium Grid. </br>
<br>Steps to get the internet explorer driver work :) </br>
<br><b>1. </b>Download the internet explorer driver from seleniums</br>
<br><b>2. </b>Add the below snippet for Invoking the InternetExplorer Driver</br>
<br><b>3. </b>Have a look at this bug that was raised for issues with InternetExplorerDriver http://code.google.com/p/selenium/issues/detail?id=1795 </br>
<br>If you hit any of the issues, However the below solution works perfectly fine.</br>
<br> <i>var options = new InternetExplorerOptions(); </br>
<br> options.IntroduceInstabilityByIgnoringProtectedModeSettings = true;</br>
<br> IWebDriver driver = new InternetExplorerDriver(options);</br></i>
</br>
<br><b>Thought of Adding this bit here with New release of IE standalone server Selenium WebDriver 2.22</b></br>
<br>Reason for having a standalone server</br>
<br><b><i>" The IE WebDriver now has a standalone server. Previously, we've
relied on packaging and silently using our own DLL, but this often
meant that Selenium was falling foul of overly active virus scanners.
If you place the new IEDriverServer.exe on your %PATH% the
InternetExplorerDriver will Do The Right Thing and use it. For now,
the DLL is also still packaged just as it always was, and you can use
it by setting the DesiredCapability "useLegacyInternalServer" to the
boolean "true" value when creating your IE instance."</b></i></br>
<br>Now a bit more steps to follow/get IE working</br>
<br>1. Download the latest IE standalone server based on your requirement of 32 bit or 64 bit</br>
<br>Download from here : http://code.google.com/p/selenium/downloads/list</br>
<br>I have downloaded InternetExplorerDriver standalone server for 64-bit IE </br>
<br>2. Unzip it to a location where all other .dll files are present</br>
<br>3. You can either set a path to locate IEstandaloneserver or call within your script the executable </br>
<br>This is how you will call within the script.</br>
<br>Updates that are needed for our code to invoke is as follows </br>
<br><i>
<br> var options = new InternetExplorerOptions();</br>
<br> options.IntroduceInstabilityByIgnoringProtectedModeSettings = true;</br>
<br> IWebDriver driver = new InternetExplorerDriver(@"C:\Selenium\",options);</br>
</i></br>
<a href="http://www.webstatsdomain.com/domains/automationwithselenium.blogspot.com/" target="_blank"><img src="http://www.webstatsdomain.com/widget/informer/automationwithselenium.blogspot.com/1-7.png" alt="automationwithselenium.blogspot.com-Google pagerank and Worth" title="automationwithselenium.blogspot.com-Google pagerank and Worth" style="border:none;"/></a>Shabanahttp://www.blogger.com/profile/13859572556639838691noreply@blogger.com1tag:blogger.com,1999:blog-5789136638033163154.post-16059694126061596232012-05-02T04:20:00.001-07:002013-02-12T06:19:16.807-08:00Invoking a Chrome browser - using ChromeDriver<br>As ChromeDriver is developed is Collaboration with the Chromium team.</br>
<br>Implementation is slightly different, Thought i'll better have it blogged which may help any one </br>
<br>Here are steps i followed to override the <b>Enable Protected Mode To All zones</b></br>
<br>1. Here's the detailed wiki of selenium for a bit of background http://code.google.com/p/selenium/wiki/ChromeDriver</br>
<br>2. Download a appropriate driver based on your Operating System http://code.google.com/p/chromedriver/downloads/list</br>
<br>There are many ways mentioned on the selenium website for invoking the ChromeDriver.exe,I am mentioning what worked for me</br>
<br><b>IWebDriver driver = new ChromeDriver(@"C:\Selenium\");</b></br>
<br><b>driver.Navigate().GoToUrl("Pass your http request");</b></br>
<br>3. The above snippet is C# </br>
<br>4. On executing your tests</br>
<br>5. Just like in screen shot you'l see the chromedriver.exe being initialized</br>
<br><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuEb9WUsTZCH2YlW42OlWgL1bbumJsE5bgzXXKMSzqsqxlIPqlG8317p-s2-us8Oiclq06q7KlCbJ3SzPwgB6QZ-vNPBKq5kLe0D9pF-oI029dYBTXqFl0TzFj5D8EcpnWgEXfr_aUHbhS/s1600/chromedriverexe.png" imageanchor="1" style=""><img border="0" height="159" width="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuEb9WUsTZCH2YlW42OlWgL1bbumJsE5bgzXXKMSzqsqxlIPqlG8317p-s2-us8Oiclq06q7KlCbJ3SzPwgB6QZ-vNPBKq5kLe0D9pF-oI029dYBTXqFl0TzFj5D8EcpnWgEXfr_aUHbhS/s320/chromedriverexe.png" /></a></div>
</br>
<br>6. Then the browser launches</br>
<br>7. You will have to cleanUp at the end of your test by quitting the driver </br>
<br><b>driver.Quit();</b></br>
<a href="http://www.webstatsdomain.com/domains/automationwithselenium.blogspot.com/" target="_blank"><img src="http://www.webstatsdomain.com/widget/informer/automationwithselenium.blogspot.com/1-7.png" alt="automationwithselenium.blogspot.com-Google pagerank and Worth" title="automationwithselenium.blogspot.com-Google pagerank and Worth" style="border:none;"/></a>Shabanahttp://www.blogger.com/profile/13859572556639838691noreply@blogger.com0tag:blogger.com,1999:blog-5789136638033163154.post-68256416544922205182012-04-19T03:50:00.000-07:002013-02-12T06:19:29.230-08:00Generating HTML report for NUnit with Nant<br>In my earlier post we saw how we can get the NUnit runner with our Visual Studio 2010 ultimate.</br>
<br>Now let's look at how to generate reports in html format.</br>
<br>Steps invloved in generating a html report for nunit tests :</br>
<br>1. Download Nunit2report from http://sourceforge.net/projects/nunit2report/ and unzip it to a location just like in the screen shot</br>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqKemZh0pKNBpy4szy2eRpBtitFsuEFzof44FeyKsQ8-IdMivdHmdl3EMz_AKnV9kNU3xjKOCTykeP_PcQcvlN9CQ6pn625cibjapqbLBU6yx0PklGs4Iac383wEsCtyr8sgPfhzkbMWnH/s1600/cmdls.png" imageanchor="1" style=""><img border="0" height="218" width="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqKemZh0pKNBpy4szy2eRpBtitFsuEFzof44FeyKsQ8-IdMivdHmdl3EMz_AKnV9kNU3xjKOCTykeP_PcQcvlN9CQ6pn625cibjapqbLBU6yx0PklGs4Iac383wEsCtyr8sgPfhzkbMWnH/s320/cmdls.png" /></a></div>
<br>2. Download Nant from http://nant.sourceforge.net/ if you don't have already place it in a location suitable to you</br>
<br>3. Once you are in Nunit2Report bin directory - You must have these files just like i have in screen shot</br>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCP-u38E80yTQVnUr9Z_nR0tW36zSb6OAArKKlwWvf90mdvpw0th7574j8ym-0-n6hOSoBssC7GY4oZFaTmqbXbDV3mJE516IK_7-PeVaN1WzGVU6g7wu2942YztCMPSUpHpiU4b-kVfWI/s1600/nunit2report.png" imageanchor="1" style=""><img border="0" height="218" width="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCP-u38E80yTQVnUr9Z_nR0tW36zSb6OAArKKlwWvf90mdvpw0th7574j8ym-0-n6hOSoBssC7GY4oZFaTmqbXbDV3mJE516IK_7-PeVaN1WzGVU6g7wu2942YztCMPSUpHpiU4b-kVfWI/s320/nunit2report.png" /></a></div>
<br>4. Copy all files from the bin directory of Nunit2Report to Nant/bin directory - Just as in screen shot </br>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEho-_UoHse7sbHz4W0qAAR9rqh2V_ChBLxTg1KvkgAIzOJYX9cHl3lizBN8j6TL3pWVkiWonVEv4jE1lJ2zNhyphenhyphen20UE2jexDNcFA5a28-cyWpumURegHYYnxfgfuAYyoYcyLXF_i8hyphenhypheniKaTU/s1600/nantcopy.png" imageanchor="1" style=""><img border="0" height="303" width="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEho-_UoHse7sbHz4W0qAAR9rqh2V_ChBLxTg1KvkgAIzOJYX9cHl3lizBN8j6TL3pWVkiWonVEv4jE1lJ2zNhyphenhyphen20UE2jexDNcFA5a28-cyWpumURegHYYnxfgfuAYyoYcyLXF_i8hyphenhypheniKaTU/s320/nantcopy.png" /></a></div>
<br>5. Add reference to Nant with Visual Studio 2010 </br>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEsdJ63P8VG_HPtsS7-_xPGBd0T-RyIUDIULHbpefqfh_Sh8ihDYATbLPmJ-_qUmlwT5CEiQUxcqTTV_ObsvjvunoJePqZ95EPWF9xa8Z3-hNOn1Y098nfCYECe0LrFnuJ_UmgbVVpMjWP/s1600/msobjbrowser.png" imageanchor="1" style=""><img border="0" height="320" width="232" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEsdJ63P8VG_HPtsS7-_xPGBd0T-RyIUDIULHbpefqfh_Sh8ihDYATbLPmJ-_qUmlwT5CEiQUxcqTTV_ObsvjvunoJePqZ95EPWF9xa8Z3-hNOn1Y098nfCYECe0LrFnuJ_UmgbVVpMjWP/s320/msobjbrowser.png" /></a></div>
<br>6. Click on Tools Menu in Visual Studio and click on External Tools - Just like in Screen shot </br>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgp4wnjYKVFmK9HOQpEJOTy6TId3wYY-LETBFDUW9TVJLkYF43H9Ijg5hhlUnZd1ekqBqu262_R8S0ZLhlaqwC4h72UIn3VzYObH5qptXRpte8L2BFZEok-LnwQURbdLhVPMN0snrbRYmax/s1600/externaltools.png" imageanchor="1" style=""><img border="0" height="313" width="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgp4wnjYKVFmK9HOQpEJOTy6TId3wYY-LETBFDUW9TVJLkYF43H9Ijg5hhlUnZd1ekqBqu262_R8S0ZLhlaqwC4h72UIn3VzYObH5qptXRpte8L2BFZEok-LnwQURbdLhVPMN0snrbRYmax/s320/externaltools.png" /></a></div>
<br>7. Add details just like i have entered in the external tools configuration for nant</br>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnBm2AbNUf64brGyVfs7rKyDBX5Vk6c9q4EIQYqfmR49eY4qNM5sk3wxYIsS1jfXhdpyKwIAQ-N64I82V-luWkSZIqjMYrK6_hdEmWEDH5QfIY1BNwyuRVObh2O1KtsXve4OgrqrH1eLA_/s1600/nantdetails.png" imageanchor="1" style=""><img border="0" height="313" width="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnBm2AbNUf64brGyVfs7rKyDBX5Vk6c9q4EIQYqfmR49eY4qNM5sk3wxYIsS1jfXhdpyKwIAQ-N64I82V-luWkSZIqjMYrK6_hdEmWEDH5QfIY1BNwyuRVObh2O1KtsXve4OgrqrH1eLA_/s320/nantdetails.png" /></a></div>
<br>8. You can either follow step 7 for integrating Nant with Visual studio or just create a batch file with details
$NANT_HOME\bin\nant.exe -buildfile <filename of your build file>
</br>
<br>9. Let's look at how our build file looks - Have a look at the screen shot </br>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqsM7RcxcJ_2gMzGXrhEVs_rclrlpDZbXkjALLxIaQSprHSZUxcZtzQMOI6WEIksyplEcCMtR00HKI3lHeU4Qd9ravv6oIMkWfj7YmOktgzrImXdl5nN-7lf4Gk1blZAIVp3otBD43eLwx/s1600/buildfile.png" imageanchor="1" style=""><img border="0" height="260" width="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqsM7RcxcJ_2gMzGXrhEVs_rclrlpDZbXkjALLxIaQSprHSZUxcZtzQMOI6WEIksyplEcCMtR00HKI3lHeU4Qd9ravv6oIMkWfj7YmOktgzrImXdl5nN-7lf4Gk1blZAIVp3otBD43eLwx/s320/buildfile.png" /></a></div>
<br>10. You should see a nice html report - Just like screen shot </br>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjp0YdLf_efSQGyniRtHJvjvtYRt9REWzWE86fN_Grj_QxgQHoenrpT5TNW9-zZrFivuwSutZJDbJQSUt__yrtr6FEToM4XuzjeQSO0A0VA-Y-gW_fOzLpET-nPmfGhO_wfnzzQXP-1rtVY/s1600/reportResults.png" imageanchor="1" style=""><img border="0" height="153" width="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjp0YdLf_efSQGyniRtHJvjvtYRt9REWzWE86fN_Grj_QxgQHoenrpT5TNW9-zZrFivuwSutZJDbJQSUt__yrtr6FEToM4XuzjeQSO0A0VA-Y-gW_fOzLpET-nPmfGhO_wfnzzQXP-1rtVY/s320/reportResults.png" /></a></div>
<br>11. We can add a task to email results as well using the mail task </br>
<a href="http://www.webstatsdomain.com/domains/automationwithselenium.blogspot.com/" target="_blank"><img src="http://www.webstatsdomain.com/widget/informer/automationwithselenium.blogspot.com/1-7.png" alt="automationwithselenium.blogspot.com-Google pagerank and Worth" title="automationwithselenium.blogspot.com-Google pagerank and Worth" style="border:none;"/></a>Shabanahttp://www.blogger.com/profile/13859572556639838691noreply@blogger.com12tag:blogger.com,1999:blog-5789136638033163154.post-64428586072650660312012-04-16T09:40:00.001-07:002013-02-12T06:19:47.604-08:00Integrate Nunit With Visual Studio 2010 Ultimate IDE<br><b>How to Integrate Nunit with Visual Studio :</b> </br>
<br>1. Download Nunit from http://nunit.org/?p=download </br>
<br>2. I have Visual Studio Ultimate 2010 IDE have tried only with this not sure if it works well with other versions former or later. </br>
<br>3. Go To Tools Menu >> External Tools.</br>
<br>3.a It would look like this </br>
<br><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhI9gIo6LwFkyUSNPPI50fWLXjPmSdC3t0kNF5zSNSzGQ9BPrS2Ic8hyphenhyphenOWC9JfQ4SzjyUrriay-tzSoVF_7qhqMMbYsC0oYGrzUIk9Hk1IGdm_tcoNnHOIy5xNiZ_sOnth3NyDrGBwPq9yM/s1600/externaltools.png" imageanchor="1" style=""><img border="0" height="313" width="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhI9gIo6LwFkyUSNPPI50fWLXjPmSdC3t0kNF5zSNSzGQ9BPrS2Ic8hyphenhyphenOWC9JfQ4SzjyUrriay-tzSoVF_7qhqMMbYsC0oYGrzUIk9Hk1IGdm_tcoNnHOIy5xNiZ_sOnth3NyDrGBwPq9yM/s320/externaltools.png" /></a></div> <br>
<br>4. Click on Add - Enter Details as specified based on your system settings - Have a look at the picture</br>
<br>4.a Click on Apply & then OK</br>
<br><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMLiCuyI0d2OhTaT-xr_Za6WaM21tIWGDcYrhgeN66FhHy6EBnLjN2WJWBYpffByGKGs5NqB4s_GRN89UOy7Qe_nA6GJjOttHt9iHmrMpGozeqhWz3S4SMlGEhxAUdhb5JsYR5RJaefl5J/s1600/addtool.png" imageanchor="1" style=""><img border="0" height="313" width="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMLiCuyI0d2OhTaT-xr_Za6WaM21tIWGDcYrhgeN66FhHy6EBnLjN2WJWBYpffByGKGs5NqB4s_GRN89UOy7Qe_nA6GJjOttHt9iHmrMpGozeqhWz3S4SMlGEhxAUdhb5JsYR5RJaefl5J/s320/addtool.png" /></a></div>
</br>
<br>5. Click on Customize - Check Against Nunit and then close </br>
<br>5.a Have a look at the picture</br>
<br><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7N59f8rVZd6kytYZ-Y8UwHJduoXewjYULCt6VmLcEruxrc2QC5SBYI6vPPjhl5V5mqvRWYH6wnI8uPzjIZs2QIznS1wyxBKvTIWGRZQjHhDTaf8GhIFbDfPzFiBbLye8eIBEq821N-PC8/s1600/customise.png" imageanchor="1" style=""><img border="0" height="320" width="311" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7N59f8rVZd6kytYZ-Y8UwHJduoXewjYULCt6VmLcEruxrc2QC5SBYI6vPPjhl5V5mqvRWYH6wnI8uPzjIZs2QIznS1wyxBKvTIWGRZQjHhDTaf8GhIFbDfPzFiBbLye8eIBEq821N-PC8/s320/customise.png" /></a></div>
</br>
<br>6. You should be able to see Nunit within your Tools Menu</br>
<br>7. Click on Tools > Nunit - You will see GUI open up </br>
<br>7.a Just like the one in the screen shot</br>
<br><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrB5VrCxR5trSlRIhQvDfLnuhW41q1yo4lqCOfR-MuGtoIH_YVQgZy17J0EWXaz5FcEGU-_LIQP_pLneuguhsUGJJxXdzMwy3LJIboSHUaHHiKPyhdJJNG5LVplt1-RD-5HnzSCGeap56N/s1600/NunitGUI.png" imageanchor="1" style=""><img border="0" height="191" width="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrB5VrCxR5trSlRIhQvDfLnuhW41q1yo4lqCOfR-MuGtoIH_YVQgZy17J0EWXaz5FcEGU-_LIQP_pLneuguhsUGJJxXdzMwy3LJIboSHUaHHiKPyhdJJNG5LVplt1-RD-5HnzSCGeap56N/s320/NunitGUI.png" /></a></div>
</br>
<a href="http://www.webstatsdomain.com/domains/automationwithselenium.blogspot.com/" target="_blank"><img src="http://www.webstatsdomain.com/widget/informer/automationwithselenium.blogspot.com/1-7.png" alt="automationwithselenium.blogspot.com-Google pagerank and Worth" title="automationwithselenium.blogspot.com-Google pagerank and Worth" style="border:none;"/></a>Shabanahttp://www.blogger.com/profile/13859572556639838691noreply@blogger.com0tag:blogger.com,1999:blog-5789136638033163154.post-36018939719082270032012-04-10T03:11:00.001-07:002013-02-12T06:25:36.110-08:00Getting started with WebDriver C# & Visual studio<br>With new changes in work environment & Agility comes change in technology & moving on from your usual traits </br>
<br> To explore & challenge yourself with new paths.. Ahh am going to philosophical :)</br>
<br>Let's get started with WebDriver C# - It took a while for me to move from jars to dll's, API's to </br><br>Assemblies,Packages to namespace ...But must say have gone past the initial hiccups..</br>
<br>It looks all well now, Hence blogging my experiences :) as i could hardly find any help on C#.</br>
<br><b>List of Things to do before plunging in :</b></br>
<br>1. Download webDriver for .NET from http://code.google.com/p/selenium/downloads/list </br>
<br>2. We have licensed Visual studio ultimate 2010 as IDE,If you don't have one you can download Visual studio Express </br>
<br>3. You can either write in NUnit framework or in Microsoft's Test tools in Visual studio </br>
<br>4. Download Nunit from here based on the operating system you are in </br>
<br>http://www.nunit.org/index.php?p=download</br>
<br>5. </br>
<a href="http://www.webstatsdomain.com/domains/automationwithselenium.blogspot.com/" target="_blank"><img src="http://www.webstatsdomain.com/widget/informer/automationwithselenium.blogspot.com/1-7.png" alt="automationwithselenium.blogspot.com-Google pagerank and Worth" title="automationwithselenium.blogspot.com-Google pagerank and Worth" style="border:none;"/></a>Shabanahttp://www.blogger.com/profile/13859572556639838691noreply@blogger.com0tag:blogger.com,1999:blog-5789136638033163154.post-71542833008758323502012-03-08T09:46:00.002-08:002015-06-17T03:56:54.236-07:00Microsoft's SilverLight Plug-in<br />
Microsoft's SilverLight Plug-in:
<br />
Silverlight is a powerful development that comes with Rich Internet Application ,how does it impact testing.
<br />
Challenge for a tester is object identification :
<br />
Though it is cross browser compatible it is hard to identify objects with the usual selectors
<b><br />FireBug
<br />IE developer
<br />Debug bar</b>
<br />
<b>Solution is :</b>
<br />
SilverLight Spy
<br />
This is Opensource tool for identifying UI elements that are developed in SilverLight with limited features & commercial with full features.
<br />
Here is there official link : http://firstfloorsoftware.com
<br />
Screen shot -1 : Displays the Where to enter url
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQthzUwGv-7as1pfJaw8-9h9YSQ_nDlv3SpvrOfOQ1f-bGFSN6GrbVXNJnnbs02pWJ_OpX2J-HZwM1QOAFzuVBlTnyonBmigH-cS_6De8FNKBN969P77rgeBwV5-38kIRP8iWKm3Im1XZc/s1600/silverLightapp.png" imageanchor="1"><img border="0" height="192" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQthzUwGv-7as1pfJaw8-9h9YSQ_nDlv3SpvrOfOQ1f-bGFSN6GrbVXNJnnbs02pWJ_OpX2J-HZwM1QOAFzuVBlTnyonBmigH-cS_6De8FNKBN969P77rgeBwV5-38kIRP8iWKm3Im1XZc/s320/silverLightapp.png" width="320" /></a></div>
<br />
Screen shot -2 : Displays How to use the UI element selector
<br />
Tabs of Properties,View,Statistics(Am not sure how we are benefitted with this
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2mmtJnDUAgYzg-8H-3pOSTzTvDE7q-ZDrXVKEmt_gCTp5iTrhizbRbNEXZbUndGBdyZG6aBgrr-9qgX6ZiLSGbGHddaMuCPzytYnwrUi1Sp3lNsO9_Gd46iln29wLAsGj3KL8S3gbI-ft/s1600/silverlightHovered.png" imageanchor="1"><img border="0" height="192" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2mmtJnDUAgYzg-8H-3pOSTzTvDE7q-ZDrXVKEmt_gCTp5iTrhizbRbNEXZbUndGBdyZG6aBgrr-9qgX6ZiLSGbGHddaMuCPzytYnwrUi1Sp3lNsO9_Gd46iln29wLAsGj3KL8S3gbI-ft/s320/silverlightHovered.png" width="320" /></a></div>
<a href="http://www.webstatsdomain.com/domains/automationwithselenium.blogspot.com/" target="_blank"><img alt="automationwithselenium.blogspot.com-Google pagerank and Worth" src="http://www.webstatsdomain.com/widget/informer/automationwithselenium.blogspot.com/1-7.png" style="border: none;" title="automationwithselenium.blogspot.com-Google pagerank and Worth" /></a>Shabanahttp://www.blogger.com/profile/13859572556639838691noreply@blogger.com0tag:blogger.com,1999:blog-5789136638033163154.post-806931686614743622012-03-01T06:16:00.003-08:002013-02-12T06:26:05.220-08:00Writing our first script in WebDriver<br>Prior to getting started with writing scripts ensure that you have completed your installations & you have identified which framework you would work with</br>
<br>I have chosen to write the test in JUnit Framework , Where Eclipse is my IDE & Selenium 2.</br>
<br>Here is a basic script for search on an amazon site.</br>
<br>Objects that are dealt are :</br>
<b><br>1. Drop down list</br>
<br>2. Text box</br>
<br>3. Button</br>
<br>4. Link</br></b>
<br>Actions performed are :</br>
<b><br>1. Am selecting a value from drop down list </br>
<br>2. Enetering text in the text box</br>
<br>3. Clicking on the button.</br>
<br>4. Clicking the link that meets my partial text of the url's fetched</b></br>
<br>
import org.junit.Test;</br>
<br>import org.openqa.selenium.By;</br>
<br>import org.openqa.selenium.WebDriver;</br>
<br>import org.openqa.selenium.WebElement;</br>
<br>import org.openqa.selenium.firefox.FirefoxDriver;</br>
<br>public class Search {</br>
<br> @Test</br>
<br> public void testSearch(){</br>
<br>WebDriver driver = new FirefoxDriver();</br>
<br> driver.navigate().to("http://www.amazon.co.uk/");</br>
<br> WebElement dropDownsearch = driver.findElement(By.id("searchDropdownBox"));</br>
<br> dropDownsearch.sendKeys("Electronics & Photo");</br>
<br> driver.findElement(By.id("twotabsearchtextbox")).clear();</br>
<br> driver.findElement(By.id("twotabsearchtextbox")).sendKeys("Sat Nav & Car Electronics");</br>
<br> driver.findElement(By.id("navGoButton")).click();</br>
<br> driver.findElement(By.partialLinkText("Satellite Navigation System")).click();</br>
<br> driver.close();</br>
<br> }</br>
<br>}</br>
<a href="http://www.webstatsdomain.com/domains/automationwithselenium.blogspot.com/" target="_blank"><img src="http://www.webstatsdomain.com/widget/informer/automationwithselenium.blogspot.com/1-7.png" alt="automationwithselenium.blogspot.com-Google pagerank and Worth" title="automationwithselenium.blogspot.com-Google pagerank and Worth" style="border:none;"/></a>Shabanahttp://www.blogger.com/profile/13859572556639838691noreply@blogger.com2tag:blogger.com,1999:blog-5789136638033163154.post-10281819164414926972012-02-28T09:54:00.001-08:002013-02-12T06:26:20.989-08:00Getting started with Installation of WebDriver - Java Client<br>With <b>SELENIUM / WebDriver </b> being most cost effective tool for functional testing these days most of the companies are embracing this open source tool.</br>
<br>Let's get started with installation of WebDriver & configurations as required.</br>
<br>1. Download from the official website of selenium http://code.google.com/p/selenium/downloads/list </br>
<br>1.a Have a look at the screen shot </br>
<br><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg85Ba9BFu-9jt2SCehM3w6-iDpRQ3E0893JcoINXLYp_15SJHt6R-Am3NFcttLBGs8VM4sogHurjxjJ2z0RpAif5QQwetArTRf1uiSY1XH7yCQhMQhYW1X10q-HcpKZOugW-LdkW7B_6bA/s1600/dlwebDriver.png" imageanchor="1" style=""><img border="0" height="134" width="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg85Ba9BFu-9jt2SCehM3w6-iDpRQ3E0893JcoINXLYp_15SJHt6R-Am3NFcttLBGs8VM4sogHurjxjJ2z0RpAif5QQwetArTRf1uiSY1XH7yCQhMQhYW1X10q-HcpKZOugW-LdkW7B_6bA/s320/dlwebDriver.png" /></a></div>
</br>
<br>2. We have downloaded Selenium-2.20 version for java & selenium-server-standalone-2.20.jar was the latest when i wrote the blog </br>
<br>3. I am on a Windows 7 box - Create a dierctory called Selenium & have the downloaded selenium extracted. I have mine within Eclipse as i would use that as my IDE ,placed it within Eclipse for it would be easy mapping the library files a.k.a jars </br>
<br>This is how it would look ,folder structure & files.</br>
<br><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFSXvwSO7Ryw-WF17yJnxWW4VM_yPJ80yArGeClb-2UkGEKtiIHjnWIju-ka9u5OYhhdFQqbd5bq8Wxb5EB0K7h9yQMRoQWfXllosStsNRmmacFeJh232kMpUCHXErhbwF5ttuU7rAvgiD/s1600/cmdPrompt.png" imageanchor="1" style=""><img border="0" height="121" width="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFSXvwSO7Ryw-WF17yJnxWW4VM_yPJ80yArGeClb-2UkGEKtiIHjnWIju-ka9u5OYhhdFQqbd5bq8Wxb5EB0K7h9yQMRoQWfXllosStsNRmmacFeJh232kMpUCHXErhbwF5ttuU7rAvgiD/s320/cmdPrompt.png" /></a></div>
</br>
<b><br>Now that we have our Selenium 2 downloaded we need to have java on our box let's get that.</br></b>
<br>4. Download java from http://www.oracle.com/technetwork/java/javase/downloads/index.html </br>
<br>5. After you are done with installation of java to verify just go to where it is installed & check for version of java </br>
<br>6. Have a look at the screen shot </br>
<br><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglb8KKaXkYQzclJaI3OJTouvtfG61tBRqtR6537mb4KNH0YP4kvC3VXzZJrTmHBHc0AhCyyknqnY5EVxd5SuZdZl7RenxOIh5qV4q1C42NyitCPVTXgAg68HcK9RB5mfmfpEg4a8WHek3g/s1600/cmdjdk.png" imageanchor="1" style=""><img border="0" height="75" width="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglb8KKaXkYQzclJaI3OJTouvtfG61tBRqtR6537mb4KNH0YP4kvC3VXzZJrTmHBHc0AhCyyknqnY5EVxd5SuZdZl7RenxOIh5qV4q1C42NyitCPVTXgAg68HcK9RB5mfmfpEg4a8WHek3g/s320/cmdjdk.png" /></a></div>
</br>
<br>7. Now that we have jdk , selenium we need an IDE which is Eclipse in our case</br>
<br>8. Download Eclipse from there official website http://www.eclipse.org/downloads/</br>
<br>9. We are all set with downloads that are required to get started,Let's get to configuring as appropriate</br>
<br>10. Click on the eclipse.exe </br>
<br>11. Create a Java Project : Click on File > new > Java Project</br>
<br>12. Give a name to the Project as appropriate</br>
<br>12. Right Click on the Project name within the Project explorer window & click on Properties >> Click on Java Build Path </br>
<br>13. Look at the screen shot.</br>
<br> <i>Screen shot 13 </i>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyWsNhQJM0tKwDzuGzDB7klYhiZss61lV1yVAxtBp_QtlsRdzYxZULEeC-ya_CE-noyKQnVATY3ZI9K_MK2mwjm8ll6UgWfR20-lcOHYZIUFQvZ98yxXLummkiWDp_HMYxtnHCX2BP2GwL/s1600/ebuildPath.png" imageanchor="1" style=""><img border="0" height="186" width="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyWsNhQJM0tKwDzuGzDB7klYhiZss61lV1yVAxtBp_QtlsRdzYxZULEeC-ya_CE-noyKQnVATY3ZI9K_MK2mwjm8ll6UgWfR20-lcOHYZIUFQvZ98yxXLummkiWDp_HMYxtnHCX2BP2GwL/s320/ebuildPath.png" /></a></div>
</br>
<br>14. Click on Add external jars , now add the selenium-java-2.20.0.jar that we downloaded earlier</br>
<br>15. Again Click on Add External jars,now add the lib folder of C:\selenium-2.20.0\libs </br>
<br>Once you have added all your jar's it shoudl look like above screen shot 13 at step 13</br>
<br>16. Let's also add JUnit jar's as our framework is written in JUnit</br>
<br>17. Click on Java Build Path > Add Library > Will show a list of libraries just like the below screen shot </br>
<br>screen shot 17
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8X3HJdoofqHDjYDPs11tMy0afa_VcQp6S4SfVEgu0_JwrsyAhvs7Da268aj3mmdUlZQxTV03FWk9qOAD4wzi9sCT7eexbCbEp_9SqvME2-KUM83jIvr_7tc4tlffhGU26ZC3SBWkTj2m8/s1600/addLib.png" imageanchor="1" style=""><img border="0" height="186" width="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8X3HJdoofqHDjYDPs11tMy0afa_VcQp6S4SfVEgu0_JwrsyAhvs7Da268aj3mmdUlZQxTV03FWk9qOAD4wzi9sCT7eexbCbEp_9SqvME2-KUM83jIvr_7tc4tlffhGU26ZC3SBWkTj2m8/s320/addLib.png" /></a></div>
</br>
<br>Choose appropriate JUnit version </br>
<b><br>We are now done with our installations and configurations required for selenium-2,junit,java,eclipse</br></b>
<a href="http://www.webstatsdomain.com/domains/automationwithselenium.blogspot.com/" target="_blank"><img src="http://www.webstatsdomain.com/widget/informer/automationwithselenium.blogspot.com/1-7.png" alt="automationwithselenium.blogspot.com-Google pagerank and Worth" title="automationwithselenium.blogspot.com-Google pagerank and Worth" style="border:none;"/></a>Shabanahttp://www.blogger.com/profile/13859572556639838691noreply@blogger.com0tag:blogger.com,1999:blog-5789136638033163154.post-22510420371602895922012-02-28T08:38:00.001-08:002013-02-12T06:26:49.408-08:00Regular expression Extractor - Testing ReCaptcha with JMeter<br>Most often these days every website that accepts payment want's to add additional security of having ReCaptcha inplace.</br>
<br>It is definitely a challenge to test reCaptcha without turning it off, but allowing to accept same password as against dynamically generated one.</br>
<br>So here's how i load tested reCaptcha using JMeter.</br>
<br>1.It is important that we know how to use the regular expression extractor,So that we retrive params from one request and pass them to another request.</br>
<br>2. Add a HTTP Sampler</br>
<br>3. We need to add Regular expression extractor which is required to retrive values from the response of the previous request.
Therefore it would be a post processor.</br>
<br><b>3.a </b> Right click on the HTTP Sampler > Add > Post Processors > Regular expression Extractor - see the screen shot<div class="separator" style="clear: both; text-align: center;"> </br>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLVU7nCsKyqGHJJzU6vUvJL8Jj1CuMPB-QdWh9cAsGVDzcH3xdJfNJ8u6-H2YdEbPhBv5FBsxlJripaeaMX_6bkQ12Isw2YA_KfgTO-SBzBNxGyA6AOABUfgP2hWMYsmZ5qOeTSOjdIjFJ/s1600/navregExtractor.png" imageanchor="1" style=""><img border="0" height="150" width="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLVU7nCsKyqGHJJzU6vUvJL8Jj1CuMPB-QdWh9cAsGVDzcH3xdJfNJ8u6-H2YdEbPhBv5FBsxlJripaeaMX_6bkQ12Isw2YA_KfgTO-SBzBNxGyA6AOABUfgP2hWMYsmZ5qOeTSOjdIjFJ/s320/navregExtractor.png" /></a></div>
<br><b>3.b Now the Regular Expression Extractor is added have a look at the screen shot,Let's have a closer look at it : </b></br>
<br>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjT5YdIHnwUcKQJgTE__Eacpdt632hyphenhyphensLxgYaOi7IGK9bnKqkoTbdHlq9qmnwvgI6Dk_8y-YI9ri0Dl6lncOiEtyDxxwx2WSQHl15XV3kY4hlQMXXCLhRXM-lynJcsuoZJDsfTYxdVCJN8v/s1600/regEx.png" imageanchor="1" style=""><img border="0" height="101" width="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjT5YdIHnwUcKQJgTE__Eacpdt632hyphenhyphensLxgYaOi7IGK9bnKqkoTbdHlq9qmnwvgI6Dk_8y-YI9ri0Dl6lncOiEtyDxxwx2WSQHl15XV3kY4hlQMXXCLhRXM-lynJcsuoZJDsfTYxdVCJN8v/s320/regEx.png" /></a></div>
</br>
<br><b>3.c Give appropriate name just like i have given ,It is however optional giving a name will help in debugging issues if it exists</b> </br>
<br><b>3.d Apply to : </b> leave this to default or choose as appropriate to your requirement</br>
<br><b>3.e Response Field to check : </b> Leave this to default or choose as appropriate to your requirement</br>
<br><b>3.f Reference Name : </b> Give a appropriate name here this act's as a variable that stores value retrieved from teh Regular expression</br>
<br><b>3.g Regular Expression : </b><i>"params":"(.+?)nonce=(.+?)" </i> Let's get to understanding this we are matching all that is after the params : and then matching the value for nonce </br>
<br><b>The special characters above are: <br>
<br> ( and ) - these enclose the portion of the match string to be returned</br>
<br> . - match any character</br>
<br> + - one or more times</br>
<br> ? - don't be greedy, i.e. stop when first match succeeds</br></b>
<br>4. As i have previously mentioned it is good to add a <b>DEBUG SAMPLER</b> to understand whether right value is being fetched & for debugging purpose</br>
<br><b>5. Trick to validate your regular expression is : </b></br>
<br>5.a Add a View Results Tree </br>
<br>5.b Choose RegExp Tester to Validate if you have written the right expression </br>
<br>have a look at the screen shot </br>
<br>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgs4dF5UB_2TJHFJ9eGVyJ0dlAZFscFzaXhLXfLHZgmRbMxZ7T_Gr42sWvXZlsI7uKDxab9FqbJAM_qYaArhQxF7kF5pCbo_YCwEFn1oHaAMAQp_vAEolYFIbvK4h9_Q1jxMv9UWhllZ8U0/s1600/regExtester.png" imageanchor="1" style=""><img border="0" height="174" width="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgs4dF5UB_2TJHFJ9eGVyJ0dlAZFscFzaXhLXfLHZgmRbMxZ7T_Gr42sWvXZlsI7uKDxab9FqbJAM_qYaArhQxF7kF5pCbo_YCwEFn1oHaAMAQp_vAEolYFIbvK4h9_Q1jxMv9UWhllZ8U0/s320/regExtester.png" /></a></div> </br>
<a href="http://www.webstatsdomain.com/domains/automationwithselenium.blogspot.com/" target="_blank"><img src="http://www.webstatsdomain.com/widget/informer/automationwithselenium.blogspot.com/1-7.png" alt="automationwithselenium.blogspot.com-Google pagerank and Worth" title="automationwithselenium.blogspot.com-Google pagerank and Worth" style="border:none;"/></a>Shabanahttp://www.blogger.com/profile/13859572556639838691noreply@blogger.com4tag:blogger.com,1999:blog-5789136638033163154.post-45069156292238121632012-02-22T09:16:00.001-08:002013-02-12T06:27:16.166-08:00How to build a request dynamically in - JMeter<br>Most often we end up dealing with how to dynamically build our request.</br>
<br>Also how to fetch values received from HTTP request-1 & pass them as parameters to HTTTP request-2</br>
<br>We can achieve this by writing a simple script within JMeter.</br>
<u>for ex:</u>
<br>Let's take a scenario of amazon where we have to add items to the shopping basket </br>
<br>where items are onsale (These items onsale vary each day)</br>
<br>Therefore we don't want to be updating our data scripts each day </br>
<br>though we are reading from external files.</br>
<br>Let's get started to handle such situation.</br>
<br>1.Within a Testplan add a Thread group </br>
<br>2.Add a HTTP request sampler - This is our request-1</br>
<br><b>2.a </b>We have to retrieve the item/product id's from this request so we need to add a xpath extractor as a post processor event.</br>
<br> Have a look at the screen shot.</br>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0Ev5x6dtK89UCEBN5bMSn22NUmMjfx1yE_vxyoVcm93mFPC_mZ1jEzZseocwLaYCrksnpnxKk0x89QU4n1yzen8irQqwVeF7WGTUaOZ2AtS1mLtrGkDi35nqGSKEQ9Feuud8QzCHnpojl/s1600/regXtract.png" imageanchor="1"><img border="0" height="86" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0Ev5x6dtK89UCEBN5bMSn22NUmMjfx1yE_vxyoVcm93mFPC_mZ1jEzZseocwLaYCrksnpnxKk0x89QU4n1yzen8irQqwVeF7WGTUaOZ2AtS1mLtrGkDi35nqGSKEQ9Feuud8QzCHnpojl/s320/regXtract.png" width="320" /></a></div>
<b>2.b</b><br> Add a Debug sampler so that you can verify if the xpath extractor does retrieve the value.</br>
<br> To add a debug sampler right click on the Thread Group > Add > Sampler > Debug Sampler</br>
<br> To view contents of sampler you will have to add Listener.</br>
<br> Right Click on the Thread Group > Add > listener > View results tree </br>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTEstgrv01jtn5BOrMcuKbcm3I9ym6dQRyg_J8_F0gp3EnkCn8PsIT-kfjEqgmRTwJPCSsISjEGVU_Ek060Uf9rho9mMANXyNdpFsTlTy3HaHh7-dYdgI7tX1A3LOfEaaCx01rEf1pfLHD/s1600/idRetrieved.png" imageanchor="1"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTEstgrv01jtn5BOrMcuKbcm3I9ym6dQRyg_J8_F0gp3EnkCn8PsIT-kfjEqgmRTwJPCSsISjEGVU_Ek060Uf9rho9mMANXyNdpFsTlTy3HaHh7-dYdgI7tX1A3LOfEaaCx01rEf1pfLHD/s320/idRetrieved.png" width="318" /></a></div> </br>
<br>3.Add a HTTP request sampler - This is our request-2</br>
<br><b>3.a</b>Now that we have retrieved id's from our previous request we need those to send as a request, Hence we need to Pre Process before a request is made.</br>
<br><b>3.b</b> After adding your HTTP request sampler-2 </br>
<br><b>3.c </b> Right Click on the HTTP Sampler > Add > Pre-Processors > Beanshell Pre processor </br>
<b>Have a look at the figure</b>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2TIGUFT2V4UZ7rqlAYjV237sohDJUXsExgu8SvsdHiiknDb_hB_4IVRKE97XFp7XGHbAAclRHbZDgHWajxfnCS1Oqh1LAzcXNUwf8-1zPug7ej8Bf7R-cc-v-mt2Z4NiaTnvCvC-7P2l6/s1600/bshell.png" imageanchor="1"><img border="0" height="109" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2TIGUFT2V4UZ7rqlAYjV237sohDJUXsExgu8SvsdHiiknDb_hB_4IVRKE97XFp7XGHbAAclRHbZDgHWajxfnCS1Oqh1LAzcXNUwf8-1zPug7ej8Bf7R-cc-v-mt2Z4NiaTnvCvC-7P2l6/s320/bshell.png" width="320" /></a></div> </br>
<br><b>3.d</b> Now let's take a closer look at the BeanShell PreProcessor </br>
<br><b>3.e</b> Give a meaningful name for the PreProcessor just like i have given.</br>
<br><b>3.f</b> Now add the script where you want to build your request.</br>
<br>
int count = Integer.parseInt(vars.get("GET_EVENT_ID_matchNr"));</br>
<br>for(int i=1;i<=count;i++) {</br>
<br>String prefix = "eventInTopPackage[";</br>
<br>sampler.addArgument( prefix+vars.get("GET_EVENT_ID_" + i)+"]", vars.get("GET_EVENT_ID_" + i) );</br>
<br>}<br>
<br>Let's understand what we are achieving in the above script.</br>
<br><b>3.g</b> Get count of the matched id's that were retrived from Xpath Extractor.</br>
<br>prefix - Is constant/static value</br>
<br>param - Will now have eventInTopPackage[<event_id_value>] event_id_value</br>
<br>Have a look at the screen shot how request will look </br>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2j4kgMYSsniZr_HR1AiSUGeUs8796mjJ0ZcMvuR9ssLWlcDy32KSwB3xMRBTlOJE7x9xwIjRx1KeTmO0EIQHj6rvmKe-9k7Gut7HycajVUfuEH4tsd9tc4zKiGTvjhjicVm7DRit5rJFX/s1600/dynamicRequest.png" imageanchor="1" style=""><img border="0" height="228" width="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2j4kgMYSsniZr_HR1AiSUGeUs8796mjJ0ZcMvuR9ssLWlcDy32KSwB3xMRBTlOJE7x9xwIjRx1KeTmO0EIQHj6rvmKe-9k7Gut7HycajVUfuEH4tsd9tc4zKiGTvjhjicVm7DRit5rJFX/s320/dynamicRequest.png" /></a></div>
<a href="http://www.webstatsdomain.com/domains/automationwithselenium.blogspot.com/" target="_blank"><img src="http://www.webstatsdomain.com/widget/informer/automationwithselenium.blogspot.com/1-7.png" alt="automationwithselenium.blogspot.com-Google pagerank and Worth" title="automationwithselenium.blogspot.com-Google pagerank and Worth" style="border:none;"/></a>Shabanahttp://www.blogger.com/profile/13859572556639838691noreply@blogger.com0tag:blogger.com,1999:blog-5789136638033163154.post-16602531817357639062012-02-21T06:45:00.006-08:002013-02-12T06:27:44.808-08:00How to add a Xpath Assertion in JMeterAs i've mentioned in my earlier posts about how assertions can be of help in validating the right response code <br /><br />Xpath Assertion eases life when we have to validate if an object exists.<br /><br />For ex:<br /><br />Let's again take a shopping cart example.<br /><br />1.Search for an item<br />2.Add selected item to shopping cart > now we want to verify if the Add cart button is available on the page.<br /><br />Therefore we need to add a xpath assertion.<br /><br />Below screen shot should give a clear idea & how an expression is built.<br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgokaCyWdHaHXAH2orAu4v7SX9gULBmUFp_gdSvaIVsv7QMbElzY14bqOK1fieXablGlebzMOg-2eIgRht4dkON9798YvT8vM88GJG_QTTGBmj6OGCIv9tTYm8ikbWRK7IlRM32dTyP-mjF/s1600/xpathAssertion.png"><img style="cursor:pointer; cursor:hand;width: 320px; height: 82px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgokaCyWdHaHXAH2orAu4v7SX9gULBmUFp_gdSvaIVsv7QMbElzY14bqOK1fieXablGlebzMOg-2eIgRht4dkON9798YvT8vM88GJG_QTTGBmj6OGCIv9tTYm8ikbWRK7IlRM32dTyP-mjF/s320/xpathAssertion.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5711604968448425394" /></a><br /><br />Let's have a closer look at the Xpath Assertion.<br /><br />Add a xpath Assertion :<br /><br />1. Right Click on the HTTP Sampler > Assertions > Xpath Assertions.<br /><br />Once you'ev added the Xpath Assertion, now we have to add appropriate values so that we can assert object or value.<br /><br />1. Give a name to Xpath Assertion just like i have given not necessarily same.<br /><br />2. XML Parsing Options - Check the Checkbox's against "Use Tidy(tolerant parser) & Quiet".<br /><br />3. Xpath Assertion - contract the xpath & pass the xpath string within the Xpath Assertion.<br /><br />For ex : I am validating to see if the button with id "bestAvailableTickets_LookForTicketsButton"" exists on that page.<br /><br />I have left the "True if nothing matches" as unchecked as i want it to match.
<br>
<a href="http://www.webstatsdomain.com/domains/automationwithselenium.blogspot.com/" target="_blank"><img src="http://www.webstatsdomain.com/widget/informer/automationwithselenium.blogspot.com/1-7.png" alt="automationwithselenium.blogspot.com-Google pagerank and Worth" title="automationwithselenium.blogspot.com-Google pagerank and Worth" style="border:none;"/></a></br>Shabanahttp://www.blogger.com/profile/13859572556639838691noreply@blogger.com6tag:blogger.com,1999:blog-5789136638033163154.post-3383954236162922682012-02-21T03:51:00.021-08:002013-02-12T06:28:41.546-08:00How to post parameters with request in - JMeterWe most often have to post our request with dynamic parameters or even static parameters,It would be handy if we did find a way to post our parameters.<br /><br />For ex:<br /><br />Let's say that :<br /><br />1.I have a shopping cart as my application <br /><br />2.I am seaching for a item <br /><br />3.Adding it to my shopping basket<br /><br />Assuming that we figured out what are the parameters that we need to pass to the request.<br /><br />We can use FireBug as a tool to identify what are parameters that are sent with a request quickly (or)<br />We can use LiveHTTP Headers to do the same functionality of identifying what are variables that are dynamic,static,values/names of the object.<br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-J-sd-vSSu7dcCF3-1VvDuHRrRFskOFTgmGfo-bB5dlGdmgYIWUS6A3v5fplXb1MgehEv41z4EVP2DWw4yKBhh-wXOGLVhW_Yav6ZFmneG5AitHxBVAHEaSXy-oAFLndPtHambKTs0j2j/s1600/postParams.png"><img style="cursor:pointer; cursor:hand;width: 320px; height: 146px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-J-sd-vSSu7dcCF3-1VvDuHRrRFskOFTgmGfo-bB5dlGdmgYIWUS6A3v5fplXb1MgehEv41z4EVP2DWw4yKBhh-wXOGLVhW_Yav6ZFmneG5AitHxBVAHEaSXy-oAFLndPtHambKTs0j2j/s320/postParams.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5711559680089784914" /></a><br /><br />So let's have a closer look at the image above.<br /><br />1. Add a sampler viz., the HTTP Request give a name to the request just as i have given.<br /><br />2. Method is "POST" we have different webmethods for each request we do.<br /><br />3. POST method uses web method which means that you are posting a request to the <br /> server & the response will be sent inturn to the server.<br /><br />4. To avoid the hiccups we face in future let's parametrise the dynamic content by passing it as a variable either as user parameter or from a CSV file.<br /><br />5. Click on the Follow Redirects & Use Keepalive so that we can have a look at if there are any redirests that occur.<br /><br />8. Now let's have a look at the parameters which we have to pass through our request.<br /><br />9. Make sure you know what the application code rather id for an object is called as,you can find out this by using Firebug or Live HTTP Headers both the name & value.<br /><br />10.We send the Name Value pair as request so name is the id/name that uniquely identifies an object on the application.<br /><br />11.It sometimes rather often happens that we don't want to change the values frequently in those scenarios you can read values from a CSV file.
<br><a href="http://www.webstatsdomain.com/domains/automationwithselenium.blogspot.com/" target="_blank"><img src="http://www.webstatsdomain.com/widget/informer/automationwithselenium.blogspot.com/1-7.png" alt="automationwithselenium.blogspot.com-Google pagerank and Worth" title="automationwithselenium.blogspot.com-Google pagerank and Worth" style="border:none;"/></a></br>Shabanahttp://www.blogger.com/profile/13859572556639838691noreply@blogger.com1tag:blogger.com,1999:blog-5789136638033163154.post-8144672705018154792012-02-21T02:36:00.009-08:002013-02-12T06:28:51.734-08:00Adding Response Assertions<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5n4qeslp1bQI18hvgSHTbX-eqCLnvYyoMA4pwaWHqJvVaUicEW_wEwLB_LPnJPR4UaRzJWI4Criv7z_MukAygE4Dn4KbxOz32qiChPBxaZkoicX0DgqWLSnFQn45qFHbw_5svd7cwNDSZ/s1600/respAssertion.png"><img style="cursor:pointer; cursor:hand;width: 320px; height: 106px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5n4qeslp1bQI18hvgSHTbX-eqCLnvYyoMA4pwaWHqJvVaUicEW_wEwLB_LPnJPR4UaRzJWI4Criv7z_MukAygE4Dn4KbxOz32qiChPBxaZkoicX0DgqWLSnFQn45qFHbw_5svd7cwNDSZ/s320/respAssertion.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5711553486628737250" /></a><br />It is often important that we validate the response we receive for every request we had sent to the server.<br /><br />We can achieve this by adding a response assertion to the sampler.<br /><br />There are various types of assertions you will have to identify what serves your purpose & work accordingly.<br /><br />Add a response assertion by right clicking on the sampler > Assertions > Response Assertion - Have a look at the fig1<br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuhZvO5YWohfafae84Abi8VsU32VL1twRvc_B7VHeGjSbQKXvmG3_Z1knt43YdYFEA1piKf4cZ44LVM9BbSiRQylFPkZhdro2_aNgPjIJHX4InZNRH9Z2n9XWiFw4xgMpKjNPzuA2TvtJQ/s1600/respAssertion1.png"><img style="cursor:pointer; cursor:hand;width: 250px; height: 320px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuhZvO5YWohfafae84Abi8VsU32VL1twRvc_B7VHeGjSbQKXvmG3_Z1knt43YdYFEA1piKf4cZ44LVM9BbSiRQylFPkZhdro2_aNgPjIJHX4InZNRH9Z2n9XWiFw4xgMpKjNPzuA2TvtJQ/s320/respAssertion1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5711550698150725970" /></a><br /><br /><br />Now that we have added a response assertion let's have a closer look at the settings & values we are looking for identifying/validating our response.<br /><br />1.Add a name to teh response assertion so that you know when it fails.<br /><br />2.Select the radio button Main Sample only - this looks for text you are looking for in the main sampler.<br /><br />3.Let's select "Text Response" as we are going to validate the same.<br /><br />4.Pattern of matching - Helps in identifying what operation rules you want to apply a wider search pattern would be "Contains" so that pattern matching ignores the pre & post text & just look for "Pattern String".<br /><br />5.In Patterns to Test - Click the Add button just below the patterns to test "enter the text you want to validate".<br /><br /><br />It is that easy ... Adding a response assertion.
<a href="http://www.webstatsdomain.com/domains/automationwithselenium.blogspot.com/" target="_blank"><img src="http://www.webstatsdomain.com/widget/informer/automationwithselenium.blogspot.com/1-7.png" alt="automationwithselenium.blogspot.com-Google pagerank and Worth" title="automationwithselenium.blogspot.com-Google pagerank and Worth" style="border:none;"/></a>Shabanahttp://www.blogger.com/profile/13859572556639838691noreply@blogger.com0tag:blogger.com,1999:blog-5789136638033163154.post-15459908422039676502012-02-16T04:37:00.009-08:002013-02-12T06:29:09.062-08:00How to add user defined variables in JMeter at Test Plan levelUser defined variables with JMeter can be defined at various levels.<br /><br />1.At a Test Plan level adding here will result in using the variables across the thread groups it could range from variables to passing the csv file.<br /><br />Here's the screen shot :<br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuWaOXIJZzlwYp25jxmqPT0Tha28QqmSLpFWcxsIziHywdWvwAbYkHhueN940f0vfnB3h1y56L0hZTsGICqOPsD2UT0FHUzwbQtB3AzQGeYla6Kr2Nz8NBfwbSqEwY5vYd00D7tFt6n1w7/s1600/udv.png"><img style="cursor:pointer; cursor:hand;width: 320px; height: 225px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuWaOXIJZzlwYp25jxmqPT0Tha28QqmSLpFWcxsIziHywdWvwAbYkHhueN940f0vfnB3h1y56L0hZTsGICqOPsD2UT0FHUzwbQtB3AzQGeYla6Kr2Nz8NBfwbSqEwY5vYd00D7tFt6n1w7/s320/udv.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5709771000904215522" /></a><br /><br />2.At a Thread Group level by adding a pre processor > User parameters.<br />This is usually used when you want to iterate through 'n' users it is preferred to read from a external file if the data is massive.<br /><br />However let me show you details on how to add a user,delete a user ,add variable & delete a variable.<br /><br />When we add at a thread group level it acts global to that thread group & all those samplers within that thread group.<br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZQ0JA0JbLxjyXhbHKS5RN75wUPlRT5jDriGHDxV-jmuyxpcK5Gsmejw1AP3w5xIwr1jmTOXFHgTDWzzXsh236o4yiD_o2GcHK8ydAEuJVrUekplfgWTSAqALluAmEpu-IYt_e-uhqvgVZ/s1600/userparametes.png"><img style="cursor:pointer; cursor:hand;width: 320px; height: 194px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZQ0JA0JbLxjyXhbHKS5RN75wUPlRT5jDriGHDxV-jmuyxpcK5Gsmejw1AP3w5xIwr1jmTOXFHgTDWzzXsh236o4yiD_o2GcHK8ydAEuJVrUekplfgWTSAqALluAmEpu-IYt_e-uhqvgVZ/s320/userparametes.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5709771800829870146" /></a><br /><br /><br />3.Sampler Level by adding a pre processor > User Parameters.<br /><br />Adding user parameter at sampler level is more like a local variable to that sampler.<br /><br />It is accessed by right clicking on the sampler >> pre processor >> user parameters
<a href="http://www.webstatsdomain.com/domains/automationwithselenium.blogspot.com/" target="_blank"><img src="http://www.webstatsdomain.com/widget/informer/automationwithselenium.blogspot.com/1-7.png" alt="automationwithselenium.blogspot.com-Google pagerank and Worth" title="automationwithselenium.blogspot.com-Google pagerank and Worth" style="border:none;"/></a>Shabanahttp://www.blogger.com/profile/13859572556639838691noreply@blogger.com0tag:blogger.com,1999:blog-5789136638033163154.post-850924675393048682012-02-13T06:27:00.008-08:002012-05-23T04:39:15.573-07:00Using XPATH ExtrcatorXpath plays a vital role when you want to extract value of an object present in one request and pass fetched value on to a next request.<br /><br />This is more often true when you never know what would be the id in simple terms if the value is dynamic & changes for every request.<br /><br />Let's take a shopping cart example:<br /><br /><br><b>1. </b> When we add items to the cart we never know what forms a cartId,if we have to pass that cartId to the basket.<br /><br />So let's extract the value of Id by passing a xpath query to search for the name "cartId" - This can be determined either by firebug if you are on firefox or debugbar if you are on Internet explorer.<br /><br />
<br><b>2.</b>Add a debug sampler so that you will know what is returned in the variable you stored.<br />
<br><b>3.</b>How do we add a XPATH Extractor to our HTTP request. </br>
<br><b>3.a </b>Right Click the HTTP request </br>
<br><b>3.b </b> Click on Add >> Post Processors > Xpath Extractor<br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5ZOUyii_GDrt5V1WfeYZb3d8zKj0oy3987plCXU4G4iQ3D_4NL-1EEhyirBEhKr8u_d7ZOpn_oYvit9IcfLKzHzQPfO02UnH3rlFrKvTjykAt5lOI4rjanneJrtbps34BOTF9t51t9dO7/s1600/addXpathExtractor.png"><img style="cursor:pointer; cursor:hand;width: 320px; height: 233px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5ZOUyii_GDrt5V1WfeYZb3d8zKj0oy3987plCXU4G4iQ3D_4NL-1EEhyirBEhKr8u_d7ZOpn_oYvit9IcfLKzHzQPfO02UnH3rlFrKvTjykAt5lOI4rjanneJrtbps34BOTF9t51t9dO7/s320/addXpathExtractor.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5708633018874651554" /></a><br /><br />
<br><b>4. </b>Let's have a closer look at the XPATH Extractor.<br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNVIDPGmlKti5tMAVajvpKn5WTKetOU8_48AABCbh36Il0EaEB5_i4Lkdgf2wzCnGs8iH_KO40GOD_QDuNqjkxbEUZPmoaZ5CL-tJZ5pDPZS_mrkmOYi_4yYv1lEzgmmjNwWMm5gPpbu4Y/s1600/xpathExtractor.png"><img style="cursor:pointer; cursor:hand;width: 320px; height: 148px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNVIDPGmlKti5tMAVajvpKn5WTKetOU8_48AABCbh36Il0EaEB5_i4Lkdgf2wzCnGs8iH_KO40GOD_QDuNqjkxbEUZPmoaZ5CL-tJZ5pDPZS_mrkmOYi_4yYv1lEzgmmjNwWMm5gPpbu4Y/s320/xpathExtractor.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5708634930115953042" /></a><br />
<br /><b>4.a </b> Give a name to the xpath extractor.<br />
<br><b>4.b </b> Check the Use Tidy and the Quiet<br />
<br><b>4.c </b> Add Reference name - It is like a variable name<br />
<br><b>4.d </b> Pass the Xpath query<br />
<br><b>4.e </b> Pass the default value it will displayed if there is no value being fetched from the query.Shabanahttp://www.blogger.com/profile/13859572556639838691noreply@blogger.com0tag:blogger.com,1999:blog-5789136638033163154.post-2564407570444561462012-02-13T06:17:00.004-08:002013-02-12T06:29:19.730-08:00GUI View - System / JMeter Properties.JMeter Properties let's us have a look at the Jmeter.Properties file that is placed within the bin folder of the jmeter installation directory you.<br /><br />It gives a nice GUI view as against the files being edited.<br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUrd1W7WFMl8eDVaij9rfrIaMT5W_F0vVEA82IlnZLZqDFoa6wvVDkT-S7P3M-X-nhaDBRRL500dB7BvpqqetBVo97pBQdaxQgpQNaUf0qtMV-n6cnIzHlM2X8-6kBjC3gn0JdnuO41Sad/s1600/jmProperties.png"><img style="cursor:pointer; cursor:hand;width: 320px; height: 174px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUrd1W7WFMl8eDVaij9rfrIaMT5W_F0vVEA82IlnZLZqDFoa6wvVDkT-S7P3M-X-nhaDBRRL500dB7BvpqqetBVo97pBQdaxQgpQNaUf0qtMV-n6cnIzHlM2X8-6kBjC3gn0JdnuO41Sad/s320/jmProperties.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5708626141568607730" /></a><br /><br />To have a look at the Property file.<br /><br />1.Right Click on the work bench.<br />2.Add Non- Test Elements.<br />3.Property Display.<br /><br />Will result in displaying all properties of the JMeter.You can select to view the system properties or the JMeter Properties.
<a href="http://www.webstatsdomain.com/domains/automationwithselenium.blogspot.com/" target="_blank"><img src="http://www.webstatsdomain.com/widget/informer/automationwithselenium.blogspot.com/1-7.png" alt="automationwithselenium.blogspot.com-Google pagerank and Worth" title="automationwithselenium.blogspot.com-Google pagerank and Worth" style="border:none;"/></a>Shabanahttp://www.blogger.com/profile/13859572556639838691noreply@blogger.com0tag:blogger.com,1999:blog-5789136638033163154.post-18356926584667250922012-01-29T04:08:00.007-08:002013-02-12T06:29:35.269-08:00JMeter proxyMost of those who fancy with commercial tools & those feel its cool to have a record & playback functionality so that they don't have to bother to the nitty gritty details of organising which parameters to send with a request,how an object is identified and so forth.<br /><br />Here are steps to record :<br /><br />Pre requisite :<br />---------------<br />1.Download jmeter from the jmeter.org website am on jakarta-jmeter-2.5<br /><br />Download :http://jmeter.apache.org/download_jmeter.cgi<br /><br />User manual : http://jmeter.apache.org/usermanual/index.html<br /><br />2.Ensure that you are on a jdk version higher than 1.5.<br /><br />3.Ensure that you set the classpath to bin for both jdk & jmeter.<br /><br />4.Verify that you have set the classpath correctly.<br /><br />All right now let's get started recording.<br /><br />1.Right click on workbench navigate all the way upto HTTP Proxy server as shown in the fig -1<br /><div><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBZxJRruNxlNFBwtzeSrCBmYGOhRR5ofa48X8YuPeMgKOWV1DLXuVcmO3ZPPlj7NqyUGDrbGogm1bguLxBCv6_YowYMj-1K_70qA35d8UaQFdBpsnlGmqfoddTY370riEpmnCJDv44oFfo/s1600/gotoProxyserver.png"><img style="cursor:pointer; cursor:hand;width: 320px; height: 240px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBZxJRruNxlNFBwtzeSrCBmYGOhRR5ofa48X8YuPeMgKOWV1DLXuVcmO3ZPPlj7NqyUGDrbGogm1bguLxBCv6_YowYMj-1K_70qA35d8UaQFdBpsnlGmqfoddTY370riEpmnCJDv44oFfo/s320/gotoProxyserver.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5703033921554925122" /></a><br /></div><br /><br />2.Now that we have added proxy server to work bench before we start recording let's make a few tweaks to the proxy server controller follow fig -2.<br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqRBnjd-48-Vir3IoUiMnRCBydF6m82MDP5xmlJeLMCUPrf4N1FlVEBj6zMGLBuZa3ou6LwHwyKQ1LkunQuRcXuASem7Fm94WG5XXIVJDtiDD4wqqmg0OsU_t-Ybx1_Qhd3-j3EAuljiuF/s1600/settings.png"><img style="cursor:pointer; cursor:hand;width: 320px; height: 170px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqRBnjd-48-Vir3IoUiMnRCBydF6m82MDP5xmlJeLMCUPrf4N1FlVEBj6zMGLBuZa3ou6LwHwyKQ1LkunQuRcXuASem7Fm94WG5XXIVJDtiDD4wqqmg0OsU_t-Ybx1_Qhd3-j3EAuljiuF/s320/settings.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5703040699366829698" /></a><br /><br />2.a : Add a name to Proxy - It is not mandatory to add a name, Also it is to be remembered that proxy settings will not get saved once you close your test.<br /><br />2.b : Configure to a port number of your choice or leave to the default 8080.<br /><br />2.c : Check boxes for Add Assertions,Regex Matching.<br /><br />2.d : Check boxes for follow Redirects (This helps us capture the redirection).<br /><br />2.e : URL patterns to include add the resources that you want to include by clicking the add button.<br /><br />2.f : URL patterns to exclude add the resources that you want to exclude by clicking the add button most often it is the css,js,png,gif(we don't want to get most these load tested).<br /><br />3.Now that we have configured to a Proxy server,let's move on to Test Plan give a name to Test Plan as shown in fig - 3.<br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3Ja2mPrDKQdz2hVB95BcjPERw6sc386J2yqFXiscPHtMcfPVYgHV7SzL5u0wof7AjYVhvIKKCU1TIJSa0xPPNxafLupYNSvy7ypxAyEvKoRHrSDM5gY95wIRfSteqw2YE1SdLMiJL6F8W/s1600/saveTP.png"><img style="cursor:pointer; cursor:hand;width: 320px; height: 170px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3Ja2mPrDKQdz2hVB95BcjPERw6sc386J2yqFXiscPHtMcfPVYgHV7SzL5u0wof7AjYVhvIKKCU1TIJSa0xPPNxafLupYNSvy7ypxAyEvKoRHrSDM5gY95wIRfSteqw2YE1SdLMiJL6F8W/s320/saveTP.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5703042129266512114" /></a><br /><br />4.Add a Thread group give a name to thread group<br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHliRhQClTRPPO4bY96Xxd8UkI6kRuZi0om7ltil8GnUOcj85zCNBnHNBtRS4b-NkDo4V7nDeDzQaQwH17ZV7rkXvlD5Uo5SeeSsjJFnj0CLT8W1APESZ68ahB4banfGoJ_Hi6XR67y7nU/s1600/threadGroup.png"><img style="cursor:pointer; cursor:hand;width: 320px; height: 170px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHliRhQClTRPPO4bY96Xxd8UkI6kRuZi0om7ltil8GnUOcj85zCNBnHNBtRS4b-NkDo4V7nDeDzQaQwH17ZV7rkXvlD5Uo5SeeSsjJFnj0CLT8W1APESZ68ahB4banfGoJ_Hi6XR67y7nU/s320/threadGroup.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5703106957598039794" /></a><br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhj1Ij5RBe7qCEFynKmi7FdbHQW3VxVl8yw0mxA7LTU4Ddwh6h-Lc18sw9hWIh1czjdKFYDbMSKXnMSU5_Bse_HaGp5kYJbxswWjq2FvEkmoMRAB2aYPXjJiq_pAWfzKLtX-lkIZhd-v5po/s1600/threadProperties.png"><img style="cursor:pointer; cursor:hand;width: 320px; height: 170px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhj1Ij5RBe7qCEFynKmi7FdbHQW3VxVl8yw0mxA7LTU4Ddwh6h-Lc18sw9hWIh1czjdKFYDbMSKXnMSU5_Bse_HaGp5kYJbxswWjq2FvEkmoMRAB2aYPXjJiq_pAWfzKLtX-lkIZhd-v5po/s320/threadProperties.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5703107147142241170" /></a><br /><br />5.Now that we have a our test plan ,thread group,proxy settings in place.<br />Let's move on to setting up the browser.<br /><br />5.a. Go to Tools > Internet options > Change the proxy settings.<br /><br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRzNE9_V2NfnegymyTliY1o4xeZ1zFNLyDZhyIwqhB61DatoJZxXXtMbuLF91BlsUb5tKdlnOT1xttFYR2vLCLm47GIU480kS31vO-mkHW3zHwdPc5_3nLC3IkQWnNnbs7rH3CD9mifQxC/s1600/prxySetting.png"><img style="cursor:pointer; cursor:hand;width: 320px; height: 230px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRzNE9_V2NfnegymyTliY1o4xeZ1zFNLyDZhyIwqhB61DatoJZxXXtMbuLF91BlsUb5tKdlnOT1xttFYR2vLCLm47GIU480kS31vO-mkHW3zHwdPc5_3nLC3IkQWnNnbs7rH3CD9mifQxC/s320/prxySetting.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5703127991255053490" /></a><br /><br />6.You can have a look at how the recorded script looks like<br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEqG3QlblEimbeUeZcryxXwenLINb3hiPQ5BJhl48Z7ZbTt9Ju11uk2cor-sBG50cjEvwaDABP_oaherUGlV5LtOaedAidVL0R_ytTZqWOraO6lxBB2r9EeqZPtTUsMn87Ja7iIu1nZ2Ll/s1600/proxyThreadGroup.png"><img style="cursor:pointer; cursor:hand;width: 320px; height: 205px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEqG3QlblEimbeUeZcryxXwenLINb3hiPQ5BJhl48Z7ZbTt9Ju11uk2cor-sBG50cjEvwaDABP_oaherUGlV5LtOaedAidVL0R_ytTZqWOraO6lxBB2r9EeqZPtTUsMn87Ja7iIu1nZ2Ll/s320/proxyThreadGroup.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5708623853051365458" /></a><br /><br />6.a Give a name to the http request.<br /><br />6.b Server name will be grabbed here.<br /><br />6.c Path will be recorded.<br /><br />6.d By Default Follow Redirects will be checked,uncheck that & check the Redirect Automatically so that can help you in understanding how your request was redirected.<br /><br />6.e Send Parameters will let you know what are the parameters that were passed on.
<a href="http://www.webstatsdomain.com/domains/automationwithselenium.blogspot.com/" target="_blank"><img src="http://www.webstatsdomain.com/widget/informer/automationwithselenium.blogspot.com/1-7.png" alt="automationwithselenium.blogspot.com-Google pagerank and Worth" title="automationwithselenium.blogspot.com-Google pagerank and Worth" style="border:none;"/></a>Shabanahttp://www.blogger.com/profile/13859572556639838691noreply@blogger.com0