30
SELENIUM It is an open source functional automation tool. Automation:- The process of converting the manual test cases to test scripts with the help of some automation tool is known as automation. These scripts can be executed on the targeted application when ever needed. Advantages:- We can save the test execution time( regression time). On and average to save around 50-60% of the test execution time. We can reduce CTC (Cost To The Company). The test scripts are repeatable on multiple builds. We can maintain accuracy by executing the same scripts in the same manner. Bugs can be identified. The tool will provide the test report to analyse the bugs and we can ensure for quality.

selenium4testing.comselenium4testing.com/.../Selenium-Class-Notes_24May2.docx · Web viewWeb apps & Mobile apps Desktop, Web, Mobile apps. Note:-Selenium is for web and mobile applications

Embed Size (px)

Citation preview

SELENIUM

It is an open source functional automation tool.

Automation:-

The process of converting the manual test cases to test scripts with the help of some automation tool is known as automation. These scripts can be executed on the targeted application when ever needed.

Advantages:-

We can save the test execution time( regression time). On and average to save around 50-60% of the test execution time.

We can reduce CTC (Cost To The Company). The test scripts are repeatable on multiple builds. We can maintain accuracy by executing the same scripts in the same manner. Bugs can be identified. The tool will provide the test report to analyse the bugs and we can ensure for

quality.

What is the difference between selenium and QTP? (Or) Why you have selenium for your project?

Selenium features QTP features Open source Commercial tool & Costly Java, perl, php, python, ruby, VB script

C#, html. Firefox, IE, GChrome, IE, Firefox, GChrome.

Safari, opera. Windows, MAC, Linux. Windows. Flexible &Extendable. Flexible & Extendable less. Web apps & Mobile apps Desktop, Web, Mobile apps.

Note:-

Selenium is for web and mobile applications. If any desktop components or fields available in the application cam handled with the help of SIKULI or AUTOIT.

When to start automation for a project?

When the application s stable to save the regression testing time when can go for automation.

If you are using agile process (Scrum model) then we don’t wait until the build is stable. The requirements/sprints/iterations are stable. Then we can go for automation

We should have the budget approval mail client or lead to start automation.

What kind of application can be automated by using selenium?

Selenium supports all kinds of web applications and mobile applications irrespective of the language.

We can use any supported language to automate all the applications.

What is automation strategy/ approach/ automation life cycle to automate one project?

Check that whether the application is compatible or not with the tools (Selenium). Execute or review all the test cases at least once to get the functional knowledge on

the application and also to identify the test cases which are feasible for automation. Provide the automation estimation for all the identified test cases.(The no of days

which we are taking to automate the test cases is known as Automation Estimations) Prepare or identify the framework for the project. Develop the scripts for all the identified test cases. Once the scripts are stable then integrate in a hierarchical order to execute. If any new build released update the scripts as for the new build. Execute the scripts and capture the results in anew folder. Analyze the results and identify the bugs. Report the bugs manually to the developers by any reporting tool like bugzilla, QC,

Jira, etc.

Selenium components:-

The selenium is majorly built on below components.

1. Selenium IDE (Integration Development Environment)2. Selenium RC3. Selenium grid4. Selenium web driver5. Selendroid and appium

Selenium IDE:-

IDE stands for Integrated Development Environment It is to record and run the script. It is an add-on for Firefox (we can install and record in Firefox browser only).

It is accountable for user actions (for each and every action it will generate the script).

By default it will generate the script in html language. If required we can convert to other supported language like java, .net, etc.

The recorded scripts can be run against other browsers also with the help of RC or web driver.

Selenium RC:-

RC stands for Remote Control. It is the selenium1 and introduced in 2004 by jason huggins. It is a server which is responsible to launch all the browsers but one browser at a time. We can able to automate the entire application by using selenium RC.

Selenium web driver:-

It is the selenium2 and it is an advanced version of RC. The limitations which are identified in RC are overcome in web driver and also

given the added advantages.

Selenium Grid:-

It is for parallel execution. We can launch all the browsers parallel and the scripts can be executed in all the browsers parallel at a time.

Maximum of 5 browsers can be launched by using grid.

Selendroid:-

It is to test the mobile applications on the android platform. it is to test on less than 4 android version

Appium:-

It is to test the mobile applications on both android and IOS platforms. If the android version is more than 4 we need to use Appium

Steps to install selenium IDE in Firefox browser:-

Selenium IDE will be available under tools.

