Special Offer - Enroll Now and Get 2 Course at ₹25000/- Only Explore Now!

All Courses
Common Interview Questions and Answers for Freshers

Common Interview Questions and Answers for Freshers

June 12th, 2019

Common Interview Questions and Answers for Freshers

In case you’re searching for Common Interview Questions and Answers for Experienced or Freshers, you are at the correct place. Additionally Our Software IT Online Training comprises the basic level understanding of C language, networking, and manual testing. Beginners with basic knowledge can enter into programming, networking, and testing depending upon their interest and we provide the platform to know the basics through Software Online Course. Software Engineer’s role revolves around project management, project life cycle, client requirement, and bug fixing and maintaining the software. Here we provide the top-listed basic interview question and answer which brings success to the learners. Since the learner is a beginner it is very essential to take note of the questions asked during interviews as it gives professional thinking to the learner.

Common Interview Questions and Answers for freshers are prepared by 10+ years experienced industry experts. Common Interview Questions and Answers are very useful to the Fresher person who is looking for the new challenging job from the reputed company. Our Interview Questions and answers are very simple and have more examples for your better understanding. By this Common Interview Questions and Answers, many students are got placed in many reputed companies with high package salary. So utilize our Interview Questions and answers to grow in your career. 

Best Common Interview Questions and Answers for Freshers

GangBoard provides the platform to grow with knowledge for the different roles of the big chain of professionals through the Software Interview Questions and Answers. Here we take a deep look into the questions which are designed especially for the young techies who want to enter into the software industry. As a fresher, there are a lot of questions which crack the mind before attending the interview like which role is suitable for the individual personality, how to groom skills to make use of the opportunities, and how to manage the questions if we are blank. Software Course in Chennai with GangBoard will be a game-changer to your journey towards excellence and advancement. As far as software domain is concerned some roles require the intense knowledge whereas some roles require the basic knowledge only.

Product-based companies look for candidates with intense knowledge of different roles. Some of the big product-based companies are Microsoft, Google, Amazon, Azure, and Face book. The trending demanding job roles in the product based companies are the web developer, front end developer, back end developer, mean stack developer, networking professionals, and system admin.  TCS, Wipro, and IBM are service-based companies with wide opportunities for beginners. Automation, data analyst, business analyst, Programming, marketing, sales, and business analysis are some of the domains which are given more importance in the service-based company. GangBoard provides the best Job Oriented Training and Certification Training to help the fresher to live their dream with little effort through our training sessions.

Python Interview Questions and Answers

Q1) What is Python? What are the benefits of using Python?


  • it is so easy to understand and easy syntax.
  • Python has a scope in automation, data science, data analysis, etc.
  • Python provides less complexity in writing the code as compared to other languages like java, C#.
  • Python has a large library bank.

Q2) What is PEP 8?

Answer: PEP 8 is the style guide to follow the coding practice to write the consistently understandable code.

Q3) What is pickling and unpickling?

Answer: Is short pickling is converting python object into byte stream and unpickling is the reverse of pickling, pickle is the module in python which helps to do this job. And even we can use two methods is dumps and loads for that.

Q4) How Python is interpreted?

Answer: There is concept of complier and interpreter but programing language codes are not machine level code so first python language code will be converted into machine code like byte code and then it will be interpreted if any fall happens in terms of error then the code will throw an error difference between interpreter and compiler is compiler compile full set of code even the code has some error and all the errors will be thrown in logs whereas interpreters stop interpreting code as soon as any error occurs.

Q5) What are Python decorators?

Answer: Before understanding decorator we should understand function completely in python that’s is we can pass function as parameters, function can return and function, we can write nested function in python and  most important functions are same as object in python, so decorators are the tool which allows the programmer to change the behavior  of existing functions.

Q6) What is the difference between list and tuple?

Answer: The one main difference between list and tuple is enough to understand that list are mutable and tuples are immutable.

Q7) What is the meaning of immutable?

Answer: The data type which are declared once and cannot be modified those are mutable and which data types are provide the feature to update any point of time are comes under mutable data types and this is only the concepts of immutability.

