Introduction to Appium



Introduction to Appium

1) Appium is an Open source Test Automation Framework for Automating Mobile Software Applications,  launched in 2012.

Three types of Mobile Software Applications

i) Native Applications

(Native Apps live on the device and are accessed through icons on the device home screen, they are installed through an application store(such as Google Play, Apple's App Store)

ii) Mobile Web Applications
(Web Apps are not real apps, they are web sites stored on a remote server and delivered over the  Internet through a web browser)

iii) Hybrid Applications
(Hybrid apps are like native apps, run on the device, they have integration with device's file system and integration with web services.)
--------------------------------------------------
2) Appium supports Android and iOs devices, it drives iOS and Android apps using WebDriver protocol.
i) Android

(Android is an Open source Operating System for mobile devices such as smart phones, tablet computers. It owned by Google, offering users access to Google's own services like Search, YouTube, Maps, Gmail etc...

ii) iOS
(iPhone Operating System is a mobile operating system developed by Apple Inc, and distributed exclusively for Apple hardware, it presently powers many of the company's mobile devices including the iPhone, iPad and iPod touch)
-----------------------------------------------------------
3) Appium enables Android and iOS automation using Selenium Webdriver. The same WebDriver binding can be used across web and mobile.
------------------------------------------------------
4) It is Cross-platform, single API works for both Android and iOS platform.
--------------------------------------------------------
5) Appium supports all languages that have Selenium client libraries like,
Java,
PHP,
Ruby,
Python,
C# etc... to create Test Scripts
----------------------------------------------------------------------
6) Appium supports Software Test Automation on Emulators or Simulators and Physical devices too.
Emulator or Simulator
(Testing on real devices is expensive; Emulators or Simulators are virtual environments, not only expand our Testing coverage to more devices, but also quick and easy way to test.)
----------------------------------------------
7) Prerequisite to use Appium

i) Android SDK
ii) JDK (Java Development Kit)
iii) TestNG
iv) Eclipse
v) Selenium Server JAR
vi) WebDriver Language binding library
vii) Appium for Windows.
-----------------------------------------------------------------------------

Also Watch:

1) Introduction to Selenium

2) Introduction to UFT/QTP

3) Introduction to Selenium WebDriver

4) Introduction to TestNG Framework

Software Testing Jobs

Software Testing Videos Link

Software Testing Jobs (August 24)

1) Title: Exclusive Walk-in for QTP / Selenium on 27-Aug-16

Company:Hexaware   

Location: Chennai

Job Description:

> Strong Knowledge in Test Automation using QTP
> Minimum 3.5 - 7 Years of exp in test automation and at least 2 years working with QTP tools
> Strong Knowledge in VB Script and SQL is required 
> Should have experience in Agile Methodologies 
> Practical Experience of implementing automation frameworks (Keyword and Hybrid) 

Experience: 3 - 8 Years

Email Address: Jabeeni@hexware.com 
------------------------------------------------------------
2) Title: Web Quality Analyst - (selenium/.net) - Immediate Joiners

Company:  PSIOG DIGITAL PRIVATE LIMITED

Location: Chennai

Job Description: 

> Capture end-to-end manual test scripts in VSTS
> Develop automated end-to-end UI tests using Selenium and VSTS
> Execute end-to-end tests (manual and automated)
> File bugs for failed tests
> Work collaboratively with developers on product backlog items in 2-week sprints

Experience: 2 - 5 yrs

Email Address: HRDESK@PSIOG.COM
------------------------------------------------------------ 
3) Title: Manual Testing with Knowledge in Web Application

Company:  IVTL Infoview Technologies Private Limited

Location: Chennai

Job Description: 

> 1.5 - 6 years in Manual Testing.
> Manual Testing (with Experience in Web Application Testing)
> Selenium (Added Advantage and not a must)

Experience: 1-6 Yrs

Email Address:sumithra.k@ivtlinfoview.co.jp
------------------------------------------------------------
4) Title: Embedded Testing Engineer

