Sunday, August 20, 2017

HCL F2F Interview Questions.




1.Tell me about your self.
2.tell me about your project.
3.what will be your approach if you have to automate signup for 100 profile.
4.Tell me about your framework.
5.what are the integrations availabel in your project.
6.can i searchh any product by product id.
7.If you have qc then why you are using ALM
8.defect life cycle
9.Modules of ur previous project
10.diff between / and //
11.how to handle alert pop up
12.diff b/w assert and verify
13.what are the challanges you have faced in your project.
14.if i click on any product then it will redirect to a new page that display the product image and its attribute how you will verify that not based on your header on your page based on attributes
15.diff flavor of selenium & diff in them
16.have you automate for diff diff browser
17.is there any diff in coding if you are writing code for diff browsers
18.tell me about locators
19.why we are using x path

Selenium/Java Questions CitiusTech



1. What is the difference between Grid and Webdriver API?
2. How would you save a cookie value in Webdriver?
3. How would you locate a button which is present on UI with only Span class? It doesn't have an Id,class or anything.
4. Write a code for explicit wait.
5. How will you invoke Firefox browser?
6. What will be the logic behind fetching a data from data provider and inserting it on UI?
7. How will you specify a data provider under Test annotation?
8. Write a program for reverse string.
9. How does method overriding differs from abstraction and inheritance?
10. Can we override main method? Explain the reason.
11. Explain OOPS concepts?
12. Why do we go for POM? What does it refer to?
13. What is the difference between String and String buffer?
14. What is the difference between String buffer and String builder?
15. What is mutable and immutable?
16. How will you configure Ant,Jenkins?
17. Why do we go for Apache API? Basic purpose behind it.
18. Script writing for a login page which is being used at your organisation.
19. Why do we use generics for getting a list of multiple elements?
20. In what way method overriding in polymorphism and inheritance differs with each other?
21. What is the flow of fetching data from excel using Apache POI?
22. Why do we provide '\\' in java while fetching a path of excel.
23. What are the types of exception which will appear finding elements?
24. What is an object array and why do we use it for data-provider.
25. What is the syntax of defining a data-provider class under @Test?
26. Difference between method overriding and overloading.
27. What is Static and Dynamic Polymorphism?
28. What is Static and Non static in Java?
29. Explain OOPS concepts.

Infosys Asked 3 Years Selenium Testing Position



From Java
---------------
1.What is the Difference between final,finally,finalize

2.what is the difference between Call by value and call by reference

3.How to find out the length of the string without using length function


4.How to find out the part of the string from a string

5.difference between throw & throws


6.What is binding(Early and Late binding)

He give Programes
1.Reverse a number
2.1,2,3,4,5,65,76,5,,4,33,4,34,232,3,2323,

find the biggest number among these
simple string programs.

what is exception types of exception
-----------------------------------------
From manual
----------------------------------------
what is the testcase technique

why we write test case.

bug life cycle

what are the different status of bug

what is the different between functional and smoke

what is STLC.

he gives a application & tell to write the scenario
some manual testing concepts
-----------------------------
From Selenium
-----------------------------
1.Explain ur roles and responsibilities

2.Explain Automation Life Cycle

3.Which Framework U have Used?

4.Explain Ur Framework

5.What are the things u stored in PageFactory ? Why ?

6.Explain TestNG

7.What are the annotations U have Used ?

8.What is Constructor ?

9.Where u have used constructor in Selenium?

10.Which model u have followed in ur company?

11.How do you handle dynamics objects in a webpage?

12.How do you handle untrusted SSL certificate in Webdriver?

13.What is the difference between beforemethod and beforetest?

14.How to verify a particular image and its size in a webpage?(Webpage has got many images out of which you have select particular one)

15.What is the use of DesiredCapabilities in Selenium WebDriver?

16.How do you know the Remote m/c details. Like OS, browsers details.

17.How do you find out active elements?

Interview Questions asked in ValueLabs,CTS,CSC,UHG.

