Tuesday, October 22, 2013

Selenium Ide :TimeStamp


Selenium Ide :Time Stamp


To display time stamp :
 Step 1: Enter the data as in the table below into your Selenium Ide Editor

Step2 :
Command field type > echo
Target  field type      >  ${Timestamp}

Result : 
Test_10/22/2013 4:48:23


Command
Target
Value
store
javascript{((new Date().getMonth()+1)+"/"+new Date().getDate()+"/"+new Date().getFullYear())}
Date
store
javascript{(new Date().getHours()+":" + new Date().getMinutes() + ":" + new Date().getSeconds())}
Time
store
Test_${Date} ${Time}
Timestamp

Friday, October 18, 2013

Manual : UseCase VsTest Scenario Vs Test Case

Manual : Test Scenario Vs Test Case


Lets consider a library management system:

Usecase:

The functions performed by different entities(Customer, Staff, Manager) is mentioned in Usecase. a) Staff enters customer information.

Test Scenario:

Test cases are written based on scenario. Test scenarios are very brief.
a)Staff enters customer information
b)Customer returns a book

Test Cases:

Test cases are derived from scenarios. They are step by step instructions. They are very detailed and also contains actual results and expected results along with other fields
a. Enter customer information(Name, address, ph no)
b. Click on save.

----------------------------------2--------------------------------------------

For Example:If i want to validate the login page

Test Scenario will be: User receives an error message when he enters invalid 
                                     parameters in the login page.

Test Cases 1: User receives an error message when he enters valid userid and  
                       invalid password.
Test Cases 2: User receives an error message when he enters invalid userid and
                       valid password
Test Cases 3: User receives an error message when he enters invalid userid and
                       invalid password

Based on the Test Scenario ,Test engineer are writing test cases.

Test Scenario are derived from the Client Requirements.

Tuesday, October 15, 2013

Java : Double Quotes in Xpath



Double Quotes in Xpath



Use : asc -> char

String Data=((char)34)+"http://www.blogger.com/profile/14790377041798535628"+((char)34);


public class Sample1{   
    public static void main(String[] args)
    {
            WebDriver driver = new FirefoxDriver();
            driver.get("http://seleniumatmindfire.blogspot.in/2012/06/verify-tool-tip-text-in-selenium.html");
            String Data=((char)34)+"http://www.blogger.com/profile/14790377041798535628"+((char)34);
          WebElement toolTipObject = driver.findElement(By.xpath("//a[contains(@href,"+Data+")]"));
            String GoogleTooltip = toolTipObject.getAttribute("title");           
            System.out.print(GoogleTooltip);
    }
}

Monday, October 14, 2013

Excel : Insert Combo Box







Inserting Combo Box in Excel



1.      Select the cell where you want to put the combo box .
2.      Goto  Tool Bar>Data>Data Validations >In Allow ,select “List”


3.      In Data Validation> Source field  , Click on the icon located at the end  and goto the column where the data is present and select all the data you want to listed inside the como box.
4.      Click on Ok .