Describe the steps to record the scenario like open google.com type selenium testing in the test box then click on Google search.

Open Firefox, go to tools, then click on selenium IDE. By default it will be in recording mode. If it not in recording mode then click on red button to start the recording. Minimize the tool then perform or execute the test steps on the browser. Once the recording is completed, restore or maximize the tool then click on the red

button to stop the recording. By default the selenium IDE will give the recorded actions in two formats.

1. Table2. Source

Table contains all the recorded actions in a tabular format. Source contains the same recorded actions in the form of source code(By default

HTML). To execute the recorded scripts we have two options.

1. Play current test cases.2. Play entire test suite.

To maintain the synchronization make the execution speed slow by using the option fast--slow.

Synchronization is to provide wait to the tool to maintain in-sync between both application and tool.

To save the recorded script we have the option like go to file click on save test case as and save the test case in .html extension.

To open the recorded script go to the file click on open and open the desired scripts.

Test suite / batch execution:-

Combination of multiple test cases is known as test suite or batch.

Scenario: Describe the test to execute multiple test cases by using play entire test suite option

Open selenium IDE then record the first test scenario. Once the recording is completed click on the red button to stop the recording.

Take a new test case by navigation to file then click on new test case. Then record the scenario make sure that the selenium IDE is in recording. Once the recording is completed click on the red button to stop the recording.

Use the option play entire test suite to execute all the test cases in sequential order.

Limitations or disadvantages selenium IDE:-

Its not possible to perform regression testing.

Ex:- The recorded scripts can't be executed on the new build if the application is dynamically changing.

We can't perform retesting of the applicationEx:- Test the login functionality with multiple sets of different credentials.

Test the one way search functionality with multiple sets of origin. Static testing like checking the availability of the fields (validation) is not possible to

perform. We cant perform database testing It is limited to firefox browser only. It won't provide the detailed test report or build status report for the analysis. The above all can be performed by using RC or Web driver.

Advantages of selenium IDE or when to use selenium IDE(recording):-

To check whether the application is compatible or not can be identified by using selenium IDE.Ex:- Record few scenarios and check that whether the tool is generating the script or not.

If it is generating the scripts then we can conclude that the application is compatible with selenium..

If you are facing any problem to identify the locator/target then it can be overcome by using selenium IDE.(We can take the locator from Selenium IDE)

We can convert the recorded script to specific language and it can be used in the scripting also.

To convert the recorded scripts go to options then click on options then check the check box Enable experimental features then click on ok.

Now go to options, click on format and select the desired language.

NOTE:-

When to go for scripting and when to go for recording for a project automation?To automate any project we have to use the scripting by using webdriver while scripting if you are facing any issues then it can be overcome by using selenium IDE.

How to configure or setup the selenium with java?

To configure selenium we need below files

Eclipse

JDK or JRE (6/7/8)

Selenium_server_standalone_2.53.0.jar

RC, Web driver and Grid

Eclipse:- It is an editor where we write the scripts.

JDK/JRE:- JDk stands for java development kit.

JRE stands for java run time environment.

Both are nothing but java.

To open eclipse java should be installed in your system. Go to the path C:\Program Files\Java and check that JRE 6/7/8 is available or not.

If it is not available then install JDK 7/8 exe file.

Selenium-serve_ standalone jar file:-

It is the selenium where it’s a combination of RC and web driver, grid. Take the eclipse and extract the zip file. Copy to any desired drive. Check that JRE 6/7/8 is available in c:/programme file/java. If is not available then

install JDK. Create a folder with a name lib/library copy the selenium server standalone jar file

and paste it in the library folder. Go to eclipse then double click on blue icon (eclipse.exe) continue to open. By default if displays some path in the workspace if required we can update the path. Workspace is the folder where it contains the test scripts click ok in workspace

launcher window. Click on workbench to navigate into eclipse create a project by navigating to a

file,click in new and select project. Select the java project then click on next. Give the project name as selenium automation. Select java SE 1.8/1.7/1.6. From the field use an execution environment JRE then

click on finish. Click on s2 to continue the setup. Expand selenium the automation project right click on JRE system library click on

build path then select configure build path. Click on add external Jars and select selenium server standalone jar file from the

library folder. Click on open and ok. Go to run click on external tools and select in that we are having external tools

configurations. Double click on the programme click on browse file system at location select java or

java.exe from the below path c:\programme file\java\jre8\bin\java.exe. Click on browse file system at working directory select library folder then click ok d:\

