Posts

Showing posts from 2012

Clearing all event logs

Here is the code to clean up all event logs in the current machine/server. The code is in power shell, as some people feel this is the best language to write scripts on Windows. strComputer = "." Set oWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate,(Security)}!\\" & _ strComputer & "\root\cimv2" ) Set cLogFiles = oWMIService.ExecQuery _ ("SELECT * FROM Win32_NTEventLogFile" ) For Each oLogfile in cLogFiles Wscript.echo("Clearing Logfile " + oLogFile.Name) oLogFile.ClearEventLog() Next

Web driver script

Hasan from Trainline shared with us Selenium WebDriver script. I was using Selenium before Web Driver came into the picture. Need to try this out.   using System; using NUnit.Framework; using OpenQA.Selenium; using OpenQA.Selenium.IE ; using OpenQA.Selenium.Remote; using OpenQA.Selenium.Support.UI; namespace WebDriver {     [TestFixture] class TrainlineTest     {         [Test] public void webDriverTest()         { var ieCapabilities = DesiredCapabilities.InternetExplorer();             ieCapabilities.SetCapability(InternetExplorerDriver.IntroduceInstabilityByIgnoringProtectedModeSettings, true); var driver = new InternetExplorerDriver(ieCapabilities);             driver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(10));       ...

The best file search utility–fast and free

Image
I have come across Agent Ransack and it was really fast. Works well if you want to search for text inside a particular file. Initial screen Searching for the text “sync tool is run”.

Visual Studio 2008 Load Test Gotchas!

  I really like this link: http://www.codeproject.com/KB/testing/VS2008LoadTestGotchas.aspx This was shared by our NFT SME.