In order to handle JavaScript dialog using WebAii I used following command
manager.DialogMonitor.AddDialog(new AlertDialog(manager.ActiveBrowser,DialogButton.OK)); // Dialog which clicks on OK button
manager.DialogMonitor.Start();
manager.ActiveBrowser.Actions.Click(Element) // Click on link
ASP.NET, C#.NET, CruiseControl.NET, Microsoft SQL Server, MS-DOS Batch, MySQL, nAnt, NodeJs, PowerShell, Python, Selenium RC, Redis, WebAii, Ubuntu
Tuesday, January 25, 2011
Wednesday, January 19, 2011
Test Fixtures in Visual Studio Unit Testing Framework
Today I learned that,
[ClassInitialize()] fixture in VS Test Framework is [TestFixtureSetUp] in NUnit
and
[ClassCleanup()] fixture in VS Test Framework is [TestFixtureTearDown] in NUnit
[ClassInitialize()] fixture in VS Test Framework is [TestFixtureSetUp] in NUnit
and
[ClassCleanup()] fixture in VS Test Framework is [TestFixtureTearDown] in NUnit
Tuesday, January 18, 2011
Find silverlight element using XamlPath
In order to find Silverlight element using WebAii by XamlPath expression I used following syntax
FrameworkElement myElement = app.Find.ByExpression(new XamlFindExpression("Name=TabsContainer", "XamlTag=grid", "|", "XamlPath=/radtabcontrol[automationid=Tabs]/grid[0]/raddockpanel[0]/layouttransformcontrol[name=HeaderDockedElement]/grid[name=RootVisual]/contentpresenter[name=ContentPresenter]/grid[0]/raddockpanel[0]/scrollviewer[automationid=ScrollViewerElement]/border[0]/grid[0]/scrollcontentpresenter[name=ScrollContentPresenter]/itemspresenter[0]/tabwrappanel[0]/radtabitem[0]"));
FrameworkElement myElement = app.Find.ByExpression(new XamlFindExpression("Name=TabsContainer", "XamlTag=grid", "|", "XamlPath=/radtabcontrol[automationid=Tabs]/grid[0]/raddockpanel[0]/layouttransformcontrol[name=HeaderDockedElement]/grid[name=RootVisual]/contentpresenter[name=ContentPresenter]/grid[0]/raddockpanel[0]/scrollviewer[automationid=ScrollViewerElement]/border[0]/grid[0]/scrollcontentpresenter[name=ScrollContentPresenter]/itemspresenter[0]/tabwrappanel[0]/radtabitem[0]"));
Thursday, December 16, 2010
Search and Replace multi-line text
In order to refactor code I used Text Crawler tool. Very powerful tool where one can search and replace multi-line text
Tuesday, November 16, 2010
echo without newline
In order to not output the trailing newline using echo, I used the following command
echo -n "testString"
echo -n "testString"
Sunday, September 12, 2010
MMS support in Windows Media player 12
On windows 7, in order to play streams using mmm protocol using windows media player 12, I executed the following command from cmd prompt.
regsvr32 wmnetmgr.dll
regsvr32 wmnetmgr.dll
Monday, August 30, 2010
Ports assosciated with process
In order to see which ports are associated with which process, I used following Unix command
lsof -i4 -P
lsof -i4 -P
Sunday, July 25, 2010
Show sound control in windows taskbar
In order to show the sound control in windows taskbar I used following command from windows/i386 installation directory
expand -r sndvol32.ex_ %systemroot%\system32
and later enabled from Control Panel => Sounds and Devices => Show sound control in taskbar
expand -r sndvol32.ex_ %systemroot%\system32
and later enabled from Control Panel => Sounds and Devices => Show sound control in taskbar
Monday, June 07, 2010
Add shortcut to Send To menu
In order to add shortcut to Send To right click Windows menu I added destination shortcut at %APPDATA%\Microsoft\Windows\SendTo
Friday, March 26, 2010
Disable jQuery Lightbox close when clicked outside popup
To remove the closing functionality of the jQuery Lightbox popup when clicked outside the popup I changed the functions as follows
From
$("#overlay").click(function(){ end(); }).hide();
$("#lightbox").click(function(){ end();}).hide();
To
$("#overlay").click(function(){ });
$("#lightbox").click(function(){ });
From
$("#overlay").click(function(){ end(); }).hide();
$("#lightbox").click(function(){ end();}).hide();
To
$("#overlay").click(function(){ });
$("#lightbox").click(function(){ });
Wednesday, March 10, 2010
Gem installation without documentation
In order to install gem without documentation I used the following command
sudo gem install dm-timestamps -v=0.10.2 --no-rdoc --no-ri
sudo gem install dm-timestamps -v=0.10.2 --no-rdoc --no-ri
Tuesday, March 02, 2010
Update installed gem version
In order to update the gem I used following commnad under Ubuntu
sudo gem update --system
sudo gem update --system
Monday, March 01, 2010
Replace string with shell script parameter using sed command
In order to change string inside a file using shell script I used the following command in the shell script, where inside myFile.xml, oldString is the string I want to replace with the string contained in the first parameter passed to the shell script.
sed -i 's/oldString/'"$1"'/g' /home/healthy/myFile.xml
sed -i 's/oldString/'"$1"'/g' /home/healthy/myFile.xml
Friday, February 26, 2010
Copy directory in Unix
To copy the whole directory in Unix, I used the following command
cp -R /home/yogesh/sourceDir /home/yogesh/destinationDir
cp -R /home/yogesh/sourceDir /home/yogesh/destinationDir
Share directory between Ubuntu guest and Windows host using Virtualbox
In order to mount shared folder for Ubuntu guest with Windows host using VirtualBox I used the following commands
sudo mkdir /mnt/windir
sudo mount.vboxsf shared /mnt/windir
In virtual box seetings, I created shared path as c:\virtual\shared and folder name is shared.
sudo mkdir /mnt/windir
sudo mount.vboxsf shared /mnt/windir
In virtual box seetings, I created shared path as c:\virtual\shared and folder name is shared.
Tuesday, February 16, 2010
Ubuntu Server proxy settings
Ubuntu Server http proxy seetings I found inside file at
/etc/apt/apt.conf
/etc/apt/apt.conf
Using grep command recursively
I used following command on Ubuntu server to find specific string under directories recursively, where /etc/ is root path under which I am interested to search.
grep -r 'myString' /etc/
grep -r 'myString' /etc/
Monday, February 08, 2010
Set HTTP proxy under Ubuntu server
In order to set proxy globally on Ubuntu sever, I added following line to /etc/bash.bashrc file.
export http_proxy="http://serverName:8080"
export http_proxy="http://serverName:8080"
Friday, January 29, 2010
Change timezone on Ubuntu Server
In order to change timezone on Ubuntu server I used the following command
sudo dpkg-reconfigure tzdata
sudo dpkg-reconfigure tzdata
Check MySQL version
In order to check MySQL version I used the following SQL query
show variables like 'version';
show variables like 'version';
Subscribe to:
Comments (Atom)