0% found this document useful (0 votes)
2 views

PracticeNotes

The document outlines an Automation Interview Plan covering key topics in Core Java, TestNG, Selenium, and Git commands. It includes detailed explanations of OOP concepts, exception handling, locators, and various Git operations. Additionally, it provides insights into verification methods and the use of Cucumber BDD for workshops and practice.

Uploaded by

Suresh
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

PracticeNotes

The document outlines an Automation Interview Plan covering key topics in Core Java, TestNG, Selenium, and Git commands. It includes detailed explanations of OOP concepts, exception handling, locators, and various Git operations. Additionally, it provides insights into verification methods and the use of Cucumber BDD for workshops and practice.

Uploaded by

Suresh
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

Automation Interview Plan:

CoreJava:

OOPS Concepts
- Inheritance - Reusability, Extends keyword
- If we inherited no issue

// not finalized
- we can use static? - The best usage is create object,
parallel executions, mult threading concepts we will get issue when we static
variables/functions

//why to create

- Polymorphism - Method OverLoading & Method OverRiding

10th Class A - Stud1 , Stud2 both are twins

10th Class B - Stud1

1. Static binding/Compile-Time binding/Early binding/Method overloading.(in same


class)

2. Dynamic binding/Run-Time binding/Late binding/Method overriding.(in different


classes)

- Abstraction - Abstract & Interface

// need to check
-Interface can have only abstract methods. Since Java 8, it can have default and
static methods also.
- Abstract class can have final, non-final, static and non-static variables.
- abstract class can have class members like private, protected, etc.

- Encapsulation - also called as data hiding


private varibales cannot be accessed to other class, can only be accessed by
calling methods

- Constructor - Same as class name


- Access Mofiers
- Public - Any where in the project
- Private - within the class
- Protected - Outside Package
- Default - within the package

under constructor - different objects with same class name

Strings
Exceptions
Collections
Programs
upcasting & downcasting
TestNG:

Selenium:

Locators:

id
name
className
tag
linkText
partialLinkText

xpath = //tagName[@attribute='value']

functions: starts-with(@attribute, 'value'), ends-with(@attribute, 'value'),


contains(@attribute, 'value'), text(), normalize-space(), position()
//input[starts-with(@id,'UserFirstName')]
//input[contains(@id,'UserFirstName')]
//*[normalize-space()='First name']

conditions:

and, or

axis:
- preceding-sibling -> backward traverse
- following-sibling -> forward traverse

cssSelector= tagName[attribute='value']

using class - .classValue


using id - #idValue

axis:
following-sibling similar:
tag + tag

starts-with -> button[onclick^='js']


ends-with -> button[onclick$='js']
contains -> button[onclick*='js']

Exceptions:
UnsupportedOperationException
InvalidSelectorException
ElementClickInterceptedException
ElementNotInteractableException
NoSuchElementException
TimeoutException

Waits:
WebDriverWait:
org.openqa.selenium.TimeoutException: Expected condition failed: waiting for
element to be clickable: By.name: start my free tria (tried for 20 second(s) with
500 milliseconds interval)

FluentWait:
org.openqa.selenium.TimeoutException: Expected condition failed: Failed due to
element not found (tried for 15 second(s) with 8000 milliseconds interval)

Verification Methods:
- isDisplayed()
- isSelected()
- isEnabled()

CucucmberBDD : 1 Workshop & Parctice

Git Commands:
STep1: git clone url
Step2: git status
STep3: git add test.java
Step4: git commit -m "java file"
Step5: git push

Step6: Create a branch


a) direct from Github - goto main dropdown - add the branch
b) git checkout -b testPython

Step7: git branch - for checking branch


Step8: Create Pull Request
Step9: 2 Reviews - they should approve
Step10: Merge from Github

Step11: git merge branchname

// getting latest code from anybranch


Step1: i'm in testA branch
Step2: push code to testA before checkout to main
STep3: git checkout main
STep4: git pull
Step5: git checkout testA
STep6: git merge main

// getting latest code from anybranch


Step1: i'm in testA branch
Step2: push code to testA
STep4: git pull origin branchname "testB"
Step5: git push origin testA

You might also like