Company:  Electrolab

Location: Navi Mumbai , Mumbai , Thane

Job Description: 

> Excellent Embedded Testing skills hands-on experience in developing test specifications & test cases & Software Release. 
> Experience in Analysis of requirements and Test case design Techniques. 
> Experience in various communication protocols.

Experience: 1 - 4 yrs

Email Address:hr@electrolabindia.com

Telephone:91-22-40413101
------------------------------------------------------------
5) Title: Job Opening for QA Analyst (Manual Testing)

Company:  GeP Solutions Pvt. Ltd.

Location: Mumbai

Job Description: 

> candidate would be responsible for Functional Testing, creating scripts for Functional test cases. 
> Candidate would also contribute towards creation of the Test Plans and Specifications as and when required 
> Candidate should be able to work independently with minimal or no supervision 
> Candidate should be able to interact with Internal Stakeholders and communicate effectively with both On Shore and Of Shore team 

Experience: 2 - 5 yrs

Email Address: charmi.joshi@gep.com

Contact : +91 22 61372100 ext. 7405
------------------------------------------------------------
6) Title: Automation Tester - Selenium

Company:  Zensoft Services Pvt. Ltd

Location: Pune

Job Description: 

> Prepare and perform testing procedures on the Application Software and ensure all errors are identified and corrected before release to clients.

Experience: 2 - 5 yrs

Email Address: careers@zensoftservices.com
------------------------------------------------------------
7) Title: Mobile Application Test Engineer QA (immediate Joining)

Company:  Boltt Sports Technologies

Location: Noida

Job Description: 

> Experience & good understanding of SDLC and STLC.
> Extensive experience in Sanity testing, Feature testing, Functional testing, System testing, API testing, Compatibility testing, Retesting, Regression Testing, Performance testing, Load testing and stress testing in mobile handsets and web based applications.

Experience: 2 - 5 yrs

Email Address:careers@boltt.net
------------------------------------------------------------ 
8) Title: Walk-in on 24th Aug'2016 for Testing Engineer

Company:  ValueFirst Digital Media Pvt. Ltd

Location: Gurgaon

Job Description: 

> Candidate will be responsible to analyze the requirement, Test Case Designing and execution, Preparation of testing environment, defect reporting, prepare Testing deliverables, Automate the products using selenium tool or any other tool. 

Experience: 3 - 4 yrs

Email Address: shikha.nagar@vfirst.com 

Contact : 0124-4632008

Venue : ValueFirst Digital Media Pvt. Ltd.
B-18, Unitech Infocity 1, Sector 34, Gurgaon 122001
------------------------------------------------------------
9) Title: Testing Engineer - Immediate Openings

Company:  BlazeDream Technologies (p) Ltd

Location: Chennai

Job Description: 

> Candidate must have at least 2 years of experience in the Software manual testing Field in a respected Software Development
> walk in on Monday - Friday from 10am - 4pm 

Experience: 2 - 4 yrs

Email Address: cvtesting@blazedream.com
------------------------------------------------------------
10) Title: Testing - Selenium / Cucumber

Company:  TEKsystems

Location:  Pune

Job Description: 

> 3+ years experience in software verification, including exploratory, regression and integration testing
> 3+ years experience programming in Ruby
> Direct experience developing test strategies for integration testing of external/internal applications
> Hands-on experience with test automation using Cucumber, Selenium or Rspec
> Experience with Parallel testing
> Experience working as a member of an Agile software development team
> Must be able to work both independently and within the Scrum methodology

Experience: 3 - 7 Years

Email Address: pilag@teksystems.com
------------------------------------------------------------
11) Title: Perl Automation Testing Professionals

Company: Scope International 

Location: Chennai

Job Description: 

> Hands on Experience in Automation Testing (Selenium).
> Strong in Perl Scripting/Development.
> Good experience in Java.
> To understand and scope requirements and prepare test scenarios, test conditions and test cases.