java
-----
What is class and object?
How to call a function of a class without creating a object?
what is Encpasulation,Abstraction?
What is Abstarct class and Interface?Difference b/w them?
what is polymorphism?
Diff b/w list and set?
what is HashMap?
Diff b/w Array and ArrayList?
How to synchronize collection classes?
How to reverse a string?write code
How to Verify palandrom or not?
what is inheritance?
what is overloading and overriding?
Diff b/w normal method and static method?
Diff b/w String and StringBuffer?
why main() is declared as static?
Diff b/w while and do-while?
what is the use of sleep()?
what is Exception?How to handle Exceptions?
How to find dupicate characters from a given string?

IMP concepts in JAVA for interview-->1)String class and its functions2)Collections

Selenium WebDriver
------------------
HOw to read data from Excel?asked to write sample code
Diff b/w selenium rc and webdriver?
which selenium webdriver version you have used in your project?
what is JavascriptExecuter?
HOw to find Invisible elements in a web page?write sample code
How to verify whether a element is present or not in a web page?write code
How will you generate reports in your project?
HOw to generate logs?
what is POM?
HOw to handle dynamically changing ids/elements?
Diff b/w Assert and Verify?
What is xpath and its types?
what are the methods you have seen in xpath?
HOw to generate dynamic xpath?
What are the types of waits in selenium webdriver?
How to handle multiple windows/frames(switching b/w windows,frames)?
what is Automation?why Automation?when to start Automation?how to identify which scenarios to be automated?
How to select value in DropDown list?what are the different ways to select?
what is Select class?when to use?
what is Alert interface?when to use?
what are click(),sendKeys(),findElements() methods?
HOw to read Properties file in selenium?
How to upload files in selenium?
How to handle popup windows?
HOw to handle Mouse hover?
HOw to handle duplicate elements?
What is Actions class and its methods?
HOw to perform Drag and Drop operation?
How to capture screenshots in webdriver?write code
Tell some Exceptions you have faced in selenium?How you handle them?
What is Framework and its advantages?
what is Hybrid framework,Data Driven framework,KeyBoard Driven framework?
what is Selenium Grid?
What is TestNG?and its annotations?
what is @dataProvider annotation?what is the return type of this annotation?
Explain your project framework architecture?
what are the difficulties/challenges you have faced while Automation?
Have integrated selenium with other tools like maven,jenkins,etc..?
Have you conducted cross browser testing using testNG?
How to conduct cross browser testing Parallely in testNg?
What is parameterization in testNg?
Have you involved in your project framework development?
How to handle internationalisation using selenium webdriver?
what is SDLC and STLC?
what are the defects you have found while automating your application?
what is Defect life cycle?
Your Roles in project?
write a code to open application in firefox browser?
write a code to read data from excel?
what is maven?
Which framework you have used in your project?

IMP concepts in selenium webdriver for interview-->1)xpaths 2)your project framework 3)testNG

Selenium/Java questions at L&T 1st Oct 2016



1. What is the difference between list and set?
2. How will you switch to other window?
3. What is the return type of driver.findelement/driver.getwindowhandles()?
4. What is the difference between Private and Protected?
5. How will you achieve dynamic polymorphism?
6. What is inheritance and encapsulation?
7. Can you override static methods?
8. Can main method be overloaded?
9. What is Singleton?
10. What is collections in Java?
11. What is nested class?
12. How will you call a protected method in a nested class?
13. In a web page, how will you ensure that page has been loaded completely?
14. What is the difference between build and perform method in Actions Class?
15. What are different annotations in TestNG?
16. What is the difference between before method and before test?
17. How will you display the character count in a string "Steve Jobs" by ignoring space on between?
18. What is a constructor and when will you use this and super in a constructor?
19. If you want to call a constructor from parent class, what will you do?
20. How will you run your tests using Data Driven Framework?
21. What are static variables and methods?
22. How will you handle Alerts in selenium?
23. How will you handle a file upload window using Selenium?
24. Can I define one class into another class?
25. What are different types of modifiers present in Java?
26. How will you make a build using Jenkins?
27. How will you install ReportNG in your project?
28. How will you control data using XML?
29. How will you display a value of a particular cell in a web table?
30. How will you handle dynamic elements using XPath?
31. What is POM?

