- Which of these WebDriver interface methods is used to open a URL in the browser?
- get
- navigate().to
- Any of the above
- None of the above
Ans: 3 - What is the difference between WebDriver close and quit methods?
- Nothing, these methods are interchangeable.
- close method clears the browser memory and the quit method closes the browser window.
- close method closes the browser but the quit method additionally removes the connection to the server.
- close method closes the main browser window but the quit method closes all the browser windows including popups.
Ans: 4 - When invoked on a web element, what does the submit method do?
- It is used to submit a form and it works on any web element.
- It is used to submit a form but it works only on the web element whose type is “submit”.
- It is the same as the click method.
- There is no submit method for a web element.
Ans: 1 - Which WebDriver method is used to change focus to an alert, a web element or a browser window?
- changeFocus
- switchTo
- goTo
- setFocus
Ans: 2 - What functionality does WebDriver support on browser cookies?
- add and delete an individual cookie
- delete all cookies
- Any of the above
- None of the above
Ans: 3 - What is the scope of an implicit wait?
- All instances of WebDriver
- Current WebDriver instance
- Current expected condition
- Current web element
Ans: 2 - What is Selenium Webdriver?
- It is an API
- A tool for writing automated tests of website
- Successor of Selenium RC
- All of the above
Ans: 4 - Which browsers does Webdriver support?
- Chrome
- Internet Explorer
- Firefox Opera
- All of the above
- What are the advantages of webdriver?
- Unlike RC you don’t have to start a server in webdriver
- Tabs and pops are more or less the same. RC can also handle and Webdriver can also handle.
- Simulate key press events of keyboard.
- Better features for Ajax testing.
- All of the above
Ans: 5 - How to create instance of firefox driver using webdriver?
driver = new FirefoxDriver();
driver = FirefoxDriver();
driver = new Firefox;
- None of the above
Ans: 1
Ans: 5Keyword Driven Framework
- What are the external files which will be required to develop Keyword driven framwork?
- TestNG
- JXL/POI
- JUnit
- TestNG plugin for eclipse
- All of the above
Ans: 5 - What is the purpose of TestNG component in Keyword driven framework?
- in order to data drive our test
- in order to read excel file
- requires to verify conditions
- None of the above
Ans: 1 - JXL/POI jar files are required to _____.
- requires to verify conditions
- in order to use Microsoft Excel files as data source
- in order to data drive our test
- All of the above
Ans: 2 - How to create an instance of WebDriver?
WebDriver driver = FirefoxDriver();
WebDriver = new FirefoxDriver();
WebDriver driver = CreateObject FirefoxDriver();
WebDriver driver = new FirefoxDriver();
Ans: 4 - How to navigate to the ITeLearn home page?
Webdriver.get("http://www.itelearn.com");
driver.navigate("http://www.itelearn.com");
driver.get("http://www.itelearn.com");
- None of the above
Ans: 3 - How to find an element by Name?
WebElement searchBox = driver.findElement(By.name("someElement"));
WebElement searchBox = findElement(By.name("someElement"));
WebElement searchBox = driver.findElement(name("someElement"));
- All of the above
Ans: 1 - Display the title of the page ____.
System.out.println("Title: " + driver.Title());
System.out.println("Title: " + driver.getTitle());
System.out.println("Title: " + getTitle());
- None of the above
Ans: 2 - Does Selenium supports regular expression?
- Yes
- No
Ans: 1 - _____ statement matches links such as ‘Over $75′, ‘Over $85′ etc
selenium.click("link=^Over \\$[0-9]+$");
selenium.click("link=regexpi:^Over \\$+$");
selenium.click("link=regexpi:Over \\$[0-9]+$");
selenium.click("link=regexpi:^Over \\$[0-9]+$");
Ans: 4 - ____ statement clicks on the first image that has an id attribute that starts with ‘cat_prod_image’.
selenium.click("//img[(@id,'cat_prod_image')]");
selenium.click("[starts-with(@id,'cat_prod_image')]");
selenium.click("//img[starts-with(@id,'cat_prod_image')]");
None of the above
Ans: 3 - “____ is the combination of both keyboard driven and data driven frameworks”
- Linear Framework
- Hybrid Framework
- Modular Framework
- Keyword Driven Framework
Ans: 2 - In Which case we can design Hybrid Framework
- Rich Application functionality
- Data sensitive testing
- Regression testing
- All of the above
Ans: 4 - What are the advantages of Hybrid framework?
- Flexible
- Increases accuracy
- Highest ROI
- All of the above
Ans: 4 - In Hybrid framework, data can accessed through database, excel file, xml etc.
- TRUE
- FALSE
Ans: 1 - Hybrid framework can be implemented for any application.
- TRUE
- FALSE
Ans: 1 - What are the frameworks available other than DDF, KDF and Hybrid?
- Linear Framework
- Modular Framework
- Structured Framework
- All of the above
Ans: 4
Hybrid Framework using Webdriver
Selenium Database Testing
- What are the advantages of Database testing?
- Both functional and DB testing can be performed at the same time while running the automation script.
- Validate data displaying on a webpage and compare the same with database.
- Connect to SQL, MySQL servers etc.
- All of the above
Ans: 4 - mysql coonection jar file is required to connect with database
- TRUE
- FALSE
Ans: 1 - How to create instance of mysql to connect with database?
Object myDC = Class.forName(com.mysql.jdbc.Driver);
Object myDC = Class.forName(com.mysql.jdbc.Driver);
Object myDC = Class.forName("com.mysql.jdbc.Driver").newInstance();
- None of the above
Ans: 3 - How to create database connection?
mycon = DriverManager.getConnection(myUName, myPWD)mySt=mycon.createStatement();
mycon = DriverManager.getConnection(mySQLDB, myUName, myPWD
mySt=mycon.createStatement(); mycon=getConnection(mySQLDB, myUName, myPWD)
mySt=mycon.createStatement();
- None of the above
Ans: 2 - How to pass any sql query after database connection?
PreparedStatement preparedStatement = conn.prepareStatement("select * from YourTableName");
preparedStatement = conn.prepareStatement("select * from YourTableName");
PreparedStatement preparedStatement = prepareStatement("select * from YourTableName");
- All of the above
Ans: 1 - What is Recordset in terms of Database?
- Recordset also works as a View in Database
- Recordset is a virtual table which stores data
- It is used to open database connection
- Recordset object is used to hold a set of records from a database table. A Recordset object consist of records and columns
Ans: 4 - How to create record set?
set rs=CreateObject(""ADODB.recordset"")rs.Open ""Select * from Customers"", oConnection
PreparedStatement preparedStatement = conn.prepareStatement(""select * from YourTableName"");resultSet = preparedStatement.executeQuery();
PreparedStatement preparedStatement = conn.prepareStatement(""select * from YourTableName""); preparedStatement.executeQuery();
- None of the above
Ans: 2 - ___ statement will print the EmpID from the record set. Assume EmpID is Integer.
System.out.print(resultset.getInt("EmpID");
System.out.print(resultset.getString("EmpID")
System.out.print(resultset.getInt("Name")
- All of the above
Ans: 1 - How to go on next data in record set?
resultset.First();
resultset.Last();
resultset.MoveNext();
resultset.next();
Ans: 4 - ___statement will close the database connection?
mycon.close;
mycon.close()
mycon.close();
- None of the above
Ans: 3
Thanks for sharing Post
ReplyDeleteThanks for posting it.
ReplyDeleteIt is amazing sharing for us.