Experience: 3 - 5 yrs

Email Address: keerthivasan.r1@sc.com
------------------------------------------------------------
Software Testing Jobs (August 23)
1) Title: Software Engineer-manual and Automation Testing

Company:  Vanguard Associates

Location: Gurgaon

Job Description: 

We are looking for a motivated professional who is responsible for performing software verification of Web Application as per the defined standards & procedures.
> Take ownership for the testing effort on different types of applications 
> Reviewing and commenting on product specifications
> Planning and executing Automation testing
> Collaborate with developers and QA leads to improve testability, automation, and tools.
> Participate in Test Planning, system test strategy, methodology, and creation of system integration test cases and make them traceable back to the system requirements, feature lists and design documents.

Experience: 2 - 5 yrs

Email Address:shikha@vanassociates.com , akancha@vanassociates.com
------------------------------------------------------------
2) Title: Automation Test Engineer

Company:  Target hiring for MNC client

Location: Chennai

Job Description: 

> 3-7 years of experience in test automation
> Experience of test automation assessment, automation solution creation and Consulting
> Hands on experience with multiple automation tools like, Selenium Webdirver and QTP
> Hands on experience with Java

Applicable to Chennai based candidates only as interview mode is only F2F during weekdays if shortlisted.

Experience: 3 - 7 yrs

Email Address:aruna@targethr.us

Telephone:  080-40001312
------------------------------------------------------------ 
3) Title: Software Test Engineer-automation

Company:  QuadLabs Technologies Private Limited

Location: Gurgaon

Job Description: 

> Involved in preparing Test Cases covering Functional, UI, and Module integration.
> Testing modules and reporting bugs early in release life cycle.
> Frequent feedback to Development Team and Test Lead on stability of tested components.
> Prepare/Maintain test scripts using Rational Robot 7.0, Selenium test tool.
> Actively participating in Functional, Design and Test reviews.
> Prepare Build Verification Testing Documents.

Experience: 2 - 4 yrs

Email Address:jobs@quadlabs.com

Telephone: 91-124-6636999
------------------------------------------------------------
4) Title: Software Engineer (qa)-automation

Company: Bureau Veritas Consumer Products Services (India) Pvt Ltd 

Location: Noida

Job Description: 

> 2 - 3 years experience in hands-on testing web applications (JAVA/J2EE).
> Demonstrated ability and experience in translating product definitions (use cases, requirements etc.) in to test cases.
> Excellent knowledge of QA processes and tools.
> Working knowledge of SQL queries.
> Excellent hands-on skills with testing activities (functional testing, system testing, integration testing etc.)
> Hands-on experience on performance testing using JMeter.
> Hands-on experience on performance testing using JMeter.

Experience: 2 - 4 yrs

Email Address:shilpi.gupta@in.bureauveritas.com

Telephone: 91-120-4000827
------------------------------------------------------------
5) Title: Quality Assurance - Automation Engineer

Company:  FTD India Pvt Ltd

Location: Hyderabad

Job Description: 

We seek a highly technical and agile savvy Quality Assurance/Automation Engineer to be successful not only in driving our quality standard forward but also contributing as are able within a cross-functional team which oversees several core & critical technology areas which are a core component of our leading ecommerce platform.

> Knowledge of QA processes, methodologies, and industry best practices.
> Experience with web related test and test automation tools such as Microsoft Test Manager, MSTest, Wireshark, Fiddler, Browser Dev Tools, Mercury HP Quick Test Professional, HP Load Runner, and Selenium.
> Experience with Agile / Scrum methodologies and continuous integration tools.
> Healthy analytical and problem solving skills, with attention to detail.
> Sharp analytical abilities, problem solving techniques, proven design skills and a track record of delivery

Experience: 1 - 3 Years

Email Address: rsingh@ftdi.com
---------------------------------------------------------------------------------
Note: If anyone asks money for placement, you just ignore them.
-----------------------------------------------------------------
Subscribe to G C Reddy Free Software Testing Video Channel

