Client Interview questions

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Client Interview questions

Pankaj Singh

I want to share some important selenium questions :Please try to resolve this and get back to me. I was asked these questions in client interview.

1)("\n")- its role in PHP   ------

2)echo "text "   echo text---Which one is correct

3)two text boxes are there we have to locate them by using their labels not by locators

lable1-usernameof textbox1
lable2-password of textbox2

4)//html//kfn//ndfjn//-is it correct?
/html/knfk/fk/-is it correct?

5)In which case relative xpath also fails.

6)Most imporatnt if both text box has same name wid same properties so how can we differentiate wid them  without indexing

7)Best locator??

8)Giving correct xpath then also it fails ?? why??

9)Difficult Scenario:(Dont Know)

a)                                      book my room

         Best option               book my room
 
                                         book my room

want to chose book my room button in front of best option

without using indexing ,and main thing is all these three values changes its place
sometimes best option came at first sometimes last.(Dynamic scenario)

I don't know the answer of some of the questions. plz answer the above questions
Reply | Threaded
Open this post in threaded view
|

Re: Client Interview questions

vishalmiet
Let me try to answer,

1. "\n" is called as New Line character in PHP. The data following it will print in a new line. '\n' will print \n as it is.

2. Both are correct, echo "text" will print text and echo text will print value contained in text (if any).

4. In what context you are asking this question?
Reply | Threaded
Open this post in threaded view
|

Re: Client Interview questions

Poovarasan M
In reply to this post by Pankaj Singh
Let me try this below questions:

4)//html//kfn//ndfjn//-is it correct?
/html/knfk/fk/-is it correct? - Ans: This one is correct.

5)In which case relative xpath also fails.
Ans: using "//" instead of "./"

6)Most imporatnt if both text box has same name wid same properties so how can we differentiate wid them  without indexing
Ans: xpath

7)Best locator??
Ans: xpath