library (it should contain the selenium server standalone jar file). Give the argument as jar selenium server standalone 2.46.0 JAR click on apply and

click on RUN.

Write a programme to verify the search in google.co.in?

Take a class by write click on the project click on new and select class. Give the package name as selenium RC. Give the class name as goggle search check the checkbox public static void main

then click on finish.

Package:-

Package is nothing but a folder where it contains the classes .The package will be created under the SRC folder of the selenium project.

Class:-

Class is a blue print of templates it contains object. Object can be anything which should be physically available. In java the object is nothing but the data type or method or instance.

Public static void main:-

It is the main method which is responsible for main method. To take the locators for every browser we are having the below addon.

Browser Addon Fire fox inspect element IE developer tools Google chrome inspect element Safari inspect element Opera inspect element

Scenario:- write a programme to test the login functionality of hms by using the credentials user1 and user1

Here copy the pgm

Note:-

By default selenium run on the port 4444. If required we can change the port to any 4 digit number.

-jar selenium_server_standalone_2.46.0.jar_port6666

SELENESE:-

The selenium commands often as called as selenese.

Browser commands:-

Start ( ):- It is to bunch or open the browser.

Open ( ):- It is to open the URL of the application.

Window maximize( ):- It is to maximize the window.

Stop ( ):- It is to close the browser.

Syntax:- selenium.stop( );

Interactive commands:-

Type ( ):- It is to enter same value in the test box.

Syntax:- selenium.type(“locater”,”value”);

Click( ):- by using this command we can click on the button, radio button, check box, image and link.

Syntax:- selenium.click(“locater”); //button, radio button, check box, image//

Selenium.click(“link=displayname”); //link

Syntax:- it is to select some value from dropdown and list box.

Syntax:- selenium.select(“locater”,”value”);

Write a program to click on the links ike manua FAQs and selenium FAQs in selenium4testing?

Core java basics:-

Java is an object oriented programming language. It has multiple data types like int, float, char, double, string, arrays, etc.

String:-

It is a class data type where we can store multiple characters. We can declare the string(object) in 2 ways.

1. locally2. globally(To comment multiple lines select multiple line ctrl+ shift+ backward slash )

Local declaration:-

If we declare any string (object) locally with in any block/ method then the scope of that reference variable is limited to thatblock only. Local variables cant be used outside of the block.

Global declaration:-

If ypu are planning to access the object(data types, methods and instances ) in multiple classes and methods then we need to declare it globally by using access modifiers like private, public, protected, default.

Private:-

These objects can be used with in the class only. Private objects cant be used outside of the class.

Public:-

These objects can be used within the classes asa well asa outside of the class. Public object can be used with in the project.

Parameterization:

The process of sending/passing the velue to the method from the main method is known as parameterization.

Syntax:-

Write a program to verify the permanent registration in HMS by using methods..?

Note:-

If you are facing any problem in IE. To run the script IE. We have the use commands called “*iehta”. If IE is blocking the execution then do the below execution setting in IE.

Go to tools, Then click on internet options, Then click on security, Then click on uncheck the check box enable protected mode in all the 4 sections like internet,trusted sites, restricted sites, Then click on apply, Then click on ok, Then again click on ok.

Synchronization:-

The process of providing wait to the tool to main the sync both application and tool is known as synchronization. It is two types.

1. page load

2. page refresh

Page load:-

If the application is taking time to load the page then we need to the below command selenium.waitforpagetoload(“3000”);

Advantage of the above command is it doesn’t wait the given time.

Once the load is completed its continues the execution. The given time is the maximum time to wait,.

Page refresh:-

If the application taking time to refresh the page then we need to the below command. Selenium thread.sleep(5000);

It is a standard wait its simply waits upto the given time. Thread.sleep wait its simply waits upto the given time. Thread.sleep is form of java command. When ever we it may through the exception. To handle it add throws exception to the method as well as main method.

Write a program to test the login functionalities of a gmail.?

Absolute X-path:-

If we are unable to identify the element by using relative X-path due to same code duplication, then we can go for absolute X-path. It will identify the elements with the hierarchical path of the logs. We can take the absolute X-path from the below tools.

1. Fire path.

2. Copy X-path.

Fire path:-

It is an add-on for firebug. So we need to install firebug then we able to use fire path.

Steps to install firebug:-

Launch fire fox and open the below URL.