Q8) How are arguments passed by value or by reference?

Answer: n python arguments are neither pass by value not pass by reference. Python is object centered language and everything in python is an object. So the python treatment with any data types are on the basis of assignment and its depends on the name.

Q9) What are the built-in type does python provides?

Answer: There so many built-in types are there in python like.
None, long, int, str, float, long, list tuple, set, dict, range, xrange and etc.

Q10) What is lambda in Python?

Answer: Lambda in python provides the way of writing the expression which returns the function object and then that function object can be called as function to execute the expression.

Q11) Why lambda forms in python does not have statements?

Answer: Lambda cannot contains the statements inside because the syntactic structure of the python cannot handle the nested statements in an expression because lambda has two part separated by “:” one is argument passing and another is for executions of expressions.

Q12) What is pass in Python?

Answer: Pass is key word in python which is used when statement is required but not executions are required so we can use pass key word, pass key word is mostly used with class and functions, function if not code need to write in that and class when no methods are required to write in that class.

Q13) In Python what are iterators?

Answer: Iterators is an object in python that provide the facility to traverse through the containers all those containers like list, tuple, set can be irritable using iterators in python.

Q14) What is unit test in Python?

Answer: Unit testing in python is as same as in other programing languages, testing of the smallest unit of the code is called unit testing and the smallest unit of the code is nothing but functions. We can use pyunit frame works to write the unit test.

Q15) In Python what is slicing?

Answer: All the data types which are sequence provided one feature that is slicing as by the name it is clear that slice something and in python we have slicing operator “:”
And by using “:” operator we can get the slice from any sequence. For example we Have list like

Q16) What is docstring in Python?

Answer: Doc string is nothing but a way of documentations for class, function and different modules in python.

Q17) How can you copy an object in Python?

Answer: There are two types of copy we can do of an object:

  • Deep copy
  • Shallow copy

To make the copy of an object we use copy module in python.
There are two method copy and deep Copy, copy function do shallow copy and deep Copy function do deep copy.

Q18) What is the difference between the shallow copy and deep copy in python?

Answer: As we know we have two methods to do copy of an objects when we do shallow copy the we copy an object and both main object and shadow object refers the same data so if any change will reflects where deep copy creates the individual copy of shadow object and change in shadow object does not reflect to the main object.

Q19) What is negative index in Python?

Answer: Python containers provide the feature to of slicing with positive and negative index both.
Containers index starts with 0 index and the n size container will have n-1 index is last index. For negative index –n is first index and – (n-1) will be second index.

Q20) How you can convert a number to a string?

Answer: Converting any data type into other data type is known as type conversion and in python we can convert data type by wrapping with class name.
For example: a = 10 and for converting b = str(a)

Q21) What is module and package in Python?

Answer: Modules are nothing a code which is written for a specific purpose, it can be a class or functions. And we can design different useful modules in a python package that can be used by importing the package it self.

Q22) Mention what are the rules for local and global variables in Python?

Answer: By default writing a variable outside functions and class are global variable, and the variable inside function body or in class body are local variable of those components.
If we want to use global variable in function then we have to explicitly mention variable with global key word.

Q23) Explain how to delete a file in Python?

os.remove() it remove a file.
Os.rmdir() it removes a directory.
Shutil.rmtree() delete a directory and all container.

Q24) Mention the use of // operator in Python?

Answer: The division value in which if output is quotient then digits after decimal places are removed. But if one value is negative then output will be floored means rounded away from zero.
Examples: 9//2 = 4 and 9.0//2.0 = 4.0, -11//3 = -4, -11.0//3 = -4.0

Q25) Mention the use of the split function in Python?

Answer: Split method returns the list of strings after dividing by delimiter.
word = “my, name, is khan”
print(word.split(‘, ‘))
[‘my’, ‘name’ ‘is’, ‘khan’]

Q26) Explain what is Flask & its benefits?

Answer: Flask is a python frame work which helps us to easily work on rest API backend development and even it is used to do the web development.
Flask provides the configuration capability by creating the application instance and a lot more routing related stuffs can be done easily by using flask annotations.

