Other randomzz


Windows 'Run' commands:


Accessibility Controlsaccess.cpl
Accessibility Wizardaccwiz
Add Hardware Wizardhdwwiz.cpl
Add/Remove Programsappwiz.cpl
Administrative Toolscontrol admintools
Adobe Acrobat (if installed)acrobat
Adobe Designer (if installed)formdesigner
Adobe Distiller (if installed)acrodist
Adobe ImageReady (if installed)imageready
Adobe Photoshop (if installed)photoshop
Automatic Updateswuaucpl.cpl
Bluetooth Transfer Wizardfsquirt
Calculatorcalc
Certificate Managercertmgr.msc
Character Mapcharmap
Check Disk Utilitychkdsk
Clipboard Viewerclipbrd
Command Promptcmd
Component Servicesdcomcnfg
Computer Managementcompmgmt.msc
Control Panelcontrol
Date and Time Propertiestimedate.cpl
DDE Sharesddeshare
Device Managerdevmgmt.msc
Direct X Control Panel (if installed)*directx.cpl
Direct X Troubleshooterdxdiag
Disk Cleanup Utilitycleanmgr
Disk Defragmentdfrg.msc
Disk Managementdiskmgmt.msc
Disk Partition Managerdiskpart
Display Propertiescontrol desktop
Display Propertiesdesk.cpl
Display Properties (w/Appearance Tab Preselected)control color
Dr. Watson System Troubleshooting Utilitydrwtsn32
Driver Verifier Utilityverifier
Event Viewereventvwr.msc
Files and Settings Transfer Toolmigwiz
File Signature Verification Toolsigverif
Findfastfindfast.cpl
Firefox (if installed)firefox
Folders Propertiesfolders
Fontscontrol fonts
Fonts Folderfonts
Free Cell Card Gamefreecell
Game Controllersjoy.cpl
Group Policy Editor (XP Prof)gpedit.msc
Hearts Card Gamemshearts
Help and Supporthelpctr
HyperTerminalhypertrm
Iexpress Wizardiexpress
Indexing Serviceciadv.msc
Internet Connection Wizardicwconn1
Internet Exploreriexplore
Internet Propertiesinetcpl.cpl
Internet Setup Wizardinetwiz
IP Configuration (Display Connection Configuration)ipconfig /all
IP Configuration (Display DNS Cache Contents)ipconfig /displaydns
IP Configuration (Delete DNS Cache Contents)ipconfig /flushdns
IP Configuration (Release All Connections)ipconfig /release
IP Configuration (Renew All Connections)ipconfig /renew
IP Configuration (Refreshes DHCP & Re-Registers DNS)ipconfig /registerdns
IP Configuration (Display DHCP Class ID)ipconfig /showclassid
IP Configuration (Modifies DHCP Class ID)ipconfig /setclassid
Java Control Panel (if installed)jpicpl32.cpl
Java Control Panel (if installed)javaws
Keyboard Propertiescontrol keyboard
Local Security Settingssecpol.msc
Local Users and Groupslusrmgr.msc
Logs You Out Of Windowslogoff
Malicious Software Removal Toolmrt
Microsoft Access (if installed)msaccess
Microsoft Chatwinchat
Microsoft Excel (if installed)excel
Microsoft Frontpage (if installed)frontpg
Microsoft Movie Makermoviemk
Microsoft Paintmspaint
Microsoft Powerpoint (if installed)powerpnt
Microsoft Word (if installed)winword
Microsoft Syncronization Toolmobsync
Minesweeper Gamewinmine
Mouse Propertiescontrol mouse
Mouse Propertiesmain.cpl
Nero (if installed)nero
Netmeetingconf
Network Connectionscontrol netconnections
Network Connectionsncpa.cpl
Network Setup Wizardnetsetup.cpl
Notepadnotepad
Nview Desktop Manager (if installed)nvtuicpl.cpl
Object Packagerpackager
ODBC Data Source Administratorodbccp32.cpl
On Screen Keyboardosk
Opens AC3 Filter (if installed)ac3filter.cpl
Outlook Expressmsimn
Paintpbrush
Password Propertiespassword.cpl
Performance Monitorperfmon.msc
Performance Monitorperfmon
Phone and Modem Optionstelephon.cpl
Phone Dialerdialer
Pinball Gamepinball
Power Configurationpowercfg.cpl
Printers and Faxescontrol printers
Printers Folderprinters
Private Character Editoreudcedit
Quicktime (If Installed)QuickTime.cpl
Quicktime Player (if installed)quicktimeplayer
Real Player (if installed)realplay
Regional Settingsintl.cpl
Registry Editorregedit
Registry Editorregedit32
Remote Access Phonebookrasphone
Remote Desktopmstsc
Removable Storagentmsmgr.msc
Removable Storage Operator Requestsntmsoprq.msc
Resultant Set of Policy (XP Prof)rsop.msc
Scanners and Camerassticpl.cpl
Scheduled Taskscontrol schedtasks
Security Centerwscui.cpl
Servicesservices.msc
Shared Foldersfsmgmt.msc
Shuts Down Windowsshutdown
Sounds and Audiommsys.cpl
Spider Solitare Card Gamespider
SQL Client Configurationcliconfg
System Configuration Editorsysedit
System Configuration Utilitymsconfig
System File Checker Utility (Scan Immediately)sfc /scannow
System File Checker Utility (Scan Once At The Next Boot)sfc /scanonce
System File Checker Utility (Scan On Every Boot)sfc /scanboot
System File Checker Utility (Return Scan Setting To Default)sfc /revert
System File Checker Utility (Purge File Cache)sfc /purgecache
System File Checker Utility (Sets Cache Size to size x)sfc /cachesize=x
System Informationmsinfo32
System Propertiessysdm.cpl
Task Managertaskmgr
TCP Testertcptest
Telnet Clienttelnet
Tweak UI (if installed)tweakui
User Account Managementnusrmgr.cpl
Utility Managerutilman
Windows Address Bookwab
Windows Address Book Import Utilitywabmig
Windows Backup Utility (if installed)ntbackup
Windows Explorerexplorer
Windows Firewallfirewall.cpl
Windows Magnifiermagnify
Windows Management Infrastructurewmimgmt.msc
Windows Media Playerwmplayer
Windows Messengermsmsgs
Windows Picture Import Wizard (need camera connected)wiaacmgr
Windows System Security Toolsyskey
Windows Update Launcheswupdmgr
Windows Version (to show which version of windows)winver
Windows XP Tour Wizardtourstart
Wordpadwrite