1) Selenium Step by Step Videos

2) UFT / QTP Step by Step Videos

3) Manual Testing Tutorials

4) Java for Selenium

5) VBScript for UFT/QTP

6) Selenium Quick Tutorials

7) Software Testing Tools

IT Jobs in India

IT Jobs in India

1) Title: Performance Testing COE

Company:  Cigniti Technologies 

Location: Hyderabad

Job Description: Performance Testing

Experience in work : Performance Test Leads,SSE,Architects & Performance Testing Practice Heads can apply.

Email Address: veeresh.talanki@cigniti.com
------------------------------------------------------------
2) Title: Sr.Java Developer

Company:  janya tech

Location: Hyderabad

Job Description: coreJava Expert with Bigdata Technologies

Experience: 6-9 Years

Email Address: shiva.j@janyatech.com
------------------------------------------------------------
3) Title: Dot Net Developer

Company:  3i-infotech

Location: chennai

Job Description: Dotnet resources with 2yrs exp for chennai location with VB. Net and C# skills with 15 days notice period.subject line Applying for the position of Dotnet developer for chennai.

Experience: 2yrs

Email Address: naresh.ravula@3i-infotech.com
------------------------------------------------------------
4) Title: Trained candidates for internship

Company:  https://www.okler.com/

Location: Hyderabad

Job Description: looking for PHP, My SQL trained candidates for internship with us and later converted to full time employee.need good communication and analytical skills.

Experience: Freshers

Email Address: praveen.k@okler.com
------------------------------------------------------------
5) Title: Xamarin Developer

Company: Ananth Cybertech 

Location:  Hyderabad

Job Description: Hands on Experience in .NET, C#, sql server, SQL, SQLite ,Mvvm, Mvc, Design Patterns, Mobile Applications, Xamarin. Strong knowledge in OOPS Concepts.

Experience: 1 to 3 years

Contact : 9133337252
------------------------------------------------------------

Information Technology Job News

Information Technology Job News

1) Title: Software Testing Fresher

Company:  http://testmile.com/

Location: Bangalore

Job Description: Software Testing Fresher

Experience: Fresher

Email Address: careers@testmile.com
------------------------------------------------------------
2) Title: Testing Engineer

Company:  http://sapthaang.com/cms/

Location: Bangalore

Job Description: :Looking for B.Sc / BCA 2015 -16 passout candidates who has the passion to pursue their career as "Testing Engineer"

Experience: Freshers

Email Address: lavanya.ramadoss@sapthaang.com
------------------------------------------------------------
3) Title: Senior Java Production Engineer/Lead

Company: GSPANN Technologies, Inc

Location: Hyderabad 

Job Description: Java/J2EE, Web Services (Rest & SOAP), Spring Framework, Prior Production Support Exp.

Experience: 4+ years 

Email Address: Rajender.kumar@gspann.com 

Contact : 9000686178
------------------------------------------------------------
4) Title: Android Developers

Company:  http://janyatech.com/

Location: Hyderabad

Job Description: Android Developers

Experience: 2-4 Years

Email Address: girish.a@janyatech.com.

Walk-Ins are going on Monday to Friday (9:30 AM to 6:00PM).
------------------------------------------------------------
5) Title: PHP Developer (Experienced)

Company:  Liventus

Location: Bangalore

Job Description: We are looking for an experienced PHP application programmer to lead and/or assist in the development of large scale Web based applications. The requirements include 3+ years of experience developing in PHP and open source languages, in addition to having other extensive knowledge in MySQL, JQuery, Javascript, and other popular& widely used server technologies like Drupal, WordPress, Joomla used to implement php web applications. Knowledge of UNIX & Web Hosting is a plus. Candidate must be able to work in a team setting as well as an individual setting and must have strong architecture and conceptual skills.

Experience: 3+ years

Email Address: Visit careers.liventus.com,fill out the form and attach your resume.
------------------------------------------------------------
6) Title: Senior Software Engineer - PHP