Q27) Mention what is the difference between Django, Pyramid, and Flask.

Answer: Flask is a micro frame work and used for small applications pyramid and Django are large framework and used for large applications pyramid provides the flexibility to use any of the tool and Django also do the same and even Django provides the Its own ORM also.

Q28) How python manage memory?

Answer: Python always stores the objects the private heap of the program and all the objects will located there python maintains the immutability concepts with many data types to use the memory in optimized way.
Python uses its own garbage collector to clear the unreferenced data objects.

Q29) How can you share variables across modules?

Answer: Sharing the members in between the modules are required to keep the members in any python file and we can import the python file itself to use those.

Q30) What are generators in Python?

Answer: There are lots of efforts are required to create iterators in python so we can simply use generators functions to create the iterators. We can write the function with yield instead of return keyword to return multiple values in python.

JAVA Interview Questions and Answers

Java Interview Questions and Answers offers GangBoard. If you are on this that means you are looking out for the interview questions which can help you in passing your technical Java Collection Interview Questions and Answers. Gangboard has listed down some of the most important and mostly asked Java interview questions and answers for the fresher’s as well as experienced individuals. Our technical team of Gangboard has created well-researched questions.
Do not waste more time and start preparing for your java interview so that like others you can also crack your interview and achieve your career goals.


Java is basically an object-oriented, class-based high-level programming language. According to GitHub in the 2018 java was among the most used language. Java is used in mobile devices, internet programming, games etc.

Development History

Java was designed by James Gosling and his team Mike Sheridan & Patrick Naughton. It started with the name “oak” in the year 1991 but later the name changed to Java. The first version of Java got published in the year 1995. Java is a product of Oracle Corporation. The latest version of java is Java12 which got released in March 2019.

 Key features of java

Some of the key features of Java are:-

  • Platform Independent
  • Secure
  • Dynamic
  • Distributed
  • High Performance
  • Object-Oriented

Q1) Why Java is platform independent?

Answer: Java is platform independent language because the language execution convert it to the byte code and the byte code can be understandable by any of the platform so once the java code is compiled in one platform can be execute in any platform using JVM. And JVM is the immediate interface which can execute java byte code to different platform.

Q2) Why Java is not 100% Object-oriented?

Answer: Java is object oriented programing language because it supports primitive data types which are not considered as object.

Q3) What are wrapper classes in Java?

Answer: Java has the concepts of wrapper class, wrapper classes can wrap the primitive types and then we can use the primitive types as object because all the collection modules like list, set stores the objects. So with the wrapper classes we can store the object of primitives in collections.

Q4) What are constructors in Java?

Answer: Constructors is special method of a class that get called when we create the object of class.

Q5) What are the type of constructor in java?

Answer: There are three types of constructors in java.

  1. Parametrized constructor.
  2. Non Parametrized constructor.
  3. By default constructor.

Q6) What is singleton class in Java and how can we make a class singleton?

Answer: Singleton is a kind of design pattern in java which can restrict to create multiple object of a class in java.
Suppose if we want to create only one object at a time of a class then we can make the class as singleton.

Q7) What is the difference between equals() and == in Java?

Answer: Equals() and == both are used to compare the object but Equals method check the value of object and compare and == operator check the has code meaning the location of the object in memory and give result.

Q8) What is a package in Java?

Answer: Package is provides us a feature to avoid the naming collision in class. Because we cannot create two class with same name in a single package.

Q9) Why pointers are not used in Java?

Answer: Java does not have concepts of pointers. Reason one is because of security issue with pointer java does not use pointer because pointers are used for direct memory location manipulation.

Q10) What is JIT compiler in Java?

Answer: JIT compiler is a just in time compiler and it comes with JVM. So when java code once complied then it will be generating byte code and it can be possible to run that code in any platform. JIT compiler is responsible to communicate with JVM at run time and compile the byte code to machine level code it known as second compiler also.

Q11) Difference between String, String Builder, and String Buffer.

