Professional Documents
Culture Documents
Selenium Java Doc
Selenium Java Doc
xpath in selenium--->14014
What are the common Exception you faced in your project?----14394
What is a method in java?----14541
What is a constructor?----14914
this keyword------->15372
What is a class and object in java ?------>15730
103648---->
1. id---------1
2. Name---------2
3. Linktext
4. PartialLinktext
5. TagName
6. ClassName---------3
7. cssSelector
8. Xpath--------4
((JavascriptExecutor) driver).executeScript("window.scrollBy(x-axis,y-axis)");
(javascriptExecutor)driver.executeScript(script,argument);
((JavascriptExecutor) driver).executeScript("arguments[0].scrollIntoView();",
targetelement);
TestSteps:
************
Open Firefox Browser
Open AppURL In Browser
Get the Title of WebPage
Verify Title of WebPage
Enter the username
Enter the password
Clicking On Login Button
Identify and get the Welcome selenium text
Verify Welcome selenium text
Switch to frame
1.First,Identify dropdown
2.Next,Identify all the values from this dropdown
>Switch to frame
>Identify dropdown
>Select the dropdown value
https://www.kosmiktechnologies.com/seleniumLiveProject/kosmik-hms/
>Int datatype can store in the range of values min -2147483648 to max 2147483647
>Long data type can store in the range of values min -9223372036854775808 to max
9223372036854775807
--------------------------------------------------------------------
Button : Login
file:///E:/Selenium%20Software%20dump%20files/Browser%20Elements/disabled.html
--------------------------------------------------------------------
//wait 15 sec until the See all element is visible on a webpage once the element is
visible then click on See all link on a webpage
wait.until(ExpectedConditions.visibilityOfElementLocated(By.Locator("LocatorValue")
));
until()==>wait for certain amount time until the See all element is visible on a
webpage
>Float datatype can store in the range of the values min -3.4028235e38F to max
3.4028235e38F
ASCII table
https://www.cs.cmu.edu/~pattis/15-1XX/common/handouts/ascii.html
Imp Points
***********
>Cource Content--->Give me your Email id then I will send you Course Content
>Interview Questions and Answers on Java---->200+
>Interview Questions and Answers on Selenium--->200+
>Resume preparation --->After Course Complete
>Doubts sessions--->Daily
>Weekly Test --->Mon---Sat---->25+
>Job Assistance
>Mainly selenium and Java soft copy =Low level students + Average students + High-
level students
>Selenium Java Training = Java Training +Selenium basic level +Selenium advanced
level+ Selenium Project level +
WhatsApp No : 7386467494
How to scroll to particular / target Webelement using selenium javascript?
****************************************************************
Syntax :
**********
((JavascriptExecutor)
driver).executeScript("arguments[0].scrollIntoView();",targetelement);
Rediff mail
***************
http://register.rediff.com/register/register.php?FormName=user_details
Syntax : this.variable
Syntax : this()
Syntax :this(value)
Syntax : this.methodname()
https://www.eclipse.org/downloads/packages/release/oxygen/3a
1.Create Superclass(Animal)
2.Create subclass1(Dog) from Superclass(Animal)
3.Create Subclass2(Cat) from Superclass(Animal)
4.Create Subclass3(Cow) from Superclass(Animal)
1.Create Superclass(College)
2.Create subclass1(Principal) from Superclass(College)
3.Create Subclass2(Teacher) from Superclass(College)
4.Create Subclass3(Student) from Superclass(College)
Manual TestSteps:
***************
> Open the firefox browser
> Navigate the application url
> Get the Title of the WebPage
> Print the title of the webpage
> Verify Title of the WebPage
> Enter the username
> Enter the password
> Clicking On Login Button
> Identify and get the Welcome Selenium Text
> Print the Welcome Selenium Text
> To verify whether the welcome page successfully opened or not
> Clicking On Logout Button
> Close the current Firefox Browser
What are the different element Locators to identify the element in selenium ?
******************************************************
1. id----------1
2. Name---------2
3. Linktext
4. PartialLinktext
5. TagName
6. ClassName---------3
7. cssSelector
8. Xpath---------------4
https://www.kosmiktechnologies.com/new-batches/">
https://www.ebay.com/b/PDAs/38331/bn_1638584
Linktext-TestSteps :
********************
>open the Firefox Browser
>Navigate the App Url
> Click on New Batches footer link
Classname
**************
Test Steps :
>open the firefox browser
>navigate the App Url
>Enter Email address into Email or Phone textbox
https://www.kosmiktechnologies.com/new-batches/
https://www.facebook.com/?
min -128 to max 127
a) byte a=-128;
b) byte b=127;
c) byte c=128;
d) byte d=1.27;
e) byte e="kosmik";
f) byte f=125;
g) byte g=true;
>short data type can store in the range of values min -32768 to max 32767
short b = 32768;
>Int datatype can store in the range of values min -2147483648 to max 2147483647
int a=-2147483648;
int b=2147483647;
int d=21.47483647;
int e=true;
int g=2147483647L;
int h="Kosmik";
>Long data type can store in the range of values min -9223372036854775808 to max
9223372036854775807
long b=9223372036854775807L;
long l=100;
long d=92.23372036854775807;
long e=true;
long f="Kosmik";
boolean a = 0;
boolean b = "true";
boolean c = True;
boolean d = true;
float a = 2.356f;
float b = -125.563f;
float d = -101.23;
float f=10.111111111f;
float f = 25f;
float g = 25;//25.0
>Here variable f can store in the range of values min -3.4028235e38F to max
3.4028235e38F
double a = 2.356;
double b = -125.563;
double d=10.1111d;
double h = true;
double h = "Hanumanth";
byte(least) < short < int < long < float < double(highest)
Note :
----------
Logical And (&&)
F&&F---F
T&&T---T
T&&F---F
F&&T---F
Logical OR (||)
F||F---F
T||T---T
T||F---T
F||T---T
Logical NOT(!)
!False=true
!True=false
---------------------------------------------------------
How to verify multiple checkboxes in a webpage using sselenium?
***********************************************************
Test steps
***********
Open the firefox browser
Navigate the AppUrl
Identify all Checkboxes
count total checkboxes
Verify multiple checkboxes one by one
Close the current Browser window
Example
*********
List<WebElement> allchk =
driver.findElements(By.xpath("//input[@type='checkbox']"));
Manual steps
***************
1.Identify all Checkboxes
2.count total checkboxes
3.Verify multiple checkboxes one by one
Example
*********
List<WebElement> allchk =
driver.findElements(By.xpath("//input[@type='checkbox']"));
allchk.get(i).click();
if(allchk.get(i).isSelected())
{
System.out.println("checkbox selected successfully");
}else
{
System.out.println("checkbox not selected successfully");
}
}
Handling popups
*****************
1. How to Handling Web-Based alert Popup/Javascript Alert Popup.
2. How to Handling modal popup window.
3. How to Handling multiple popup windows.
Example
*********
//click on ok button
alert.accept();
>Material
>Videos
>Interview Questions
>Material
>Videos
>Interview Questions
https://chat.whatsapp.com/JJI9TKM6EcrCqStHw4cWSe
Whatsapp no : 7386467494
>Int datatype can store in the range of values min -2147483648 to max 2147483647
What are valid and invalid statements?--IQ
*****************************************
char a = 'd';
char b = d;
char c = "d";
char d = 'dd';
char e = 66;
int f = 'd';
Handling Frames
*****************
1.How to handle single frame
2.How to handle multiple frames
3.How to handle Nested frames(frame inside a frame)
>Here variable s can store in the range of values min -32768 to max 32767
>Int datatype can store in the range of values min -2147483648 to max 2147483647
>Float datatype can store in the range of the values min -3.4028235e38F to max
3.4028235e38F
((JavascriptExecutor) driver).executeScript(script,argument);
Syntax :
((JavascriptExecutor) driver).executeScript("window.scrollBy(x-pixels,y-pixels)");
((JavascriptExecutor)
driver).executeScript("arguments[0].scrollIntoView();",driver.findElement(By.linkTe
xt("News")));
https://www.cs.cmu.edu/~pattis/15-1XX/common/handouts/ascii.html
Chromedriver.exe
*****************
https://sites.google.com/a/chromium.org/chromedriver/
driver.get("http://127.0.0.1/orangehrm-2.5.0.2/login.php");
Note :
========
Logical And (&&)
F&&F---F
T&&T---T
T&&F---F
F&&T---F
Logical OR (||)
F||F---F
T||T---T
T||F---T
F||T---T
Logical NOT(!)
!False=true
!True=false
Syntax :
*********
//wait 15 sec until the See all element is visible on a webpage once the element is
visible then click on See all link on a webpage
wait.until(ExpectedConditions.visibilityOfElementLocated(By.Locator("LocatorValue")
));
https://github.com/mozilla/geckodriver/releases
1. id----1
2. Name---------2
3. Linktext
4. PartialLinktext
5. TagName
6. ClassName-------3
7. cssSelector
8. Xpath----------4
Syntax : this()
Syntax :this(value)
Syntax : this.methodname()
Example
*************
short s=32768;//invalid
System.out.println(s);
Code Expla
Ex :
*****
1.Teacher--------100%-------complete knowledge (void teacher(){})
2.Student--------100%-------complete knowledge (void student(){})
3.Chort board----100%-------complete knowledge (void chortboard(){})
@Tes-2
******************
Manual Steps
*****************
1.Read the property files
2.Open the FF
3.Navigate the app URL
----
----
@Test -3
*************
Manual Steps
*****************
1.Read the property files
2.Open the FF
3.Navigate the app URL
----
----
>Click on logout
>close the browser
class Superclass
{
@BT
@AT
R.F
}
class Subclass1 extends Superclass
{
@BT
@AT
R.F
@Test 1
R.F
@Test 2
<class name="com.Banking.Customer.Subclass2"/>
</classes>
</test> <!-- Test -->
</suite> <!-- Suite -->
Output
*********
@BT
@Test 1
@Test 2
@AT
Output
*********
@BC
@Test 1
@AC
@BC
@Test 2
@AC
@BC
@Test 3
@AC
@BC
@Test 4
@AC
String S="Hanumanth";
int x=125;
String.valueOf(x);
String.valueOf(125);
"125"
@Tes-3
******************
1.Create single customer under kosmik1
2.To verify whether the single customer successfully created or not under kosmik1.
3.Create multiple customers under kosmik1
4.To verify whether multiple customers successfully created or not under kosmik1.
class Test{
@BC
@AC
@Test1
@Test2
@Test3
output
********
@BC
@Test1
@Test2
@Test3
@AC
class Superclass{
@BT
@AT
}
class Subclass1 extends Superclass{
@BT
@AT
@Test1
@BT
@AT
@Test2
----------------------
@BT
@Test1
@Test2
@AT
Output
***********
@BT
@Test1
@Test2
@AT
get() :
getTitle() :
//operation code
//verification code
}else
{
System.out.println("title not verified successfully");
}
Selenium WebDriver
*********************
<class name="Packagename.classname">
<methods>
<include name="testMethod"/>
<include name="testMethod"/>
<include name="testMethod"/>
<exclude name="testMethod"/>
</methods>
</class>
Chromedriver.exe
*****************
https://sites.google.com/a/chromium.org/chromedriver/
geckodriver.exe
https://github.com/mozilla/geckodriver/releases
https://code.google.com/archive/p/fire-ie-selenium/downloads
Hi Hanumanth,
Key Notes :
1.Understanding requirements-2hours
2.Prepared the Test cases-2hours
3.Execute the Test cases-2hours
4.Meeting with Project manager-2hours
Regards,
Venkat P
Company name
phno
Syntax :
**********
((JavascriptExecutor) driver).executeScript(script,argument);
((JavascriptExecutor) driver).executeScript("window.scrollBy(x-axis-pixels,y-axis-
pixels)");
((JavascriptExecutor)
driver).executeScript("arguments[0].scrollIntoView();",driver.findElement(By.linkTe
xt("News")));
Hi Rajasekhar,
Key Notes :
Thanks,
Hanumanth
https://github.com/mozilla/geckodriver/releases
https://chromedriver.chromium.org/downloads
https://www.selenium.dev/downloads/
@FindBys( {
@FindBy(name = "name locator value")
@FindBy(name = "name locator value")
} )List<WebElement> elements;
f) byte b="Hanumanth";
g) byte b=true;
a) int i=-2147483648;
b) int i=2147483647;
c) int i=21.47483647;
d) int i=true;
e) int i=2147483647L;
f) int i="Kosmik";
>Long data type can store in the range of values min -9223372036854775808 to max
9223372036854775807
a) long l=-9223372036854775808L;
b) long l=9223372036854775807L;
c) long l=92.23372036854775807;
d) long l=true;
e) long l="Kosmik";
boolean a = 0;
boolean b = "true";
boolean c = True;
boolean d = true;
float a = 2.356f;
float b = -125.563f;
float d = -101.23;
float f=10.111111111f;
float f = 25f;
float g = 25;
double a = 2.356;
double b = -125.563;
double d=10.1111d;
double h = true;
Datatype rules
****************
(least)byte < short < int < long < float < double(highest)
https://www.cs.cmu.edu/~pattis/15-1XX/common/handouts/ascii.html
(javascriptExecutor)driver.executeScript(script,argument);
Syntax
**********
((JavascriptExecutor) driver).executeScript("window.scrollBy(x-axis,y-axis)");
(javascriptExecutor)driver.executeScript("arguments[0].scrollIntoView();",
Element);
scrollIntoView()==>
Button : login
wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//
span[text()='index.html']")));