• USA : +1 973 910 5725
  • INDIA: +91 905 291 3388
  • info@tekslate.com
  • Login

Basics Of Core Java for Selenium

CORE JAVA IN SELENIUM

Ctrl+shift+\ forward àcommit multiple line

Ctrl+shift+    / àbackward  2ur commit multiple lines

String2multiple char    ex:-mahesh

Char àsingle char        ex:-m

2java is an object oriented programming language it contains multiple data types like int,double,float,char,string

String:-It is class  data type where it is responsible to store multiple char class. we can declare the string(object) in two ways. I,e 1)locally

2)globally

1) locally:-If we declare a object locally then the scope of the object in limited to that block only

Syntax:-                  string str;  \\declaration

Str”rajesh”;\\assigning value

String str1=”Mahesh”;

Methods ( or) functions:- Block of statements are known as method and it is acceptable for one action.

2Methods are runable

2we can call the method any were from the class .it means we can call the method within the method also.

2method should have a unique name

2we can declare the methods is two forwards

1)static           2)non-static

At TekSlate, we offer resources that help you in learning various IT courses. We avail both written material and demo 
video tutorials. To gain in-depth knowledge and be on par with  practical experience, 
then explore Selenium Training videos.

Syntax:-          public static void methodname(){

}       \\static

Public void methodname1(){

}                                          \\non-static

2) Globally:- we can declare the objects [datatypes,methods&instances]

Globally by using access modifiers like public,private&protected.

  1. a) Public:-these can be access with in the class as well as outside of the class [out side means another class]
  2. b) Private:-these can be access with in the class only
  3. c) Protected:-these objects can be access only in child class

Syntax:-   private string str ;// global declaration

public string str1;

protected string str2;

Parameterization:-   parameter means a value[datatype].

We can pass parameter to the method in runtype[while execution]

Check out the top Selenium Interview Questions now!

Syntax:public void sample*(string s){

System.out.prin\n(“welcome”+s);

}

Public static void main (string [] args) {

//to do auto generated method

Javabasics j=new javabasics(); //object or instance

j.sample 4(“rajesh”);
j.sample 4(“Mahesh”);

}

  1. Write a program to test the login functionally of mail.in.com by using methods?

Selene’s:- The selenium commands offer called as selenese

For an Indepth knowledge on Selenium, click on below

Summary
Review Date
Reviewed Item
Basics Of Core Java for Selenium
Author Rating
5

“At TekSlate, we are trying to create high quality tutorials and articles, if you think any information is incorrect or want to add anything to the article, please feel free to get in touch with us at info@tekslate.com, we will update the article in 24 hours.”

0 Responses on Basics Of Core Java for Selenium"

    Leave a Message

    Your email address will not be published. Required fields are marked *

    Site Disclaimer, Copyright © 2016 - All Rights Reserved.

    Support


    Please leave a message and we'll get back to you soon.

    I agree to be contacted via e-mail.