Answer: String is immutable and String Builder and String Buffer are mutable so if we need mutability then we can use string buffer or string builder.
String buffer is thread safe and String Builder in not a thread safe so we need to provide thread safety with data then we can use string buffer.

Q12) What are access modifiers in Java?

Answer: Access modifiers are nothing but the keyword in java which are used to provide the access scope of the members of the class. Public, private, protected and default are access modifiers in java.

Q13) Define a Java Class.

Answer: Whenever we think about any object then we can easily think about the properties of that object and when we wrap the data/attributes/properties/ functionality of an object in a package that package is known as class. And wrapping of the data is known as encapsulation.

Q14) What is an object in Java and how is it created?

Answer: Object is nothing but an instance of a class and we can create an object by using new keyword in java.
Example: suppose we have a class Employee
Employee employee = new Employee();

Q15) What is Object Oriented Programming?

Answer: Object oriented Programming is the concepts which is required when we design a software for the real world use case.
So OOPS concepts give us a thinking to write the code for the real world use case.

Q16) What are the main concepts of OOPs in Java?

Answer: There are four important concepts are there in OOPS.

  1. Encapsulation
  2. Inheritance
  3. Abstraction
  4. Polymorphism

Q17) What is the difference between a local variable and an instance variable?

Answer: Locale variable are always will be a part of method body. Instance variable will be declare in class but out of the functions. Functions can access local variable as well as instance variable but local variable to a function can to be visible outside of the functions in java.

Q18) What is final keyword in Java?

Answer: Final keyword can be used with the variable, functions and with class.
When we use finale keyword with the variable the that variable cannot be changed once that is initialized if we create a finale method then that method cannot be override and if final is used with the class then it cannot be inherited.

Q19) What is Java String Pool?

Answer: As we know string is the immutable class in java and once we create the string then it cannot be updated, java maintains the tow special memory aria where it allocate memory to the objects those are heap and constant pool which is known as string pool so any string data will be take allocation in string pool and if any other string will hold the same value then both string points the same memory location taking new memory instead.
String objects and string literals are different and string object created by using new keyword takes memory in heap area.

Q20) What is constructor chaining in JAVA?

Answer: When we perform inheritance between classes then we can use super keyword to call the parent class constructer so the advantage is when we have the long hierarchy of classes then by initializing the lowest most sub class we can call all the parent class constructor and once the super most class constructor get called this call chaining will stop and this calling contractors in calling is known as constructor chaining.

Q21) Explain Java?

Answer: Java is basically an object-oriented high-level programming language. Moreover, Java is class-based, multithreaded, secure high performing portable language. The main feature of Java is that it can run on all the java supporting platforms.

Q22) Who developed Java and when?

Answer: Java was developed by James Gosling and his team ( Mike Sheridan, and Patrick Naughton). They initiated the work in the year 1991. In the year 1996, sun microsystems released java 1.0 publically.

Q23) Explain some of the key features of Java.

Answer: Some of the key features of java are:-

  •  PORTABLE:– Java language supports WORA approach. WORA stands for “write once and read anywhere”. Therefore, Java can run on the platforms which support Java without any recompilation. Secondly, .java can be converted to .class (bytecode) that can run on all the machines.
  • ROBUST:- Java makes use of robust memory management. Some of the features which make this language robust are Exception handling, Automatic garbage collection etc.
  • HIGH PERFORMER:– Java language is very much faster in comparison to the other interpreted languages. This is because bytecode in java is very close to the native code.
  • MULTITHREADED:- In Java by defining the multiple threads programmers can write Java programs which includes many varied tasks. Java is preferred over other languages for web applications and multimedia because the feature of multithreading is all the threads share the same memory area. Each thread does not occupy individual memory. As a result, less memory is occupied.
  • SECURED:- The concept of exception handling and bytecode in Java makes it a secure language. Moreover, java does not make use of explicit pointers. So, Java is a secure language.

Q24) Explain about Java Virtual Machine.

Answer: Java virtual machine ensures that the java code runs on all the platforms independently and faster. In other words, it is a medium which the computer compatible for running a java code. Initially, JVM compiles the Java code to convert it to the byte code. This byte code is very close to the native code as well as machine-independent.