Selenium Real Time Interview Questions



1) What are the Selenium Tools, and Testing framework that you are using in your Current Project?

We are using,

• Selenium WebDriver for Creating Test Cases.

• Java Programming for Enhancing Test cases.

• TestNG Testing Framework for Grouping Test cases, executing Test batches and generating Test reports.

Also used,

• Firebug and Firepath for inspecting elements.

• IE Browser driver, Chrome browser driver for Cross Browser testing.

2) What is your Project Operating environment?

Microsoft Windows 8.1

3) What is your project domain and Application Environment?

Our project is Banking Application,

Our AUT (Application Under Test) developed using Java Technology and Database is Oracle.

4) What are the major challenges in Functional Test Automation?

• Object Identification.

• Debugging Issues. etc...

5) What are the difficulties that you faced in Object identification?

Some Elements (Objects) not recognized properly using Selenium WebDriver Element locators.

6) How you conducted Data driven Testing in your project?

We conducted Data driven Testing using external Excel file as Resource, we added some third party excel jar files to Java Project in Eclipse.

7) How you conducted Batch Testing in your project?

We conducted Batch Testing using TestNG Testing Framework.

8) How you conducted Cross browser testing in your project?

Using Mozilla Firefox, IE and Google Chrome browsers(Downloaded IE and Google Chrome Browser drivers). we executed Test cases.

9) How you handled duplicate Elements in your project?

Using index property of Elements we handled duplicate objects.

10) How many Test cases you wrote for your Project/Module?

I prepared around 120 Test cases in my Module.

11) How many defects you detected and give one example?

I detected nearly 20 Defects in which 5 defects are Severe defects.

12) How you selected Test cases for Regression Testing?

We selected Test cases for Regression Testing based on Defect effected Test cases and from defect dependent Test cases.

13) How you organized your Test Automation resources?

14) Did you use any build management tool in your project?

We used Maven build management tool in our project.

15) How you handled errors in your Test scripts?

We handled errors in our Test Scripts using Java Error handling features.

16) Did you create any reusable components?

Yes, We created some reusable components in our project for Login Functionality, Registration Functionality etc...

17) Did you find any Test Scenarios that not to be automated in your project using Selenium?

Yes, We find some Some Test Scenarios in our Current project,

 Functionalities that require more user interaction,

Functionalities that require Dynamic test data submission.

18) How to execute multiple Java programs at a time?

We execute multiple Java programs using XML file in TestNG framework.

19) How to conduct parallel Test execution?

Usually We conduct Parallel Test Execution using Selenium Grid, but no parallel test execution in my Current project.

20) What Defect management / Test management tool you used in you project?

We are using Jira Test Management tool in our project with Selenium.

21) How you communicated with development team to resolve the issues.

We communicate Development team via Our Test Manager.

22) Did you involve in Selenium Test environment Setup?

Yes, I involved in Selenium Environment Setup in my Current Project.

As per my project, we selected Java, Selenium WebDriver and TestNG Framework and Maven.

> We Downloaded Eclipse IDE  and Extracted.

> Downloaded Java Software and Installed.

> Environment Variable path setup.

> Downloaded Selenium WebDriver Java language bindings(jar files) and added to Java Project in Eclipse.

> Downloaded and Installed TestNG Framework from Eclipse IDE.

> Installed Maven build management tool.
--------------------

Hcl expierence interview questions



1. In your company  what type of jenkins server you are using ?
2.How you will handle  a dropdown 10th frame 10 element which is notvisable?
3.Explain the selenium grid process in your project, How you will run you test scripts on other systems. (company oriented)
4.How you will create framework to your project(company oriented)?

Synechron Interview questions