Company:  BhavyaBharat Communications Services Pvt. Ltd

Location: Bangalore

Job Description: 
Responsibilities:
1. Write clean, well designed code
2. Produce detailed specifications
3. Troubleshoot, test and maintain the core product software and databases to ensure strong optimization and functionality
4. Contribute in all phases of the development lifecycle
5. Follow industry best practices
6. Develop and deploy new features to facilitate related procedures and tools if necessary
7. Build efficient, testable, and reusable PHP modules
8. Solve complex performance problems and architectural challenges
9. Integration of data storage solutions

Experience: Min 4+ Years

Email Address: varun.n@bhavyabharath.com
------------------------------------------------------------
7) Title: SOA Designer

Company:  Torry harris

Location: Bangalore

Job Description: 

Design:
At least 3 years of experience in designing SOA/web services REST, SOAP
Good knowledge of XML, XSD, WSDL etc..
Good knowledge of at least one design/business modelling tools like Viso, Enterprise Architect, UML, Wiki & Jira tools
Good in data analysis/profiling, and modelling activities
Ability to map business processes and functional requirements
Carry high level estimations for services
Interact with peers, development & test teams

Development:
Hands on SOA Development and unit testing,Knowledge of SOA and/or webservices in depth, Aware of SOA fundamentals and best practices, Knowledge of Deployment and configuration, Troubleshooting, Defect analysis and fixes.
Exposure to telecom domain preferred

Experience: 4-7 yrs

Email Address: shekharprasad1991@gmail.com (Referral)
------------------------------------------------------------
8) Title: Design Engineer

Company: cyient  

Interview date : 7th Aug 2016

Location: Hyderabad

Job Description: Experience in R&D with product life cycle knowledge. Knowledge of Plastic Product design and plastics.

Experience: 2 - 5 Years

Venue Address : Cyient Limited, Plot No. 2,
IT Park, Nanakramguda,
Manikonda, Hyderabad - 500 032
------------------------------------------------------------

SQL Tutorials

SQL Tutorials

1) SQL Tutorial 1: Introduction to SQL

(Structured Query Language Commands and Operations, What is SQL?, Purpose of SQL, Who Should Learn SQL?, Subsets of SQL, Data Definition Language, Data Manipulation Language and Data Control Language. SQL Introduction for Database Developers, Database Administrators and Database Testers)

2) SQL Tutorial 2: SQL Overview

(Overview of SQL, Structured Query Language Syntax, SQL Data Types, SQL Operators, SQL Built in Functions, SQL Queries and Sub Queries. Data Definition Language, Data Manipulation Language and Data Control Language Commands.)

SQL Overview

SQL Tutorial 2: SQL Overview

SQL (Structured Query Language) is a standard language for accessing databases.

All Relational Database Management Systems like MS Access, MS SQL Server, Oracle, Sybase, MySQL, DB2 use SQL as standard database language.
-----------------------------------------------
i) Environment Setup

We can practice SQL Commands in any Database Management System, Install any Database Engine like Oracle, SQL Server, Sybase, MySQL etc... and practice.
-----------------------------------------------
ii) SQL Syntax

•  A database contains one or more tables. Each table is identified by a name, Tables contain records (rows) with data.

•  Most of the actions we need to perform on a database are done with SQL statements.

•  SQL keywords are NOT case sensitive: select is the same as SELECT

•  All the SQL statements start with any of the keywords like SELECT, INSERT, UPDATE, DELETE etc...and all the statements end with a semicolon (;), semicolon is the standard way to separate SQL Statements.
-----------------------------------------------
iii) SQL Data Types

 A data type defines what kind of value a column can contain, we have to use data types while creating database tables, choose a particular data type for a table column based on our requirement.

Example:

Character Data Types,
Numeric Data Types,
Date and Time Data Types Etc...

Note: Data Types vary from One Database Management System to another
-----------------------------------------------
iv) Operators