Q25) What is the role of JIT compiler

Answer: Just in time compiler compiles the bytecodes with the similar functionality at a time. As a result, the compilation time reduces.

Q26) List down the access specifiers used in Java

Answer: Access specifiers are basically the keywords. These keywords are used to define the access scope of the variable or class or method. In Java, there are four access specifiers:-

  • Public:- The variable, classes and methods that are defined “Public” can be accessed by any method or class.
  • Protected:- Protected specifier can be accessed within the same class or by the class with the same package or by the sub-class of this particular class
  • Default:- Default specifiers are accessible only inside the same package and not from any outside package. By default Variables, methods, and all classes are of default scope
  • Private:- variables, methods and the private class which are defined as private can only be accessed within the class.

Q27) Share the output of the program.

class Test
public static void main (String args[])
 System.out.println(50 + 10 + "Javacode");
System.out.println("Javacode" + 30 + 20);

The answer to the above code will be:-

Q28) Define class and explain with an example.

Answer: A class is a behavioral template or a blueprint which are used to create objects. A class is written only once and one class can have any number of objects. A class includes Variables and methods.
Variables:- The state of the class is defined by variables
Methods:- Methods capture the business logic which we want to use.

Public class Subtraction  // declaration of Class
Int x= 10; // declaration of variable
Int  y= 5;
Public void subtraction () { // declaration of method
Int a= x-y;

Q29) Explain about infinite Loop in Java.

Answer: An infinite loop as the name suggests is the loop which runs infinitely. The loop break when a broken logic is defined in the statement blocks.

Q30) How do you declare the infinite loop?

Answer: The infinite loop is declared through the below-mentioned code:-

for (;;)
// Statements to execute
// Add any loop breaking logic

This is easy but an important Java interview question which can be asked in the interview.

Q31) Compare between double and float variables.


Float Double
Takes 4 bytes in Memory Takes 8 bytes in memory
Single precision Double Precision

Q32) Does the main() method return the data in Java?

Answer: No, the main function cannot return any kind of data. The main function is declared by the return type void.

Q33) When do you declare the main method of the class private in java?

Answer: In order to correctly run the application, the main method must always be public static. If by mistake the main method is declared private then the program will not execute. It will give a run time error.

Q34) Mention at least 3 differences between ArrayList and array in Java.


Array List Array
Declaration of the size of the array is not required. It changes dynamically Size of the array must be declared at the time of declaration only
No need to specify the index The index needs to be specified to put the object in the array
It is parameterized in Java 5.0 It is not parameterized

Q35) Choose the range of the byte data type in Java.

  1. 128 to 127
  2. 32768 to 32767
  3. 126 to 127
  4. None of the above

Answer:  The range of byte data type is -128 to 127.

Q36) Compare between array and vector in Java.


Array Vector
Can hold data of the same type Can hold data of different types
Static in nature Dynamic in nature

Q37) List the difference between queue and stack.

Queue Stack
Based on FIFO(first in first out) principle Based on LIFO(Last in first out) principle

Q38) Does java support multiple inheritances?

Answer: No, Java does not support multiple inheritances. A class can be derived from one class only. It cannot be derived from the multiple classes.

Q39) What is the role of goto keyword in Java?

Answer: Goto keyword is not used in the java language.

Q40) What is a ternary operator in java?

Answer: The ternary operator is basically used to determine based on a boolean evaluation which value has to be assigned to a variable. The ternary operator is also called a conditional operator and is denoted by ?.

Q41) How do you create an object for a class?

Answer: We create an object for a class in 3 steps:-

  • First, the object is declared
  • Then it is instantiated
  • Finally, it is initialised

Q42) When is parsInt() method used in Java?

Answer: ParseInt() method is used in java to get the primitive data type of the particular string.

Q43) What do you mean by the set interface in Java?

Answer: The set interface is the collection of elements which does not include duplicate elements. It includes only those methods which are inherited from the collection. Moreover, the set interface also adds a specific restriction that it doesn’t allow duplicate elements.