1 Roles and responsibilities
2 Explanation framework
3 what is static variables
4 what is instance block,class level method,method level
5 difference between class n interface.
6 can at try be with multiple catch or viseversa
7 can finally be many or one for every or multiple try catch block.
8 what is string .
9 mutable n immutable
10 what is type of synchronisation.
11 what is type of exception.
12 what is way of comparison of string.
13 there are many links on web page how will you get your of link.
14 What is href.
15 on a page there is a link on click of link you will get other link on other page on click on other link one more link will get open so on that page you want to enter string how will u do that.
16 SQL ... select max salary from a table.

Capgemini interview questions. hyderabad


1. Roles & Responsebilities.
2. framework explanation.
3. What is interface
4. What is inheritance
5. How u achieve  multiple inheritance in Java.
6. Write program to reverse a number.
7. How you select an option in drop down.
8. What is iframe.write code to click on a button which is in a nested iframe.
9. How to handle file downloading & uploading
10. Difference  between  implicit  wait and explicit Wait.
11.total number of rows in a Webtable.
12. How to select  a check box present in a webtable.
13. What r webdriver exceptions
14. How to read data from an excelfile
15. How many testing environments u have in ur organization.
16. Write an XPath to get all the links.
17. How to read the text on a tooltip.
18. Check whether  an element is displayed  or not.
19. There are 3 classes A B C. How to acess the methods of B and C in Class A.

Infostrech 1 round interview questions.


1 What is verbose.
2 What is thread count.
3 How do you handle exception.
4 Common method in two interface implement one class which interface method will class implement.
5 Flow of try , catch,finally.
6 What is finally .
7 How many value will a method returns.
8 what is abstract.
9 Difference between implicit wait and explicit wait.
10 Which design patterns have you used to develop framework.
11 What is maven.
12 Have you used list what is it.
13 Difference between list and set in collection.
14 Try block have exit method and catch block has Exception and finally block will return int .what is the flow of execution.
15 Have you ever came across conflict in code how you resolved it.
16 can a constructor be private.
17 what are types of assert.
18 difference between assert and verify.
19 Assert is a abstract method or a static method.
20 What is access modifier can construct have .

Capgemini mumbai telephonic interview questions for 2yrs experience....



1)what are the different locators you have used in webdriver?
2)can you give example of absolute and relative xpaths.
3)what is difference b/w close and quit in webdriver?
4)webdriver is a class or interface?
5)can you give class name which implemented webdriver interface.
6)scenario: if der is a element which contains id attribute, dat id is splited by two parts by '_' (underscore), first part is constant
            and second part is changing. how do you find dat element using id.
7)suppose if element is hidden, how do get text of dat element?
8)difference b/w implicit and explicit waits.
9)how you deal dropdowns.
10)scenario: der is a link on webpage, click on dat link a window will open and now dat opened window contains 3 different frames and
             you have to do operation on different elements in 3 frames and come back to window. how will you do dis.
11)what is timeout in grid?
12)what is browsertimeout in grid?
13)what do you mean by max instance and max session?
14)tel different annotations provided by TestNG.
15)suppose i want check particular exception in TestNG, how will you do?
16)what is soft and hard assertion?
17)what are different access modifiers and explain each.
18)can you define multiple public classes in single java file.is it possible?
19)class name and java file name should be same?
20)what you mean by final,finally,finalize?
21)what do you mean by for each loop?
22)can we remove any element by using for each loop?
23)diff b/w arraylist and vector?
24)how do you write custom class which is immutable?
25)create one custom class using interface inside in it, dat custom class should responsible for doing for each operation.
   which type of interface will you use to create such a custom class.

selenium interview questions for experienced.

