GlobalLogic
10+ Shaans Cargo Interview Questions and Answers
Q1. selenium: what are selenium components, what are the different locators in selenium, what is selenium web driver, write a xpath for a given element on a web page
Selenium components include Selenium IDE, Selenium RC, Selenium WebDriver. Different locators are ID, Name, Class Name, Tag Name, Link Text, Partial Link Text, CSS Selector and XPath. Selenium WebDriver is a tool used to automate web application testing. XPath is a language used to navigate through XML documents and web pages.
Selenium components: Selenium IDE, Selenium RC, Selenium WebDriver
Different locators: ID, Name, Class Name, Tag Name, Link Text, Partial Link Text, CSS ...read more
Q2. How do you convert json object to string and vice versa?
To convert JSON object to string, use JSON.stringify(). To convert string to JSON object, use JSON.parse().
JSON.stringify() method converts a JavaScript object or value to a JSON string.
JSON.parse() method parses a JSON string and returns a JavaScript object.
Example: var obj = {name: 'John', age: 30}; var jsonString = JSON.stringify(obj); var jsonObj = JSON.parse(jsonString);
Make sure the JSON string is valid, else it will throw an error.
Q3. Robot Framework : what are standard libraries in Robot Framework? Explain robot framework architechture, what is setup and teardown, write a sample login script using robot framework?
Answering questions related to Robot Framework and its standard libraries, architecture, setup and teardown, and a sample login script.
Standard libraries in Robot Framework include BuiltIn, Collections, DateTime, Dialogs, OperatingSystem, Process, Screenshot, String, Telnet, and XML.
Robot Framework architecture consists of test cases, test suites, and keywords.
Setup and teardown are pre and post conditions for test cases.
Sample login script using Robot Framework:
Open Browser ...read more
Q4. Write a program to find the elements of a list that have least difference in python? input = [3,9,50,15,99,7,98,65] output = [98,99]
Program to find elements of a list with least difference in Python
Sort the list
Find the minimum difference between adjacent elements
Return the elements with minimum difference
Q5. what are the locators in selenium? what is the difference between driver.quit and drive.close? What is implicit wait and explicit wait ?
Answers to common Selenium interview questions.
Locators in Selenium are used to identify web elements on a web page. Examples include ID, class name, name, tag name, link text, and partial link text.
driver.quit() closes the entire browser window and ends the WebDriver session, while driver.close() only closes the current window or tab.
Implicit wait is a global wait that applies to all web elements and waits for a specified amount of time before throwing an exception if the el...read more
Q6. What are lists and its functions?
Lists are a collection of ordered and changeable elements. They have various functions to manipulate the data.
Lists are created using square brackets []
They can contain any data type such as strings, integers, or even other lists
Functions include append(), insert(), remove(), pop(), sort(), and reverse()
Example: my_list = ['apple', 'banana', 'cherry']
Example: my_list.append('orange') adds 'orange' to the end of the list
Q7. what is cypress ,difference between cypress and selenium
Cypress is a JavaScript-based end-to-end testing framework. It differs from Selenium in terms of architecture, ease of use, and speed.
Cypress is a JavaScript-based testing framework for web applications.
It provides a simple and intuitive API for writing tests.
Cypress runs directly in the browser and can access everything on the page.
Unlike Selenium, Cypress does not use WebDriver and has a different architecture.
Cypress offers automatic waiting for elements and actions, makin...read more
Q8. cypress folder structure and and its assertions
Cypress folder structure and its assertions
Cypress follows a specific folder structure for organizing test files
The 'fixtures' folder contains static data used in tests
The 'integration' folder contains the actual test files
The 'plugins' folder contains custom plugins and tasks
The 'support' folder contains reusable functions and commands
Cypress provides various assertions for validating test results
Common assertions include 'should', 'expect', and 'assert'
Assertions can be use...read more
Q9. what is assertions
Assertions are statements that verify the expected behavior of a software application during testing.
Assertions are used to validate whether a certain condition is true or false.
They help in identifying bugs and ensuring the correctness of the software.
Assertions can be used to check the values of variables, compare expected and actual results, or verify the presence of certain elements.
Examples of assertions include assertEqual, assertTrue, assertFalse, assertNull, assertNot...read more
Q10. Api testing using cypress
Cypress is a powerful tool for API testing, allowing for easy automation and assertion of API endpoints.
Cypress provides a simple and intuitive syntax for writing API tests
It supports making HTTP requests and asserting responses
Cypress allows for easy mocking and stubbing of API calls
It provides detailed logs and error messages for debugging
Cypress integrates well with other testing frameworks and tools
Q11. architecture about cypress
Cypress is a JavaScript-based end-to-end testing framework that runs directly in the browser.
Cypress allows for easy and fast testing of web applications.
It provides a rich set of APIs for interacting with elements and making assertions.
Cypress runs directly in the browser, eliminating the need for Selenium or other external drivers.
It supports modern JavaScript frameworks like React, Angular, and Vue.
Cypress provides real-time reloading and automatic waiting for elements to ...read more
Top Qa Automation Testing Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month