Q44) List the name of the components of javax.swing which are not lightweight.

Answer: There are 4 components of javax.swing which are not lightweight:-

  • JApplet
  • JDialog
  • JFrame
  • JWindow

Q45) Explain about Collections API in java.

Answer: Collections API is actually a set of classes & interfaces which support the operations on the collection of objects.

Selenium Interview Questions  and Answers

Selenium is considered to the open-source tool that is widely used for automating the test scenarios that are performed on various web browsers. It is initially developed Thoughtworks in the year 2004 by a person named Jason Huggins. For authoring functional tests, Selenium affords a playback tool, and there is no need to study a test scripting language. The major topics covered by the Selenium tutorial are WebDriver Installation, Selenium vs QTP, Selenium IDE, Selenium WebDriver, Selenium IDE Locating Strategies, WebDriver vs RC, Selenium Tool Suits, WebDriver Features and so on.

Q1) Define Selenium

Answers: A vigorous test automation group which helps to systemize web applications is called Selenium. Multiple browsers, platforms, and programming languages are supported by Selenium.

Q2) Provide the various selenium forms

Answers: Selenium Grid, Selenium IDE, Selenium WebDriver and Selenium RC are the different selenium forms.

Q3) Provide the list of few selenium limitations

Answers: Testing web service and desktop limitations are not allowed in Selenium. Programming language knowledge is mandatory for generating healthy scripts in Selenium WebDriver. To perform tasks like framework testing, reading from external files, and logging, users must rely on a few external tools and libraries.

Q4) List out the testing types which are supported by Selenium WebDriver

Answers: Regression testing and functional testing are the two types of testing supported by Selenium WebDriver

Q5) How do you inspect the web elements features to utilize them in various locators?

Answers: Developer tools or Firebug can help in inspecting the precise web elements.

Q6) Which is the latest version of Selenium?

Answers: The latest version of Selenium is 3.0.

Q7) List out the four parameters that need to be passed in Selenium

Answers: Browser, Host, URL and Port Number are the fours (4) parameters that have to be passed in Selenium.

Q8) Mention the JUnit’s annotation that is linked with Selenium

Answers: @After public void method(), @Before public void method() and @Test public void method() are the three (3) JUnit’s annotation that is linked with Selenium.

Q9) In a web driver, how to handle colors?

Answers: The function getCssValue(arg0) to handle colors as we can send a string ‘color’ as an argument.

Q10) How to switch back from a frame in Selenium?

Answers: Make use of the method default content() to switch back from a frame in Selenium.

Q11) Provide the various locator types

Answers: Below are the various types of locators:

Q12) Explain selenese and its types

Answers: A set of commands in Selenium that are used to run the test are called Selenese. Accessors, Actions, and Assertions are three (3) types of selenese.

Q13) How can you view the Selenium IDE?

Answers: We can view the Selenium IDE either as a side-bar or pop-up window.

Q14) In Selenium IDE, how will you insert a start point?

Answers: There are two (2) ways to insert a start point in Selenium IDE. One is, select ‘Set / Clear Start Point’ by doing a right-click on the command in Selenium IDE. The next option is in Selenium, select the command by pressing the key “S” on the keyboard.

Q15) Explain regular expressions

Answers: A regular expression is said to be a superior text string which is utilized for defining a search design. The keyword “regexp:” is used along with the IDE regular expression in Selenium.

Q16) Do you know how to regain the message in an alert box?

Answers: Make use of storeAlert command which will help to retrieve the alert pop-up message and stored in a variable.

Q17) While using Selenium RC, what are all the expected technical limitations?

Answers: In addition to “same-origin policy” restriction from js, carrying out anything from the outside browser is also restricted in Selenium.

Q18) List the element locators that are used to find elements on web pages?

Answers: Below are the element locators to find the elements on the webpage:

  • CSS locators
  • Html name
  • X-path locators
  • Html id

Q19) What is the format is shown by the source view for the script in Selenium?

Answers: XML format is used to show for the scripts in selenium.