1) How do we switch from one page to another in POM?
2) How to parse XML files in your project?
3) Where are you using Jenkins in your project?.So how do you use all your scripts locally? Where do you store all the reports?  
4) How many test scripts you execute on a daily basis?
5) We have more no. of LOC’s which is of repeated code, what you’ll do?
6) Criteria for which and we choose Automation?
7) I want to take one test case report, from all the run test cases.How can I get it without using TestNG?
8) what is the diff between waterfall and agile model?
9) What are the diff controllers you automated in a web page?
10) Situation: for supposing, you tested a test case, and the result is passed in your environment, so you delivered it to the client.Later it was a blunder.When you check, it is an error in your environment also.Your test lead, PM and the client pointed you for the error.How you’ll protect yourself from it?
11) How select a random record from a record of 1000 values?
12) Suppose you have 3000 test data, can you automate using Excel sheet.How ? are there any drawbacks?
13) where we use Hashmap in real time?
14) Steps to check the JDBC connection ?
15) Can you give an example on Regression Testing ?
16) I have a location in local system like x=C:// ,y=//selenium//image.png can we concatenate these two variables x,y in order to form the location path.
17) In selenium project,  hierarchy like interface followed abstract class, followed by a class.Cant we write Directly interface followed by class.
18) What is keyword driven.Can we use for loop in keyword driven ?
19) How to connect with database ?
20) What if we don’t have locators information.Is there any method to automate.
21) Basic plugins used in Jenkins, how you managing reporting system in Jenkins
22) Scenario :in a page, we have Apply button 3 times, one on top,2nd in the middle,3rd in below.I want to click middle Apply button. How?
23) In how many ways i can take keyboard inputs?
24) Can we have main method Constructor in interface
25) why we use Fibonacci series in Agile methodology
26) what is the command line to run Testing batch file in command prompt
27) code to locate the dynamic elements ?
28) which command retrieves the text of an HTML element ?
29 ) How do you manage the source code?
30) What is a Maven?From where the updated jar files are downloaded. Do we have to do manual intervention or it updated automatically without manual intervention ?
31) Major challenges faced in Automation.
32) Why Webdriver is an interface what if it were a class.What could be the problem if web driver were a class?
33) When do we use a hash map in real time?Please explain with real time example?
34) What are the challenges you have faced in Selenium?
35) How one would do Dynamic Content Testing and AJAX Content Testing using Selenium WebDriver?
36) Any one tell me how do we do internationalisation in Selenium?
37) Explain me exact automation process(selenium) in company .if there is 3 object repository are available in the project, and there are 3 scripts present.how could a script pick up its related object repository?
38) Write a code to find the occurrence of sub string in string.
: String str = “helloslkhellodjladfjhello”;
String findStr = “hello”;
39) how to run only skipped test cases in Selenium web driver?
40) suppose 400 test cases running, after 150 test cases execution system got crashed or network was gone, or application crashed, so now how to run test cases only which are not executed?
41) suppose in selenium grid total 4 nodes are connected, test execution started in grid parallelly, in middle one of nodes network disconnected, what happens in selenium grid.suppose in selenium grid you are doing parallel testing in 3 browsers, how many reports will your framework generate and how do you segregate each browser execution results?
42) There are 300 test cases, I want to execute test cases in some custom order, how to change the order of execution without doing changes in testng.XML and in code(.class files). If we can do, tell the logic and if we cannot do, justify with reason?
43) Is default polling frequency 250 ms applies to implicit wait or explicit wait (I mean here by WebDriverWait) or for both type of wait)?
44) If implicit wait is 10 sec and element is found in 5 sec, will driver move to execute next statement after 5 sec or it will wait for complete 10 sec then move?
45) If an explicit wait is 10 sec and the condition is met in 5 sec, will driver move to execute next statement after 5 sec or it will wait for complete 10 sec then move?

HCL F2F Interview Questions.




1.Tell me about your self.
2.tell me about your project.
3.what will be your approach if you have to automate signup for 100 profile.
4.Tell me about your framework.
5.what are the integrations availabel in your project.
6.can i searchh any product by product id.
7.If you have qc then why you are using ALM
8.defect life cycle
9.Modules of ur previous project
10.diff between / and //
11.how to handle alert pop up
12.diff b/w assert and verify
13.what are the challanges you have faced in your project.
14.if i click on any product then it will redirect to a new page that display the product image and its attribute how you will verify that not based on your header on your page based on attributes
15.diff flavor of selenium & diff in them
16.have you automate for diff diff browser
17.is there any diff in coding if you are writing code for diff browsers
18.tell me about locators
19.why we are using x path