http://addons.mozilla.org/en_us/firefox/addon/firebug/

Click on add to Firefox and click on install now,

Steps to install fire path:-

launch Firefox and open the below URL.

http://addons.mozilla.org/en_us/firefox/addon/firepath/

click on add to Firefox then click on install now.

Then click on restart now button to restart Firefox.

How to capture the X-path:-

Right click on field,

Then Click on inspect element with firebug,

Then right click on the highlighted section,

Then right click on the inspect in fire path panel.

By default it will the relative X-path. To get the absolute X-path click on the arrow mark at fire path and select generate absolute X-path close fire bug and capture the X-path again to get the absolute X-path.

Copy X-path:-

It is an add-on for the browsers like Firefox, googlechrome, safari and opera. It will be available by default in the above browsers.

What is the difference between the double slash ( // ) and single slash ( / ) in the X-path?

//- represents the parent tag.

/ - represents the sub tag in the parent tag.

Web driver selenium2:-

What is the difference between the selenium RC and web driver?

Web driver features:-

We can access all the latest browser like firefox-39, googlechrome -43, safari-5, IE-11, opera-29/30.

To run the web driver program not necessary to run the selenium server. By default web driver launchers the browser to maximize stage the it doesn’t launch

the command history browser. By default web driver maintains the page load synchronization, if it is a page refresh

then we need to handle by using thread sleep weight or implicit weight. Web driver is having the auto scroll down option into the application while executing

the script. We can implement both web driver commands and RC commands in a single class.

We can effectively take the information from the application fie validation.

How to launch all the browsers:-

Web driver drivers:-

To launch firefox, safari, opera use the below drivers.

Here to copy the pgm.

How to launc the googlechrome:-

To launch the googlechrome we should have chrome driver exe file. We can download it from the below site. http://ChromeDriver.storage.googleapis.com/index.html Click on the folder 2.16 then download chrome driver win32 zip file. Extract the zip file then copy chrome driver exe file and paste in the library folder. It is for both 32-bit and 64-bit systems.

Here to copy the pgm

To launch IE we need IE driver server. We can download if from below.

http://docs.seleniumhq.org/download/

Based on the system type (32 bit/64 bit )

Download IE driver server.

Extract the zip file then paste the IE driver server to library folder.

Write a program to verify the HMS permanent registration by using web driver?

Here to copy the pgm

Write a program to verify the one way search from Hyderabad to Bangalore in speicejet.com ?

Here to copy the pgm.

Web driver commands:-

Note:-

To upload a file we have 2 options with the help of send keys we can provide the path of the image to upload.

By using sikuli also we can upload the file.

How to handle java scripts alerts messages and pop ups or child windows?

Verify the one way search in spiecejet.com with more infont count then adults. Is displays and java script alert messages click on it.

Before clicking on the alert message print the message which is available on the alert. To handle the alert we need to navigate from the browser to the alert then we can

perform the actions either ok or cancel.

Accept( ):-

It is to click on dialogue alert and confirmation alert.

Driver.switchto( ).alert ( ).accept( ); // to click on ok.

Dismiss( ):-

It is to click cancel on thr conformation alert message.

Syntax:-

Driver.switchto( ).alert ( ).dismiss( ); // to click on ok.

Get text:-

It is to take the test or label from the application. Where the web driver is having the focus.

The written type of get text is string.

String str;

str = driver.switch to( ).alert( ).get text( );

System.out.println(str);

Scenario for pop up:-

Write a program to verify the one way search in speicejet.com. Then click on feild flights it will navigate to the select then click on currency

convertor. where it displays a pop up then navigate to the pop up perform actions on pop up then

close it. Select any value from the going to field. To handle the pop up we need to navigate from the main window to the pop up by

using below command where we have to pass the window name.

Syntax:-

Driver.switchTo( ).window(“window name”);

Get window handle:-

It is to take the one window name. It will return the window name where the web driver is having the focus.

The return type get window handle is string.

Here to copy the pgm.

How to navigate the new window or tab ?

Scenario:-

Open selenium4testing then click on HMS. So it will navigate to a new window and displays the login page then login into HMS.

Web driver commands:-

Browser commands:-

Get( ):-

It is to open the URL of the application.

Quit( ):-

It is to close the main window.

Syntax:-

Driver.quit( );

Close( ):-

It is close the pop up or child window.

Iterative commands:-

Sendkeys:-

It is to enter the same value in the text box.

Clear( ):-

It is to remove or clear the value from the text box.

Syntax( ):-

Driver.findelement( by.name(“locater”)).clear( );

Click( ):-

By using the command we can click on a button, radio button, check box, image, and link.

New select( ):-

It is to select same value from a dropdown and listbox.

Scenario:-

Login into HMS then click on the feedback link then navigate to child window(popup).

Enter same values in popup then close the popup, then click on ADT in the main window.

Scenario:-

Login into bugzilla by using the credentials. Jan 30 [email protected] password is selenium. Then click on search, then click on advance search, then select ERP, HMS, Speicejet

in the product list box.

How many testcases we can automate in aday?

It all depends on the testcases and file application on and average we can able to automate around 6 to 7 test cases. It means per one testcase you are taking around 1 to 1.5 hours.

Because ,

1. To analyze the testcase.2. To develop the scripts with locators.3. To execute the scripts.4. To debug and stabilize the script.

Provide automation estimations for 200 testcases:-

1TC = 1 to 1.5 hours.

200TCs = 200*1.5=300 hours.

No.of days = 300/8=38days.

No.of months = 38/22 = around 2months.

Debugging:-

The process of running the scripts step by step mode is known as debugging. Debugging is to identify the errors in run time and also we can see the execution flow

of the scripts.

Steps to run the scripts in debug mode:-

Go to script then add the break point by double clicking on the line number. From break point onwards the script will be executed line by line. Right click on the script click on debug as and select java application. Click on yes to continue thescript debug mode. Click on f6 to run the scripts line by line. Click on f5 to navigate into the method. Click in f8 to run the script without debug mode.

To come back to the normal screen click on the terminate button in debug section then click on java.

Double click on the break point to remove.

Framework:-

The structural way to implement the scripts for better maintenance is known as framework.

Maintenance means how we are implementing the script. Is it easy to analyze, update, execute and getting the test report.

We have the below frameworks

1. Modular framework.2. Data driven framework.3. Keyword driven framework.4. Hybrid framework.

Modular framework:

It is the basic framework and also known as linear framework. The application will be divided into multiple modules and sub modules. The automation engineer will implement the scripts for all the modules and sub

modules. once all the scripts are stable then they will integrate in a hierarchal order to execute.

Data driven framework:

From data driven onwards external files like excel, text (note pad), database, xml etc.. The external files are to take test data and to give the output results. It contains driver script which is responsible for execution. The driver script doesn’t

contain any of the test cases and test data. All will be available in the external file. The driver script will take the data external files and executes. Hence we will call it as

data driven framework.

Advantages:

1. If any change in the application we can update the change in the external file. So, the maintenance is easy.

2. The driver script will be implemented based on the command fields available in the application. So it is reusablefor all kinds of application.

3. It is more suitable for agail based projects.

4. If the application contains more number of fields type 100 textboxes, 100 buttons etc. Then not necessary to implement those many lines of code to we can prefer driven script work on all the fields.

Disadvantages:-

1. Developing the driver script is a challenging task.2. Taking all the fields locators into the excel file is also a challenging task.

Keyword driven framework:

Keyword means as a step it is a step by step execution. It is very similar to manual testing format. The way we have used to implement the test cases in manual testing the same can be

followed in keyword driven with the help of Junit and TestNG as below.

Manual Testing Keyword Driven frameworkJunit & TestNG

Precondition

Testscenario with Testscripts

Postcondition

Before

Test

After

Advantages:

1. The same manual testing format we are using in a automation .so the maintenance is easy.

2. Junit and TestNG are predefined frameworks not necessary to implement the frameworks.

3. Once the execution is completed it will provide the results also.

Disadvantages:

1. We can choose keyword driver framework for suitable applications.

Hybrid framework:-

The combination of two or more frameworks is nothing but hybrid framework. We can utilize the advantages of both the frameworks in hybrid framework.

Junit:

Junit is nothing but java unit testing framework. It is to implement and execute the scripts in java running language.

Scenario:

Write a program to click on manual FAQ’S and selenium FAQ’S by using web driver with Junit.

Step1: Take a Junit class by right clicking on the project click on new and select Junit test case.

Step2: Give the package name as Junit and give the class name as selenium4 links then check the checkboxes setup and teardown .then click on finish.

Step3: Junit contains multiple annotations like @before, @test, @after etc.

@before:- It contains setup method where it acts as a precondition. When we run the script it will be executes initially.

@test: It contains the test scenario with scripts.

@after: It is responsible to close the execution where it contains teardown method.

J unit lifecycle / Execution flow:-

When we run the script initially it invokes the @before method then execute method then that after method. The same will be continued for all the @test method.

Once the execution is completed it will provide the result under the J unit section of eclipse. If any exception/error identify it will be displayed under the failure phase.

Batch / Test suite Execution:-

Combination of multiple test cases is known as suite / batch.

Scenario:-

Implement few scenarios at perform both execution . Once all the scenarios are implemented right click on any class then click on

run as and select run configurations. Click on the radio button run all test in the selected project then click on run

and click on run. It executes all the classes in the alphabetical order.

Limitations of Junit:

For each and every test the before and after are applicable. So ,we need to implement all the scenarios very independently.

Once the execution is completed it will provide the results under the Junit section eclipse but not if any external file (Excel or HTML).

To perform batch execution we are having the only one option like run/test in the selected project. But it doesn’t have the option to run selected classes and selected methods (scenarios).

It is having very limited annotations like @before class @ Before @Test @After @After class

All the above limitations can be overcome by using “TestNG”.

Test NG:-

It is the testing framework and it is advanced version of J unit. The limitations which are identified in J unit are overcome in Test NG and also given the added advantages.

Test NG is an add-on to eclipse.

Steps to install Test NG in Eclipse:

Go to eclipse click on help and select install new software. Click it. Click on add give the name as Test NG and give the location as http://beust

.com/eclipse. then click on ok. Check the checkbox at Test NG then click on next. Again click on next. Click on the radio button I accept the Terms and licence agreement then click on

finish.

write a program to perform the permanent registration in HMS by using Test NG with Web drive?

Take a test NG class right click on project click on TestNG and create TestNG class. Click on the browse button at source folder expand the project and select SRC. then

click on ok.

Package Name:

Give the Package name as HMS-TestNG. Give the class name as registration (class name should represent the module name).

then check the check boxes before test and after test. Then click on finish.

Test NG / Execution flow:

Test NG contains multiple annotations like @before test, @test, @after test etc. when we can run the script initially it invokes the before test method then executes all the @test methods in the alphabetical order then finally it executes @after test method.

once the execution is completed it will provide the results in two formats.

1. In console2. It creates an html file under the project folder of bug space.

D:/workspace-1030/seleniumproject/test-output/Default suite/Default test.html

write a program to check on links like Hindi, Bengali, Telugu by passing parameters to the method in TestNG with Web driver.

Here to copy the program.

How to capture the screen shots:-

Advantages:-

If any test case failed to analyse the fail result we need a screen shot. Its not possible to automate GUI testcases because, there is (ROI) return on

investiment at the same time its possible to implement the scripts for look and feel.

Scenario:-

Write a program to capture the screen shot for manual FAQs, selenium FAQs, general testing FAQs?

How to capture the screen shot with time stamp?

XML:-

Our plan is to use the XML file to perform the test execution.

Advantages:-

We can execute the test methods in user defind order (we can avoid alphabetical order issue).

We can provide user defind name to default suite folder and default test html file. We can perform batch execution. We can perform parallel execution also.

How to create an XML file:-

Right click on the project, click on new and select file. Give the file name testsuite.xml then click on finish.

String comparisons:-

we can compare the string with another string by using the below commands.

1. Equals: It looks for the exact match and it is case sensitive.2. EqualsIgnoreCase: It also looks for the exact map but it’s not case sensitive.3. Contains: It will check whether few characters are available in the string (or)

not.

Syntax:

String splits:

String contains one,two,three,four check that three is available or not. it available print it.

Splits:

Split is a method from the string we can divide the string to multiple values by using some regular expression (some value). The value which we are using to divide the string it will be removed from the string and the remaining values will be store in an array.

The return type of split is an array.

Array:

Array is a class data type where we can store multiple values with similar data types. Array will store the values in a container format. So, for each value it will provide a separate position.

Syntax: String S1[ ] = new String [9];

int k[ ];

char c[ ];

object o[ ];

Array

one

two

three

four

scenario:-

0

1

2

3

login into HMS then click on permanent registration. print all the mandatory fields which are available in PR phase check that last name and age fields are available (or) not.

scenario for Ajax control:- Ajax means dynamic based on the input field will dynamically displays the

values. Open google.com type selenium in the textbox. check that selenium web

driver is available in suggested list or not. if available type it.