MS Windows Keyboard short(cuts)

More than 100 Keyboard Shortcuts must read (Microsoft Windows) 
1. CTRL+C (Copy)
2. CTRL+X (Cut) ... 
3. CTRL+V (Paste)
4. CTRL+Z (Undo)
5. DELETE (Delete)
6. SHIFT+DELETE (Delete the selected item permanently without placing the item in the Recycle Bin)
7. CTRL while dragging an item (Copy the selected item)
8. CTRL+SHIFT while dragging an item (Create a shortcut to the selected item)
9. F2 key (Rename the selected item) 
10. CTRL+RIGHT ARROW (Move the insertion point to the beginning of the next word)
11. CTRL+LEFT ARROW (Move the insertion point to the beginning of the previous word)
12. CTRL+DOWN ARROW (Move the insertion point to the beginning of the next paragraph)
13. CTRL+UP ARROW (Move the insertion point to the beginning of the previous paragraph)
14. CTRL+SHIFT with any of the arrow keys (Highlight a block of text) SHIFT with any of the arrow keys (Select more than one item in a window or on the desktop, or select text in a document) 15. CTRL+A (Select all)
16. F3 key (Search for a file or a folder)
17. ALT+ENTER (View the properties for the selected item)
18. ALT+F4 (Close the active item, or quit the active program)
19. ALT+ENTER (Display the properties of the selected object)
20. ALT+SPACEBAR (Open the shortcut menu for the active window)
21. CTRL+F4 (Close the active document in programs that enable you to have multiple documents opensimultaneously)
22. ALT+TAB (Switch between the open items)
23. ALT+ESC (Cycle through items in the order that they had been opened)
24. F6 key (Cycle through the screen elements in a window or on the desktop)
25. F4 key (Display the Address bar list in My Computer or Windows Explorer)
26. SHIFT+F10 (Display the shortcut menu for the selected item)
27. ALT+SPACEBAR (Display the System menu for the active window)
28. CTRL+ESC (Display the Start menu)
29. ALT+Underlined letter in a menu name (Display the corresponding menu) Underlined letter in a command name on an open menu (Perform the corresponding command)
30. F10 key (Activate the menu bar in the active program)
31. RIGHT ARROW (Open the next menu to the right, or open a submenu)
32. LEFT ARROW (Open the next menu to the left, or close a submenu)
33. F5 key (Update the active window)
34. BACKSPACE (View the folder onelevel up in My Computer or Windows Explorer)
35. ESC (Cancel the current task)
36. SHIFT when you insert a CD-ROMinto the CD-ROM drive (Prevent the CD-ROM from automatically playing) 