Synechron interview questions Ahmedabad


1.) what is need of automation
2.) things to be taken care while creating automation framework
3.) different types of framework
4.) when to start automation
5.) is automation possible in agile
6.) how to do cross browser testing
7.) different types of Wait
8.) Java code to find string length without in built function
9.) find repeated character in a string aabbccdd
10.) is try with multiple catch allowed and finally block
11.) Reflection API
12.) Why main method is static
13.) Run time polymorphism
14.) Static variable
15.) overloaded method
16.) what is difference between selenium 3:0 and lower version

Interview questions oracle location hyderabad. march 2017



1> write a program for clicking element which present in frame.
2> write a program for clicking element which present in child window.
3> write a program which should validate calender table.
   scenario: suppose march calender table consists of all dates 1 to 31
        check whether empty boxes are exists in table or not.
4> what is testng and how it differ from junit? what tests can be done with testng?
5> write syntax of opening browser in selenium.
    me: webdriver driver= new firefoxdriver();
    interviewer: what happens in dis case firefoxdriver driver= new firefoxdriver(); ?
    why we have two syntaxes if der purpose is same?
    when do we use firefoxdriver and webdriver in above syntax?
    tell me some differences b/w both syntaxes.
6> write syntax for firefox in selenium 3.0.
   why selenium people have changed syntax and what is difference b/w syntaxes of selenium 2.53 and
   selenium 3.0?
7> what is dynamic polymorphism in java? explain with example.
8> what is difference b/w interface and abstract class?
9> why is the purpose of abstract class when we achieve abstraction through interface?
10> why constructor cannot be inherited in java?
11> Is constructor by default final if yes/no give reason ?
12> what is the package is imported for reading/writing files in java?
13> what is robot class and sikuli and autoit?
14> what is try catch?
15> what is final,finally,finalize?
16> will finally block always executes?
17> what happens if i put system out in catch block?
18> what are oops concepts?
19> if exception got in try what will executes catch or finally?
20> There is one statement when we put dat statement in try, finally block wont execute what is dat
    statement? what happens when we write dat statement and where the control will go?
21> Have u ever created user defined exception? what is syntax?
22> difference b/w throw and throws?
23> how do you run tests parallelly?
24> how do pass test data in testng and which annotation will be used?
25> what type of frame work using in ur project explain it.
26> without using sendkeys how will you type text in text box? is der any method or class in java?
27> what is the differece b/w list and set.
28> what is linkedlist?
29> what is hashmap? what will happen if i insert duplicate in hashmap, which will be overriden key or value?
30> how will u do debugg in eclipse?
31> how do you log bug when test case fails?
32> what is difference b/w severity and priority?
33> In which scenarios we get nullpointer exception?
34> where you find difficulties in automation while writing scripts?
35> out of 1000 testcases only 1 testcase failed, how will u run dat test case?
36> There is String with 100 characters in it, characters may in any order and by default dat string is not
    palindrome, how will you say string can palindrome or not ?
37> what is agile? explain process in agile.
38> suppose in sprint 10 requirements are der, do we start testing after completeing devlopment
    of all 10 requirements or how?
39> how to you click on particular date number in calander month table?
    scenario : suppose today i will click on 20 date in month table, tommorw 21 like so.. it
               should be dynamic.
    write program for it.
40> how do you pass parameter into xpath?
41> suppose u have ten thousand test case files are there. one element got changed in new release
    same element was used in 700 test case files.. now say how do you do changes for dat element in those files.
42> Tel oops concept with real time examples... like any software terms you can use.
43> If your script got failed and same script works fine with next run,
     what will you do? will you log bug or what kind of analysis u do?
44> box contains 50 red socks and 50 white socks, what is the propability of getting right pair of same color
    in how many picks? tel worst case and best case of probability.
45> if box contains 1000 different colors and total 10,000 socks now say propablity of getting right pair of
    same color in how many picks? tel worst case and best case of probability.
46> using eight 8's make 1000 use any operators like +,-,%,/......
47> what is different b/w agile and other methodologies?