Operators are used to perform Arithmetic, Comparison and Logical Operations.

Categories of Operators in SQL

1) Arithmetic Operators
2) Comparison Operators
3) Logical Operators
-----------------------------------------------
v) SQL Functions

SQL has many built-in functions for performing processing on data.

Categories of Built-in Functions in SQL

1) Aggregate Functions
2) String Functions
3) Date Functions Etc...
-----------------------------------------------
vi) Data Definition Language

The Data Definition Language (DDL) is used to create and destroy databases and database objects. 

Important Operations


 Create Database
 Use Database (Specify the Database you wish to work with within your DBMS.)
 Alter Database
 Drop Table, Drop Database
-----------------------------------------------
vii) Data Manipulation Language

The Data Manipulation Language (DML) is used to insert, retrieve and modify database information.

Important Operations


 Insert Records to an existing Table
 Retrieve the specific information from an operational database. 
 Modify information contained within a Table.
 Delete information contained within a Table.
-----------------------------------------------
viii) Data Control Language

The Data Control Language (DCL) allows database administrators to configure security access to relational databases.

Important Operations

• Provide access on the Database objects to the Users
• Remove User access rights to the Database Objects
• Deny Permissions to Users.
-----------------------------------------------
ix) SQL SELECT Statement

The SELECT statement is used to select data from a database.

 General Selection
 Conditional Selection Etc...
(We use clauses, Operators and keywords...)
-----------------------------------------------
x) SQL Joins

The SQL Joins clause is used to combine records from two or more tables in a database. 

Different SQL Joins:

1) Inner Join
2) Left Join
3) Right Join
4) Full Join
---------------------------------------------------------------------------------
Popular Database Management Systems

1) Oracle

Oracle database is a relational database management system (RDBMS) developed by Oracle Corporation. 

Important Oracle editions are, 

i) Enterprise Edition: Offers all features, including superior performance and security.

ii) Standard Edition: Contains base functionality for users.

iii) Express Edition: The lightweight, free and limited Windows and Linux edition

iv) Oracle Lite: For mobile devices
----------------------------------------------------
2) Microsoft SQL Server

Microsoft SQL Server is a relational database management system developed by Microsoft.

Important Microsoft SQL Server editions are, 

i) Datacenter: SQL Server 2008 R2 Datacenter is a full-featured edition of SQL Server.

ii) Enterprise: SQL Server Enterprise Edition includes both the core database engine and add-on services.

iii) Standard: SQL Server Standard edition includes the core database engine, along with the stand-alone services.

iv) Web: SQL Server Web Edition is for Web hosting.

v) Workgroup: SQL Server Workgroup Edition includes the core database functionality only.
-----------------------------------------------------
3) MySQL

MySQL is an Open Source Relational SQL database management system used for developing web-based software applications.

Important MySQL Editions are, 

i) Standard Edition: Standard Edition enables us to deliver high-performance and scalable Online Transaction Processing (OLTP) applications.

ii) Enterprise Edition: Enterprise Edition includes the most comprehensive set of advanced features and management tools.

iii) Cluster Carrier Grade Edition: Cluster enables users to meet the database challenges of next generation web, cloud, and communications services with uncompromising scalability, uptime and agility.
--------------------------------------------------------------------------
4) PostgreSQL

PostgreSQL is a powerful, open source database management system. It runs on all major operating systems, including Linux, UNIX, Mac OS X, Solaris, and MS Windows.
----------------------------------------------------------------------------
5) MS Access

Microsoft Access is bundled as part of the Microsoft Office suite. It is only available on the PC version. It is a desktop database system because its functions are intended to be run from a single computer.
---------------------------------------------------------------------------------------------
SQL Tutorial 1: Introduction to SQL

Data Driven Testing and Batch Testing

Data Driven Testing and Batch Testing using Selenium

i) Data Driven Testing
ii) Batch Testing
--------------------------------------------
i) Data Driven Testing

1) What is Data Driven Testing?