Dialog Box - Keyboard Shortcuts 

1. CTRL+TAB (Move forward through the tabs)
2. CTRL+SHIFT+TAB (Move backward through the tabs)
3. TAB (Move forward through the options)
4. SHIFT+TAB (Move backward through the options)
5. ALT+Underlined letter (Perform the corresponding command or select the corresponding option) 6. ENTER (Perform the command for the active option or button)
7. SPACEBAR (Select or clear the check box if the active option is a check box)
8. Arrow keys (Select a button if the active option is a group of option buttons)
9. F1 key (Display Help)
10. F4 key (Display the items in the active list)
11. BACKSPACE (Open a folder one level up if a folder is selected in the Save As or Open dialog box) 

Microsoft Natural Keyboard Shortcuts:

1. Windows Logo (Display or hide the Start menu) 
2. Windows Logo+BREAK (Display the System Properties dialog box)
3. Windows Logo+D (Display the desktop)
4. Windows Logo+M (Minimize all of the windows)
5. Windows Logo+SHIFT+M (Restorethe minimized windows)
6. Windows Logo+E (Open My Computer)
7. Windows Logo+F (Search for a file or a folder)
8. CTRL+Windows Logo+F (Search for computers)
9. Windows Logo+F1 (Display Windows Help)
10. Windows Logo+ L (Lock the keyboard)
11. Windows Logo+R (Open the Run dialog box)
12. Windows Logo+U (Open Utility Manager)
13. Accessibility Keyboard Shortcuts
14. Right SHIFT for eight seconds (Switch FilterKeys either on or off)
15. Left ALT+left SHIFT+PRINT SCREEN (Switch High Contrast either on or off)
16. Left ALT+left SHIFT+NUM LOCK (Switch the MouseKeys either on or off)
17. SHIFT five times (Switch the StickyKeys either on or off)
18. NUM LOCK for five seconds (Switch the ToggleKeys either on or off)
19. Windows Logo +U (Open Utility Manager)
20. Windows Explorer Keyboard Shortcuts
21. END (Display the bottom of the active window)
22. HOME (Display the top of the active window)
23. NUM LOCK+Asterisk sign (*) (Display all of the subfolders that are under the selected folder) 24. NUM LOCK+Plus sign (+) (Display the contents of the selected folder) 

MMC Console keyboard shortcuts 

1. SHIFT+F10 (Display the Action shortcut menu for the selected item)
2. F1 key (Open the Help topic, if any, for the selected item) 
3. F5 key (Update the content of all console windows)
4. CTRL+F10 (Maximize the active console window)
5. CTRL+F5 (Restore the active console window)
6. ALT+ENTER (Display the Properties dialog box, if any, for theselected item)
7. F2 key (Rename the selected item)
8. CTRL+F4 (Close the active console window. When a console has only one console window, this shortcut closes the console) 

 Remote Desktop Connection Navigation

1. CTRL+ALT+END (Open the Microsoft Windows NT Security dialog box)
2. ALT+PAGE UP (Switch between programs from left to right)
3. ALT+PAGE DOWN (Switch between programs from right to left)
4. ALT+INSERT (Cycle through the programs in most recently used order)
5. ALT+HOME (Display the Start menu)
6. CTRL+ALT+BREAK (Switch the client computer between a window and a full screen)
7. ALT+DELETE (Display the Windows menu)
8. CTRL+ALT+Minus sign (-) (Place a snapshot of the active window in the client on the Terminal server clipboard and provide the same functionality as pressing PRINT SCREEN on a local computer.)
9. CTRL+ALT+Plus sign (+) (Place asnapshot of the entire client window area on the Terminal server clipboardand provide the same functionality aspressing ALT+PRINT SCREEN on a local computer.)