Cognizant selenium interview questions hyderabad location march 2017


1> how to switch from frame to main window tel syntax.
2> what is difference between pom and pagefactory?
3> where does automation fit into testing flow?
4> what are challenges that you faced while automating testcases?
5> scenario: there is a submit button in page it has id property.
             by using id we got element not found expection, how will you
             handle dis situation. what might be the problem in dis case.
6> scenario: if submit button contain in one of 3 frames in page, how will you handle this.
7> if element is loaded by taking much time how to handle dis situation in selenium.
8> what is the problem with thread.sleep in code?
9> what is the concept of selenium grid?
10> when we execute testcases in grid where results will be stored in node or hub?
11> difference b/w quit and close.
12> scenario: manually u opened a firefox browser window with gmail login, now with selenium you opened
              a firefox browser window with facebook login. what happens when we use quit method?
             will it closes all windows including gmail one?
13> what all annotations used in testng in ur project?
14> if we wanna do datadriven with testng what are all annotations required?
15> is it possible to pass test data through testng.xml file, if yes how?
16> how to run specific kind of testcases using testng?
17> how to prioritize test cases in testng?
18> what are all interfaces available in selenium?
19> actions is class or interface?
20> why we using testng? what are benefits we get using testng? cant we execute testcases in order
    without using testng?
21> explain polymorphism in java.
22> scenario: der are two methods in same class with same name with different arguments and
              different access modifers. like
              public void m1(int a){}
              private void m1(string b){}
              is it overloading or not?
23>what are types of inheritance in java?
24> is multiple inheritance is possible in java? tel reasons.
25> is multilevl inheritance is possible in java? give reason.
26> scenario: der are 10 pages in same window, an image is present in any page out of ten pages in same window.
              how will you validate this scenario?
27> how to check image is loaded correctly or not in page?
28> scenario: same image is present in ten pages how do you check same image present on each
              page or not. how will you validate this scenario?
29> what is the purpose of sikuli?
30> is it possible to compare two images with sikuli?
31> how do you compare image in some path of drive and image on page?
32> Tel syntax for sikuli code.
33> how to handle file upload window in selenium?
34> scenario: There are ten drop downs in page with same name.. in one of drop downs i have option called cts employee
    how select dat particular option in out of ten drop downs in page? what is ur approach?
35> write a code for db connection.
36> explain ur project structure and flow.
37> how do u handle exception handling in selenium.
38> explain run time and compile time polymorphiism.
39> write a code for multiple handling windows.
40> scenario: der is grid table 1st column contains links with same names in all rows.
              2nd column contains different name for those links present in 1st column.
              now based on 2nd column click on required link in 1st column how will you do it.
41> how do you handle synchronization in selenium.
42> how generate user defined exceptions, write syntax.
43> difference between throw and throws keyword.
44> scenario: <table
               <tr
                <td
                <td
              now based on 2nd td tag find tr tag element. write xpath for it.
45> what is auto it? how will you exexute auto it code in selenium?
46> how to handle elements like ajax?
47> how to handle elements which has no attribute inside tag?
48> what is proctractor?
49> what are loctors present in proctractor?
50> explain oops concepts.
51> diff b/w sikuli and auto it.

Try Catch Finally (which return will be execute when there is no exception in try block?)

Question by : Mahesh
Solution by :Anand



In below scenario which return will be execute when there is  no exception in try block?
try{ 
  //no exception in try block
return "test1"; 
  } 
  catch(Exception e){
return "test12";

  finally{
return "test3";
output=?

/*
*  Whenever there is a return in try the control / priority passes on to finally.. But again in finally there is
     a  return so try is never.. Executed..

*   Simple thing that we need to try is replace return in finally with system. Out. Println.. then try will also            be  printed

*  as given in the example when there is return in finally that is the last thing and control will not go back
   to any caller

*  1> if der is return in finally , den finally return only executes and try return will be skipped.
     2>if der is no return in finally , den try return will always be executed.






Thursday, August 3, 2017