Testing the Same Functionality with multiple inputs

2) Why Data driven Testing?

For Positive and Negative Testing

3) How to conduct Data Driven Testing

By Reading Test Data from external files (Text File/Excel File...)
-----------------------------------------------------------
Example:

Data Driven Testing for Login Functionality by Reading Test Data from a Text File.

Test Case: Verify Login Functionality in gcrShop Admin Interface

Test Steps:
i) Launch the Browser
ii) Navigate to "http://gcrit.com/build3/admin/"
iii) Enter Username
iv) Password
v) Click "Login" Button
-----------------------
Input Data/Test Data

Refer: input.txt

Verification Points:

1) Capture the URL after Login and Compare with Expected:
Expected: http://www.gcrit.com/build3/admin/index.php

2) Capture the Error Message and Compare with Expected
Expected: Error: Invalid administrator login attempt.
-------------------------------------------------------------
Write Selenium WebDiver Test Case

public class DataDrivenTesting {
public static WebDriver driver;
public static String Error_Messge;
public static void main(String[] args) throws InterruptedException, IOException {
FileReader file = new FileReader("C:/Users/gcreddy/Desktop/Input.txt");
BufferedReader br = new BufferedReader(file);
int Count =0;
int Iteration =0;
String line;
while ((line = br.readLine()) != null){
Count = Count+1;

if (Count > 1){
Iteration = Iteration+1;
String [] inputData = line.split(", ", 2);
driver = new FirefoxDriver();
driver.get("http://gcrit.com/build3/admin/");
driver.findElement(By.name("username")).sendKeys(inputData[0]);
driver.findElement(By.name("password")).sendKeys(inputData[1]);
driver.findElement(By.id("tdb1")).click();
Thread.sleep(3000);
String url = driver.getCurrentUrl();
//System.out.println(url);
if (! url.contains("http://www.gcrit.com/build3/admin/index.php")){
Error_Messge = driver.findElement(By.className("messageStackError")).getText();
}

if (url.contains("http://www.gcrit.com/build3/admin/index.php")){
System.out.println("Iteration "+Iteration + " -Admin Login Successful -Passed");
}
else if ((! url.contains("http://www.gcrit.com/build3/admin/index.php")) && (Error_Messge.contains("Error: Invalid administrator login attempt."))){
System.out.println("Iteration "+Iteration + " -Admin Login Unsuccessful and Showing Correct Error Message - Passed");
}
else {
System.out.println("Iteration "+Iteration + " -Admin Login Unsuccessful and Not Showing Correct Error message - Failed");
}
driver.close();
}
}
}
}
--------------------------------------------------------------
Assignment:

Verify the maximum Login attempts (Invalid input) for Admin Login Functionality
---------------------------------------------------------------
ii) Batch Testing

Executing Series of Tests

AUT (Application Under Test)
gcrShop Admin Interface (http://www.gcrit.com/build3/admin/)

Test Cases:
1) Verify Admin Login Functionality
2) Verify "Manufacturers" Link Existence in the index page of the application (After login to Application)
3) Verify Redirect Functionality between Admin and User Interface (After Login to Admin Interface)
---------------------------------------------------
1) Verify Admin Login Functionality

i) Launch the Browser
ii) Navigate to "http://gcrit.com/build3/admin/"
iii) Enter Username
iv) Password
v) Click "Login" Button
-----------------------
Input Data/Test Data
Username: admin
password: admin@123

Verification Point:
Capture the URL after Login and Compare with Expected:
Expected: http://www.gcrit.com/build3/admin/index.php
-----------------------------------------------------------------
2) Verify "Manufacturers" Link Existence in the index page of the application (After login to Application)

i) Launch the Browser
ii) Navigate to "http://gcrit.com/build3/admin/"
iii) Enter Username
iv) Password
v) Click "Login" Button
-----------------------
Input Data/Test Data
Username: admin
Password: admin@123

