Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 3

1]which java relted things you have used in ur selenium coding?

inheritance
overloading

colections what u use?


set-->cookie,getWindowHandles
list-->links
diff:list allow duplicate while set does not allow duplicates.

use of final keyword:


can be used with class,var,method
class:we cnnot create child class
method:we cant overridr
varibale: we cant reassign its value

finally:in exception handling


it is block.resource deallocation

finalize:coe from objclass to clear the obj(unused obj)

webdriver(interface) driver(ref var)=new(keyword) chromedriver(constructor),

explicit wait:
visiblity of elements

DOM(document object model)-->XPATH is basically works


on dom structure

from root node


if any change is there in webpage the xpath gets broken

javascript executer:
scrolling webpage

how to handle multiple windows; sritchtowindow


getWindowhandle--> returns the session id of the currrent window
returns string type
getWindowHandles-->returs ids of all the open windows
returns set of string

dropdown:
how many number of options how to find
in select class we can use get options as list
then use size in list to get it
Select s = new Select(driver.findElement(By.xpath("//select[@name=’selType’]")));
// getting the list of options in the dropdown with getOptions()
List <WebElement> op = s.getOptions();
int size = op.size();

mouse: action is a interface


acition class

TestNg: difference
hard--if a condition fails the next line will not get executed
soft--it will execute even if a condtion fails
then we will have result of failure as we give the assertAll

in testng if we give like


prioity=0
priority=1
priority=0
here for 0 it will execute based in alphabetic order
then 1 will execute

100 tc some fail some passed


second you want to execute oly the failed tcs how will
you do that?
test-output folder
we will have failed test cases in xml file using that
we can execute only failed test cases

Hybrid:
combination data driven
using utility
module wise writting

how freq u run automation:


when the build is stable
regression
new build
before moving to prod to ensure all working fine

how many bugs you found automation?


7
how u report to dev:jira
how many tc u automated?
50

benifuts of maven proj:


build creation and testing
dependency jar
plugin,confirgration(testng thorugh xml)

jenkins:

Data driven testing:


1 testcase executed with multiple test data
read for excel etc
keyword driven:
by identifying elemnts in the webage,accessing them
and peform or tasks
TDD-Test Driven Development approach
ocuses on creating unit test cases before developing the actual code

Encapsulation:
abstract class:

xpath has only id: test_123(123 dyamic---contains)


element not interactable--how to handle stale element
why getting dom refreshed,dom changes ele coming from prev dom we inetracting
with new dom --usefluent wait

if you have only one parameter id that is dynamic how to write xpath?
selenium grid

autolabs:
1]parallel testing in selenium:
selenium grid we can use
2]testNg advantages
3]sequence of annotations in testng
4]before test and before method difference
5]100 textcase beofre method will u do ur setup method?is it right approach--yes it
is right approach
because it is always good to keep our test cases independent of each other.If we
do before @test
we make it dependent when one test case fails the other dependent test cases will
be skipped.
6]best practices to write independent test cases?for best execution percentage
-->it should not be dependent
7]TDD vs BDD
8]who all will participate in BDD(po,qa,dev) and TDD
9]who is writting the feature file?
10]on what basis feature file is written?
11]what is diff between when,given,then,and---keywords
12]scenario
13]background and hooks term BDD
14]parallel execution of 1 feature file in testNG file
15]can u run parallel test in cucumber?
16]wwindow-->link -->getWindowHnadles,swithvTo--35.15

mthis overloading:
login(otp,userid pass,mobile nu)
payment method(card,upi,gpay)
search method(diif filters name,color,proce))

absrtact clas and interface--when to use

You might also like