Monday, October 10, 2016

TaskList Command: Working with taskmanager from cmdline


 ‘’List all the task processes  
 c:\>TASKLIST  

 ‘’List all the tasks which match the process name  
 c:\>TASKLIST /FI "IMAGENAME eq chrome.exe" 
 
 ‘’List all the tasks based on application window title.  
 ‘’We can use regular expression to get the process  
 c:\>TASKLIST /FI "Windowtitle eq ECLIPSE*"  

 ‘’we can store information to a txt file using below command  
 c:\>TASKLIST /FI "IMAGENAME eq chrome.exe" >abc.txt  

 ‘’Below command will return the service for the process and save it in file abc.txt in c: drive
 c:\>TASKLIST /FI "IMAGENAME eq chrome.exe" /svc >abc.txt  


Reference: http://ss64.com/nt/tasklist.html


Sunday, September 25, 2016

Switching to frame, Windows, alert in Selenium WebDriver

1. How to Switch from one frame to another

 // How to Switch from one frame to another  
 WebElement iFrmeElement = driver.findElement(By.xpath("xPath for Frame"));  
 driver.switchTo().frame(frameElement);  
 //Or  
 driver.switchTo().frame(id or name)  
 //Or  
 driver.switchTo().frame(index of frame)  

2. We can switch to default again by:

 driver.switchTo().defaultContent();  

3. We can switch to a window based on name, Id or Windows handle

 driver.switchTo().window("windowName");  

4. We can switch to an alert

 Alert alert = driver.switchTo().alert();  
 // We can close an alert using methods for alert object  
 alert. accept();  

Saturday, September 24, 2016

Importing an existing maven Project in eclipse in three steps.

An existing Maven Project can be imported in eclipse following simple steps as shown below.


1. In the eclipse workspace, click on File>Import.



 2. Select Maven>Existing Maven Projects

3. Browse to the folder location when Maven Project to be imported exist. Once the location is provided. It will search for the POM file. Select the file and click on Finish. Maven Project will be imported successfully.It will take a while to download dependencies and available to use.