Verification Point:
Check the existence of "Manufacturers" Link, if exists then pass otherwise fail

Exception Handling:
Insert "NoSuchElementException"
-------------------------------------------------------------
3) Verify Redirect Functionality between Admin and User Interfaces (After Login to Admin Interface)

i) Launch the Browser
ii) Navigate to "http://gcrit.com/build3/admin/"
iii) Enter Username
iv) Password
v) Click "Login" Button
vi) Click "Online Catalog" Link
-------------------------------------
Input Data/Test Data
Username: admin
Password: admin@123

Verification Point:
Capture the URL after Redirecting and Compare with Expected:
Expected: http://www.gcrit.com/build3/
--------------------------------------------------------
Create Reusable Components:

i) Launch Browser
ii) Login to Admin Interface 
iii) Close Browser
-------------------------------------------------------
Create Selenium Test Batch

public class BatchTesting {
public static WebDriver driver;
//Launch Browser
public void launchBrowser(){
driver = new FirefoxDriver();
}
//Close Browser
public void closeBrowser(){
driver.close();
}
public void adminLogin(String Username, String Password){
driver.get("http://www.gcrit.com/build3/admin");
driver.findElement(By.name("username")).sendKeys(Username);
driver.findElement(By.name("password")).sendKeys(Password);
driver.findElement(By.id("tdb1")).click();
}
public static void main(String[] args) throws InterruptedException {
//Create Object
BatchTesting obj = new BatchTesting();

//Test Case 1: Verify Admin Login Functionality
obj.launchBrowser();
obj.adminLogin("admin", "admin@123");

String url = driver.getCurrentUrl();

if (url.contains("http://www.gcrit.com/build3/admin/index.php")){
System.out.println("Test Case 1: Admin Login Successful - Passed");
}
else {
System.out.println("Test Case 1: Admin Login Unsuccessful - Failed");
}
obj.closeBrowser();
//-------------------------------------------------------
//Test Case 2: Verify "Manufacturers" Link Existence in the index page 
obj.launchBrowser();
obj.adminLogin("admin", "admin@123");
try
{
boolean linkExistence = driver.findElement(By.linkText("Manufacturers")).isDisplayed();

if (linkExistence == true){
System.out.println("Test Case 2: Manufacturers Link Exists - Passed");
}
}
catch (NoSuchElementException e) {
System.out.println("Test Case 2: Manufacturers Link Not Exists - Failed");
}
obj.closeBrowser();
//------------------------------------------------
//Test Case 3:Verify Redirect Functionality between Admin and User Interfaces
obj.launchBrowser();
obj.adminLogin("admin", "admin@123");
driver.findElement(By.linkText("Online Catalog")).click();
Thread.sleep(3000);
String url2 = driver.getCurrentUrl();

if (url2.equals("http://www.gcrit.com/build3/")){
System.out.println("Test Case 3: Redirected from Admin to User Interface - Passed");
}
else {
System.out.println("Test Case 3: Not Redirected from Admin to User Interface - Failed");
}
obj.closeBrowser();
//------------------------------------------------------
}
}
-----------------------------------------------------------
Test Case: Verify Communication between two different Browsers

Steps:
i) Create Mozilla Firefox Browser and Google Chrome Browser
ii) Launch the Two different applications
iii) Interact from one application to another
iv) Close browsers
--------------------------------------------------
WebDriver Firefoxdriver = new FirefoxDriver();

System.setProperty("webdriver.chrome.driver", "E:/chromedriver.exe");
WebDriver ChromeDriver = new ChromeDriver();

Firefoxdriver.get("https://www.gmail.com");
String Text = Firefoxdriver.findElement(By.tagName("h1")).getText();

ChromeDriver.get("http://www.gcrit.com/build3/create_account.php?osCsid=38s238i67jk84tno82uhfd7mk2");
ChromeDriver.findElement(By.name("firstname")).sendKeys(Text);

Firefoxdriver.close();
ChromeDriver.close();
-------------------------------------------------------------