Q20) How do you insert a start point with Selenium?

Answers: The start point can be inserted by pressing the S key and select the required command in selenium. Also, right-click on selenium and click “Set / Clear Start Point”.

Q21) Mention the best way to run a selenium server other than a default port?

Answers: Running a Selenium server on java-jar selenium-server.jar-port is an effective way.

Q22) What is the command used to key in the values to text boxes?

Answers: sendkeys() is the command used to enter the values in text boxes.

Q23) List the ways to customize the TestNG report?

Answers: Using IReporter Interface and Using ITestListener Interface are the two ways to customize the TestNG report.

Q24) What is the Java API that is required to get PDF reports?

Answers: Java API IText is needed to generate PDF reports.

Q25) List the types of TestNG listeners?

Answers: Following are the TestNG listeners

  • ISuiteListener
  • IHookable
  • IAnnotationTransformer
  • ITestListener
  • IInvokedMethodListener
  • IExecutionListener
  • IConfigurable
  • IInvokedMethodListener2
  • IAnnotationTransformer2

Q26) Define the accessor?

Answers: Accessors are majorly used for loading the target values into a variable.
Example: storeText, storeTitle.

Q27) Explain the command storeTextPresent?

Answers: This command is widely used to check if the text/value is existing in the current window.

Q28) Explain the command store elementPresent?

Answers: This command is widely used to check if the element is existing in the current window.

Q29) Mention the available views in Selenium?

Answers: Selenium can be viewed in the side-bar or as an automatic pop-up window.

Q30) Is building a test suite possible with selenium?

Answers: Yes, building an entire test suite using selenium is possible.

Q31) Mention the available verification points with selenium?

Answers: Check for a certain element, Check for the title of a page, and Check for specific text are the verification points available with Selenium.

Q32) What command is used to verify if the element is visible in WebDrive?

Answers: Displayed () is the syntax used to verify the element existence.

Q33) What is the syntax used for form submission in selenium?

Answers: submit() is the command used for submitting a form in selenium.

Q34) List the command used to check any checkbox

Answers: click() syntax is used to check the checkboxes in selenium.

Q35) Define close() command in selenium

Answers: driver.close() syntax is used to close the existing browser that has a focus.

Q36) Define quit() command in selenium

Answers: driver.quit() syntax is used to close all existing browsers.

Q37) Mention the syntax used for moving to a different frame in selenium

Answers: driver.switchTo() is used for switching between the frames.

Q38) List one commands to refresh a browser in selenium

Answers: driver.navigate().refresh() is the command that can be used to refresh a browser.

Q39) Mention the command used to get rid of the cookies using selenium

Answers: deleteAllCookies() is the syntax used to delete all the existing cookies in selenium.

Q40) List the command that can be used to get all the required attributes in selenium

Answers: getAttribute(“{attributeName}”) is the syntax used to get various attributes available.

Q41) Define implicit wait

Answers: it is defined as the wait that can wait for a limited period of time when positioning an element before the NoSuchElementException command is thrown to the user.

Q42) Define explicit wait in selenium?

Answers: Explicit wait is only applicable for the elements of the web until the specific conditions are met.

Q43) List a few expected conditions that are used in explicit wait?

Answers: Below are the conditions used in explicit:

Q44) Mention some of the keyboard operations in selenium?

Answers: .releaseKey, .sendKeys, and .pressKey are the keyboard operations in Selenium.

Q45) List some of the mouse actions that are done using selenium?

Answers: Below are the mouse actions performed using Selenium

Q46) Mention the command used to fetch the page source?

Answers: driver.getPageSource(); is the command used for fetching the page source in selenium.

Q47) Mention the command used to fetch the page title?

Answers: driver.getTitle(); is the command used for fetching the page source in selenium.

Q48) Define hub?

Answers: A hub is defined as a central point that is used to regulate text executions on other machines.

Q49) Which syntax is used to pass the parameters for testing the scripts in selenium with the use of testNG?

Answers: @Parameter annotation and also the ‘parameter’ tag is used for passing the parameters using testing.