Posts

Showing posts with the label Automation Interview Questions

Automation Interview Logical Question & Answer || Automation Testing Interview Question & Answer || Automation Testing Interview Question

1. write program for reverse string? string str = "Bhaumik" String res = " "; int count = str.length(); for(int i = count-1; i>=0;i--) { res = res + charAt(i); } syso(res) 2. Get unique string from String?    String str = "Bhaumik"    Map<Charater,Integer> m = new HashMap<Charater,Integer>();    Char st[] = str.tocharArray();    for(chr c : st){  if(m.containskey(c))  { m.put(c, m.get(c)+1);  }  else{ m.put(c,1);  }  syso(m);   3. Find Max number from arraylist?    int a[] = new int[] {100,200,2,4,5,1,0,101,222};    int max = a[0];    for(int i =0; i<a.length; i++)  { if(a[i]>max) { max=a[i]; }  }  System.out.println(max);   4. Remove special Charater from string?    String s1 = "@#$%This is new String #$%^";  String s = s1.replaceALL("[^A-Z0-9a-z ]","");  syso(s)

Scenario Base Automation Interview Questions || Automation Interview Questions

1. Different Exception in Automation - TimeOut Exception - Did not perform action on time - No Such Element Exception - Element not found, Element not located Implecit wait - Element not visible Exception - Element not visible on page Explict wait - Stale Element Exception  - webelements not located reload page or Attchement of DOM 2 . What is exception Test in Selenium - When you write @Test method if you are expecting some exception which will throw while executing the script then you have to write this exception in  @Test(expectedException=NoSuchElementException.class) 3. Which Files can be use as data source for different framework? - Excel, xml, text, csv, json, property 4. How to send alt, shift, control key in selenium WebDrivers? - By using Action class we can perform action Keys.control + "a" keys.control + "c" Keys.ALT, Keys.SHIFT, Keys.CONTROL 5. How to switch to new window (new tab) which opens up after you click on A link ? - Handle by u...