Microsoft Internet Explorer Keyboard Shortcuts

1. CTRL+B (Open the Organize Favorites dialog box)
2. CTRL+E (Open the Search bar)
3. CTRL+F (Start the Find utility)
4. CTRL+H (Open the History bar)
5. CTRL+I (Open the Favorites bar)
6. CTRL+L (Open the Open dialog box)
7. CTRL+N (Start another instance of the browser with the same Web address)
8. CTRL+O (Open the Open dialog box,the same as CTRL+L)
9. CTRL+P (Open the Print dialog box)
10. CTRL+R (Update the current Web page)
11. CTRL+W (Close the current window)
12. CTRL+D (save current URL as a bookmark)





** Perhaps, this page from this blog will remove soon... 

Handling Upload Dialog Selenium webdriver and AutoIT


Using Web-Driver

Inorder to handle upload dialog selenium web driver is able to handle only when the browse button is of type HTML, if it is windows native dialog then we have to use AutoIT as explained below.

In web driver, locate the element with tag perhaps like,
<input type="file" id="troubleshooting-restore-file" style="display: none">
then we can simply pass the location of the file to be upload before clicking the Restore / Browser button

          Correct Way:
driver.findElement(By.cssSelector("input#troubleshooting-restore-file")).sendKeys("C:\\Users\\Fayaz\\Desktop\\<file name>");  // sending keys directly

          Wrong way/ Mistake:
WebElement uploadFile = driver.findElement(By.cssSelector("input#troubleshooting-restore-file")).click(); //clicking the element
uploadFile..sendKeys("C:\\Users\\Fayaz\\Desktop\\<file name>") //sending keys
The above case will work irrespective of the HTML input field state (enabled / disabled ). Also note that, in this way upload dialog won't display. We need not to be panic for not seeing dialog, because our work is to upload file, but not handling dialog.

However, in any case if it doesn't work please also have a glance the below explanation, how to integrate AutoIt file with selenium web driver

Using AutoIT

After so much of quest and reading forums, I came to a conclusion that selenium web driver is not handling windows native dialog's, so there fore if we need to upload any file where browse button is not editable then then we have to depend on another automation tool called 'AutoIT' . It's simple to use and very impressive to automate windows GUI's applications.

For a quick solution, here is the ready-made code available but perquisites is you need to download and install AutoIT so that you can copy this piece of code and compile to get .exe file so that you can run this executable file by java ProcessBuilder class (If you run out of time to do all these, see below)

#HandleDialog.au3 // File can be save with any name with extension .au3

Opt("MustDeclareVars", 1);0=no, 1=require pre-declare
Main()
Func Main()

    Local Const $dialogTitle = $CmdLine[2]
    Local Const $timeout = 5
    Local $windowFound = WinWait($dialogTitle, "", $timeout)
 

    $windowFound = WinWait($dialogTitle, "", $timeout)
    Local $windowHandle
    If $windowFound Then
   
        $windowHandle = WinGetHandle("[LAST]")
        WinActivate($windowHandle)

        ControlSetText($windowHandle, "", "[CLASS:Edit; INSTANCE:1]", $CmdLine[1])
        ControlClick($windowHandle, "", "[CLASS:Button; TEXT:&Open]")    
     
    Else
 
        MsgBox(0, "", "Could not find window.")
        Exit(1)
     EndIf
EndFunc 

Copy the above code in a notepad and save it (with any name), then compile this using autoit tool to get executable file, now use this exe file with the following code you can test, and the highlighted code is used in your actual test script

# testUpload.java

import java.io.IOException;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

public class testUpload {
 public static void main(String[] args) throws IOException {
   WebDriver driver = new FirefoxDriver();
   driver.navigate().to("http://www.imageshack.us/");
   driver.findElement(By.xpath("//*[@id='SWFUpload_0']")).click();

   Process process = new ProcessBuilder("C:\\Users\\selenium\\Desktop\\HandleDialog.exe",                "C:\\Users\\selenium\\Desktop\\file_to_upload.rar", "Open").start(); 
 }
}
I am not sure, whether this executable file worked for me also works to you,

If this doesn't works to you, then no option to save your time, you have to follow as mentioned above