#WebElement method
Explore tagged Tumblr posts
Text
Beer Events 9.23
Events
Buffalo Bill Cody led a hunting party of celebrities & wealthy people; supplies included 16 wagons of Bass Ale (1871)
John Gund Brewing destroyed by fire (Lacrosse, Wisconsin; 1897)
James Poole died (1905)
Brewery workers at the Birrerie Meridionali in Napoli defended it against German troops (Italy; 1943)
Edmund Webel patented a No-Return Container for Beer (1969)
Grindmaster Crathco Systems patented a Frozen Beer Product, Method and Apparatus (2003)
Big Rock Brewery patented a Cover Resembling a Beverage Container (2010)
Peter Darby patented a Hop Plant Named “Sumner” (2014)
Breweries Opened
Old Baldy Brewing (California; 1994)
Ellicottville Brewing (New York; 1995)
Pony Express Brewing (Kansas; 1995)
Boxcar Brew Works at Doolittle Station (Pennsylvania; 2017)
0 notes
Text
Mastering Web Testing: Unlocking the Potential of Selenium WebElement
In the world of web automation, web elements are the building blocks of every web page. They are the buttons we click, the fields we fill, and the text we read. Mastering the art of interacting with these elements is the key to unlocking the power of automation and conquering repetitive web tasks. So, get ready to dive deep into the exciting world of web elements and their methods! For those eager to excel in Selenium, exploring a Selenium course in Pune could be invaluable. Enrolling in such a program presents a unique chance to gain comprehensive knowledge and hands-on skills crucial for mastering Selenium.
What Is a WebElement?
A WebElement in Selenium is anything that is present on the web page, such as a text box, button, or link. It represents an HTML element and is used by Selenium WebDriver to interact with the web page.
Types of WebElements
WebElements in Selenium can be divided into different types, namely:
1. Text Box: An input field where you can enter text.
2. Button: A clickable element that performs an action.
3. Link: A clickable element that navigates to another page.
4. Radio Button: A type of button that can be selected or deselected.
5. Checkbox: A type of button that can be selected or deselected.
Operations Performed on Web Element
These are the operations that are performed on the WebElement:
1. sendKeys(): Allows the user to type content automatically into an editable field.
2. click(): Used to click on the web element present on the web page.
3. isDisplayed(): Verifies if an element is present and displayed.
4. isEnabled(): Verifies if an element is enabled.
5. isSelected(): Verifies if an element is selected.
6. getLocation(): Returns the location of the element.
7. getSize(): Returns the size of the element.
8. clear(): Clears the value of an editable field. Enrolling in a top-rated Selenium Online Training can unleash the full power of Selenium, offering individuals a deeper understanding of its intricacies.
Locating Web Element
In order to identify WebElements accurately and precisely, Selenium makes use of different types of locators, namely:
1. ID: Uses the unique ID of the element.
2. Name: Uses the name of the element.
3. Class: Uses the class name of the element.
4. XPath: Uses the XPath expression to locate the element.
5. Tag Name: Uses the tag name of the element.
6. Link Text: Uses the text of the link to locate the element.
7. CSS Selectors: Uses CSS selectors to locate the element.
Conclusion
In this blog, we have covered the basics of WebElements in Selenium, including their types, operations, and locators. By mastering the art of interacting with these elements, you can create robust automation scripts that contribute to delivering high-quality software products.
0 notes
Text
Mastering the Interview: Top Interview Questions of Selenium
In today's fast-paced tech environment, mastering Selenium is crucial for anyone aiming to excel in software testing and quality assurance. Whether you’re a novice or an experienced professional, preparing for the interview can be daunting. Here, we will explore the most common and essential interview questions of Selenium to help you ace your next interview.
Why Selenium?
Before diving into the interview questions of Selenium, it’s important to understand why Selenium is a popular choice among testers. Selenium is an open-source framework that allows testers to automate web browsers. It supports multiple languages such as Java, Python, C#, and more, making it versatile and accessible. Its ability to integrate with various tools like JUnit, TestNG, and others further enhances its appeal.
Basic Interview Questions of Selenium
Let's start with some fundamental interview questions of Selenium that you should be prepared to answer:
What is Selenium and its components?
Selenium is a suite of tools for automating web browsers. Its main components are:
Selenium IDE: Integrated Development Environment for building test scripts.
Selenium WebDriver: A tool for writing test scripts that interact with web applications.
Selenium Grid: Allows running tests on different machines and browsers simultaneously.
What are the limitations of Selenium?
Selenium supports only web-based applications, not desktop applications.
It cannot automate captcha and OTP.
Limited support for mobile applications.
What is the difference between Selenium 2.0 and Selenium 3.0?
Selenium 2.0 integrates WebDriver and Selenium RC.
Selenium 3.0 is the latest version that deprecates Selenium RC and focuses on WebDriver.
Intermediate Interview Questions of Selenium
Moving on to intermediate-level interview questions of Selenium, these will test your practical knowledge and understanding of the tool:
How do you handle frames in Selenium WebDriver?
Frames can be handled using the switchTo().frame() method. You can switch to a frame using its index, name, or WebElement.
Explain the use of WebDriverWait in Selenium.
WebDriverWait is used to apply explicit waits, allowing the driver to wait for a certain condition to occur before proceeding.
What is Page Object Model (POM)?
POM is a design pattern that creates an object repository for web elements. It enhances test maintenance and reduces code duplication.
Advanced Interview Questions of Selenium
For those aiming to demonstrate advanced expertise, these interview questions of Selenium will be crucial:
How do you handle dynamic web elements in Selenium?
Dynamic elements can be handled using strategies like XPath or CSS selectors that don’t rely on fixed attributes.
How do you perform database testing using Selenium?
While Selenium itself doesn't support database testing directly, you can use JDBC to connect to a database, execute queries, and validate the results within your Selenium scripts.
Explain the concept of Selenium Grid and its benefits.
Selenium Grid allows parallel test execution on multiple machines and browsers, significantly reducing the time required for test execution.
Tips for Acing Your Selenium Interview
Apart from familiarizing yourself with the common interview questions of Selenium, consider these tips:
Practical Experience: Hands-on experience is invaluable. Work on real projects or contribute to open-source projects to hone your skills.
Stay Updated: Selenium is continuously evolving. Stay updated with the latest features and best practices.
Mock Interviews: Conduct mock interviews to build confidence and improve your communication skills.
Conclusion
Preparation is key to success in any interview. By understanding and practicing these interview questions of Selenium, you'll be well-equipped to tackle your next interview with confidence. Remember, each question is an opportunity to showcase not just your knowledge, but also your problem-solving abilities and practical experience. Good luck!
0 notes
Text
What are top questions asked during a Selenium Interview?
Top Questions Asked During a Selenium Interview
Introduction
Selenium is a widely used open-source tool for automating web browsers. It is crucial in the field of software testing and quality assurance, allowing testers to automate repetitive tasks and perform regression testing efficiently. As Selenium continues to gain popularity, job opportunities for Selenium professionals have increased as well. If you are preparing for a Selenium interview, it's essential to be well-prepared for the questions that might come your way. In this article, we'll discuss the top questions frequently asked during a Selenium interview, along with tips on how to answer them.
What is Selenium, and why is it used for automation testing?
This is often the first question in a Selenium interview. To answer it effectively, provide a concise definition of Selenium as an open-source tool for automating web applications, explaining that it allows testers to perform repetitive tasks and regression testing. Emphasize its importance in improving testing efficiency and ensuring software quality.
What are the different components of Selenium?
Selenium consists of several components, including:
a) Selenium IDE: An integrated development environment for creating and executing Selenium test scripts.
b) Selenium WebDriver: A programming interface for creating and running test cases.
c) Selenium Grid: A tool for parallel test execution across different browsers and operating systems.
Explain the roles of each component and how they work together to automate web testing.
What programming languages are supported by Selenium WebDriver?
Selenium WebDriver supports multiple programming languages, including Java, C#, Python, Ruby, and JavaScript. Highlight your proficiency in one or more of these languages and discuss the advantages of using a language that suits your project's requirements.
Can you explain the difference between findElement and findElements methods in Selenium?
The findElement method in Selenium returns the first matching element on a web page, while the findElements method returns a list of all matching elements. Emphasize the importance of using findElements when dealing with multiple elements and handling lists of web elements.
What are locators in Selenium, and how do you choose the right one?
Locators are used to identify web elements on a web page. Common locators include ID, Name, XPath, CSS Selector, and Class Name. Explain that choosing the right locator depends on the specific scenario, and you should consider factors such as uniqueness, stability, and performance when selecting a locator strategy.
What is XPath, and how is it used in Selenium?
XPath (XML Path Language) is a language used for navigating through XML documents, which can be applied to HTML documents in Selenium. Explain the two types of XPath: Absolute and Relative. Emphasize the importance of using Relative XPath for robust and maintainable test scripts.
What is a WebElement in Selenium?
A WebElement in Selenium represents an HTML element on a web page. It provides methods and properties to interact with and manipulate web elements. Discuss how to locate and interact with WebElement objects in Selenium using various methods like click(), sendKeys(), getText(), etc.
What is a WebDriverWait, and why is it important?
A WebDriverWait in Selenium is used to wait for a specific condition to be met before performing actions on web elements. It is crucial to handle synchronization issues, ensuring that the test script doesn't run faster than the web page loads. Explain how WebDriverWait works and how to use it effectively in your test scripts.
How do you handle dynamic elements in Selenium?
Dynamic elements are elements on a web page that change their properties or attributes after page load. Describe how you can handle dynamic elements using techniques like Implicit Wait, Explicit Wait, and handling StaleElementReferenceException.
What is a Page Object Model (POM), and why is it important in Selenium?
The Page Object Model is a design pattern that promotes the creation of a separate class for each web page in your application. Explain the benefits of POM, such as code reusability, maintainability, and readability. Provide an example of how to implement POM in a Selenium project.
How do you handle pop-up windows and alerts in Selenium?
Pop-up windows and alerts are common in web applications. Explain how to switch between windows using WebDriver's window handles and how to interact with alerts using Alert class methods like accept(), dismiss(), and getText().
What is TestNG, and how is it used in Selenium?
TestNG is a testing framework for Java that facilitates test automation and reporting. Describe how TestNG can be used to manage test suites, execute tests in a specific order, and generate detailed test reports. Mention its annotations like @Test, @BeforeMethod, and @AfterMethod.
What are the advantages of using Selenium Grid?
Selenium Grid allows you to run tests in parallel across multiple browsers and platforms. Discuss the benefits of reduced test execution time, improved test coverage, and cost savings when using Selenium Grid in a distributed test environment.
How do you handle file uploads in Selenium?
File uploads are a common scenario in web applications. Explain how to use the sendKeys() method to upload files and interact with file input elements.
What are some common challenges in Selenium automation, and how do you overcome them?
Discuss common challenges like dynamic web elements, handling iframes, handling CAPTCHA, and handling browser-specific issues. Provide practical solutions and best practices to overcome these challenges.
Conclusion
Preparing for a Selenium interview can be a daunting task, but being well-prepared with answers to these commonly asked questions can significantly boost your chances of success. Remember to emphasize your practical experience, problem-solving skills, and ability to adapt to different testing scenarios during the interview. With the right knowledge and confidence, you can excel in your Selenium interview and advance your career in the field of automation testing.
0 notes
Text
How to identify Broken Links from Selenium WebDriver
It is easy to check for broken links in Selenium. Using the HTML Anchor (a>) tag, hyperlinks are implemented on web pages. Finding each anchor tag on a web page, obtaining the accompanying URLs, and then iterating through the links to see whether any of them are broken is all that the script needs to perform. Check out an excellent online Selenium certification course to learn more about Selenium and Broken Links. Here are some reasons to check Broken links in Selenium, albeit before we go into the steps for doing so.
Why Check for Broken Links in Selenium?
Free Downloadable: Selenium is open-source testing software that is available for free download. It is widely used all around the world for this straightforward reason. Selenium makes finding broken links and other testing-related problems simple.
Multi-Browser WebDrivers Are Available: Selenium includes WebvDrivers for multiple browsers. Every browser has a WebDriver available. Google Chrome or Safari could be the browser in question. Therefore, visitors can test a certain website using any operating system. It also enables actions across multiple browsers. Therefore, it would be prudent to use Selenium to check for broken links.
Usability of Multiple Programming Languages: There are numerous programming languages available for creating Selenium scripts. Depending on their preference, each user may utilise either Python or Java programming languages. Additionally, it offers the ability to use additional programming languages, such as Ruby. It becomes a simple chore for the developer to write the script in their chosen specialist language.
High Speed: The performance & speed of selenium are widely known. Selenium is renowned for its speed, much like any other testing tool. Any piece of code can be compiled and run in a matter of seconds. Additionally, integrating scripts with WebDrivers is beneficial. Selenium is used for broken link detection for this reason.
High Integrity: Some specialised IDEs, like Eclipse, have strong integration with Selenium. The Eclipse IDE and Selenium may be integrated with ease. This makes it easier to write scripts in a better way. Additionally, it aids in minimising typographical errors and script-related issues. Due to all of these factors, selenium is frequently used to identify broken links on websites.
Here are the steps to identify broken links in Selenium Webdriver:
Step 1: Give the precise WebDriver location where the.exe file is placed first. For the location, use the setProperty() function. Additionally, mention the WebDriver type. The sample that follows makes use of Chrome Driver.
Step 2: The second step is to build a WebDriver object. The object in this context will be the ChromeDriver since we are using it.
Step 3: Provide the website link for the page that will be tested. Here, the link to the Google Homepage will be utilised. The get() method must be used to open the link in the Chrome Driver.
Step 4: Assemble all of the Google Homepage connections. Consider one List for it. The WebElements can only be stored in the list as links. To determine the correct connection to the webpage, the tagName is used.
Step 5: The size of the list will be printed in order to display the entire number of links. This will make it easier to comprehend all of the links on the webpage.
Step 6: Therefore, we must locate each and every link there. Use the getAttribute method to achieve this. Additionally, the URL there needs to be verified.
Step 7: Subsequently, we must establish a secure connection using the link. To check every URL there, we’ll use an HTTP connection request. It will provide the response code back to the program after verifying each and every link.
Step 8: At this point, we must examine the answer code. It will be a broken link if the response code is equal to or higher than 400. In other situations, they’re all dependable linkages. The status of each link on the webpage must therefore be printed.
Step 9: Finally, a notice marking the program’s conclusion has been printed. This will make it easier to judge whether the program was closed successfully. Last but not least, we need to use the quit() method to close the active Chrome window.
Conclusion
Website development and testing must include the detection of broken links using Selenium. Testers can rapidly and accurately discover broken connections by employing the technique outlined in this article. The user experience would be badly harmed if broken links were to make it through the production stage, so they must be thoroughly avoided. Because of this, understanding how to test broken links in Selenium is a crucial skill in a tester’s toolbox. You can enroll in a good online Selenium training course to learn more about Broken Links.
0 notes
Link
0 notes
Text
selenium online training | selenium online courses
Apache Ant with Selenium and flash testing overview
When producing a full software product, numerous third-party APIs, their class route, the cleaning of previous binary executable files, the compilation of our source code, the execution of source code, the development of reports and the deployment code base, etc. You need to take care of everything. It would take an immense amount of time if these tasks are performed one by one manually, and the process will be vulnerable to errors. selenium online training
Apache ANT with Selenium
The meaning of a building tool like Ant comes here.
The benefit of creating an Ant
The application life cycle is generated by Ant, i.e. clean, compile, dependency set, run, report, etc.
The third-party API dependency can be set by Ant, i.e. the classpath of another Jar file is set by the Ant build file.
For End to End Delivery and deployment, a full application is developed.
It is a simple build tool where you can use the XML file to make all configurations and which can be executed from the command line.
As the configuration is separate from the actual application logic, it makes the code safe.
How to install Ant for installation
The following steps are taken to mount Ant in Windows
Step 1)
Download the .zip file from apache-ant-1.9.4-bin.zip to http:/ant.apache.org/bindownload.cgi
Step 2)
Unzip the folder and go to the root of the unzipped folder and copy the path.
Step 3)
Go to Start -> Machine -> right-click here and choose 'Properties' and then click Advanced Device Settings
Step 4)
This opens a new window. Click on the 'Factor Environment...' icon.
Step 5)
Click 'New...' and set the name of the variable as 'ANT HOME' and the value of the variable as the root path to the unzipped folder, and then click OK.
Step 6)
Now select the 'Path' variable from the list, and then click Edit' and add;%ANT HOME%\bin.
You can restart the machine once and now you are ready to use the Ant build tool.
Step 7)
Use the command line to verify your version of Ant:
Ant-Version Build.xml comprehension
The most critical component of the Ant compilation tool is Build.xml. For a Java project, all tasks related to cleaning, setup, compilation, and deployment are specified in this XML format file. If we use the command line or any IDE plugin to execute this XML file, all the instructions written in this file will be executed sequentially.
Inside a sample build.XML, let's understand the code.
The project tag is used to define a project name and an attribute-based on it. The foundation is an application's root directory.
● Property tags are used in the build.xml file as variables to be used in further steps.
<property name="build.dir" value="${basedir}/build"/>
<property name="external.jars" value=".\resources"/>
<property name="ytoperation.dir" value="${external.jars}/YTOperation"/>
<property name="src.dir"value="${basedir}/src"/>
● Goal tags are used as steps to be performed sequentially. The name attribute is the target's name. In a single build.xml, you can have different targets
● The path tag is used to logically bundle all files that are in the commonplace
● Path element tag sets the generic location root path where all files are stored.
● The path convert tag is used to convert all common file paths within the path tag to the classpath format of the framework.
● Used to set classpath for various third party jars in our project files tag
● The echo tag is used on the console to print text.
● The Delete tag cleans data from the designated folder
● A new directory will be created with the mkdir tag
● Used to compile java source code and transfer .class files to a new folder, javac tag
● The jar tag creates a jar file from the .class files
● The manifest tag will set your key execution class to
● The attribute 'depends' used to make one goal depend on another destination
● The java tag executes the main function from the jar created in the target compile portion.
Run Ant using the plugin Eclipse
Go to build.xml file to run Ant from eclipse -> right-click file -> Run as... -> click Build file -> right-click file -> Run as... -> click Build file
EXAMPLE:
We will take a small sample program that will very clearly demonstrate the features of Ant. Our project architecture is going to look like follows.
We have 4 goals here in this example.
Class route setting for external jars,
Clean code, previously complied with,
Compile current Java code for yourself
Run the code, run it
AntClass.class
TestAnt's package;
Java.util.Date import;
AntClass Public Class {
Static public void main(String...s){
System.out.println('HELLO PROGRAM ANT');
System.out.println("DATE IS TODAY->"+ currentDate());;"
}
Public static String currentDate(){
Fresh Date().toString() returns;;
}
}
Construct.xml
How to execute code for TestNG using Ant
Here we will construct a class using the TestNG method and set the Testing classpath in build.xml.
Now we'll create another testng.xml file to run the test method and call this file from the build.xml file.
Step 1)
In the testing kit, we build the "AntClass.class"
TestAnt's package;
Java.util.Date import;
Org.testng.annotations.Test imports;
AntClass Public Class {
The @Test
AntTestNGMethod(){{ Public Void
System.out.println('HELLO PROGRAM ANT');
System.out.println("DATE IS TODAY->"+ currentDate());;"
}
Public static String currentDate(){
Fresh Date().toString() returns;;
}
}
Step 2)
Construct a target for this class to be loaded into Build.xml
Step 3)
Create testng.xml
Testng.xml for checking
rg/testng-1.0.dtd" ">
Step 4)
In Build.xml, create a Target to run this TestNG code.
Step 5)
Absolute Build.xml Complete
Selenium Ant with Web driver:
We have discovered so far that we can place all third-party jars in a specific place in the system using ANT and set their direction for our project. Using this approach, we set all of our project's dependencies in a single place and make it more stable for compilation, execution, and deployment.
Similarly, we can easily discuss selenium dependency in build.xml for our testing projects using selenium, and we don't have to manually add a classpath to our program.
So now you can disregard the conventional way to set classpaths for the project listed below.
EXAMPLE:
The previous example we are going to change is
Step 1)
In the resource folder, set the selenium. jars property to a selenium-related container.
Step 2)
Add the selenium files to the set classpath target
Step 3)
Build.xml Com
Step 4)
Update the previously generated AntClass.java class to a new code.
TestAnt's package;
The java. util.List import;
Org.openqa.selenium.By import
Org.openqa.selenium.WebDriver Import;
Org.openqa.selenium.WebElement Import;
Org.openqa.selenium.firefox.FirefoxDriver importation;
Org.testng.annotations.Test imports;
AntClass Public Class {
The @Test
AntTestNGMethod(){{ Public Void
Driver for WebDriver = new FirefoxDriver();
driver.get;
List listAllCourseLinks = driver.findElements(By.xpath("/div[@class='canvas-middle']/a"));););
For(WebElement WebElement: listAllCourseLinks){ WebElement WebElement: listAllCourseLinks
System.out.println(webElement.getAttribute("href"));
}
}
}
Step 5)
The production after successful execution looks like this.
Flash testing varies from other component components
Flash is a technology that is obsolete. Capturing a flash-object is challenging as it is distinct from HTML. Flash is also an embedded SWF file that is (Small Web Format). Accessing Flash artifacts on a mobile device is often challenging.
Flash creation is more complex than SEO (Search Engine Optimization) HTML page development because flash is not completely readable by the search engine. Advanced technologies such as HTML 5 are, however, applied to solve problems such as performance and security.
Check it with the flash application.
There are two methods of testing Flash Applications:
Manual
By running test cases manually, you can test the Flash object as it is quick and easy to test. You ensure that the flash works properly as planned after bug fixation and provide sign-off.
Automation:
Use any automation method such as Selenium, SoapUI, TestComplete, etc to write a script and execute the script.
Conclusion
The key difference between flash and other elements, as described above is that Flash is embedded in SWF files, while other elements are embedded in HTML files. This is why, compared to flash, HTML is simple to catch. You can learn more about Ant build and flash test in selenium through Selenium online training.
#selenium online training#selenium online courses#selenium online training Hyderabad#selenium online training India#selenium with java online training#best selenium course online#selenium testing course online
2 notes
·
View notes
Text
Web & Browser Automation
Trustworthy browser automation and form-filling is a crucial component in all web automation jobs. watch seeshell filling out forms:
with seeshell form filling and the scripting api you can use it to automate a very varied set of business process automation (bpo) tasks.
seeshell is utilized in complex jobs like
data entry
accounts payable automation
declares processing automation
The seeshell browser has the google chrome core inside (chromium). so it is fully suitable with any modern website. the automation is visual, so there is no new scripting language to learn, you have full programmatic control over the web browser, and even the most complex tasks can be scripted.
Test Web App Functionality
Web browser automation is a process where certain steps in the web browser are performed repetitively to ensure the proper operation of the web application's functionality. it may be obtained qa testing in the development process and for control over information system ease of access and performance during implementation. the second becomes increasingly more important considering that current market trends show that simply having a good service is not enough; the service must also be highly accessible and efficient. with web browser automation tools it is possible to check ease of access and performance by periodically running some deal scenarios for particular services.
Whether youre a software developer or simply running numerous high-performing, application-rich websites, browser automation is swiftly becoming one of the most searched for ways to check different site procedures and codes. as web-based technology develops and becomes more dynamic, the requirement for dynamic testing services grows. while there are lots of ways to test the functionality of your website and applications, browser automation offers a means of carrying out such tasks without the requirement for manual adjustment. ultimately, browser automation tools and techniques save web designers hours in time and labor costs.
Choosing a Test Automation Framework
When it pertains to choosing a test automation framework, you can choose either jest or mocha. however, of the browser automation frameworks we took a look at, you'll need to choose between selenium webdriver and puppeteer. if you desire a quickly, all-in-one solution, cypress.io is the best option.
now that we've presented you with the research, all you require to do is select a choice and get going. when you put the pieces in place and start composing test code, the rest is easy.
Navigating to the Website
Navigating a website to publish files, download files, and enter or extract data is one of the primary uses for an rpa tool. having the ability to transfer to a chosen control, scroll down a page, or figure out which links to click is all part of the process of recording website navigation steps that need to be completed. when recognized, automation steps are participated in a cohesive and constant automation process that is repeatable every day.
iMacros WebBrowser Component for.NET
Available for purchase as a separate product, the imacros webbrowser component for.net makes it easy to rapidly add web automation to your applications. you also get a proven technology that has been tested and debugged for more than ten years and is utilized in over 500,000 setups with royalty free circulation. learn more.
Web Testing Automation Tools
Selenium is the household name when it concerns test automation. it is thought about the industry standard for interface automation testing of web applications. almost 9 out of ten testers are using or have actually ever utilized selenium in their projects, according to survey on test automation challenges.
for developers and testers who have experience and skills in programming and scripting, selenium offers versatility that is hidden in numerous other test automation tools and frameworks. users can write test scripts in many differents languages (such as java, groovy, python, c#, php, ruby, and perl) that work on multiple system environments (windows, mac, linux) and browsers (chrome, firefox, ie, and headless browsers).
automation replaces human work in repetitive, tedious tasks, and reduces the variety of errors. with the best automation tools it is possible to automate browser tasks, web testing, and online data extraction, to fill forms, scrape data, transfer data in between applications, and generate reports.
health centers with data procedures, real estate business with changing listings, and anybody with order entry or the requirement to find and utilize data, all rely on automation tools to perform important functions and stay competitive.
Complete web forms
The chromium browser automation is a simple extension for your browser. it's a full-featured automation tool that assists you prevent repetitive activities.
it can assist you automate simple activities like completing forms while still being complex adequate to support scripting and injection.
some of its major functions:
record: here you can record activities you are currently carrying out on your web browser. record in this sense does not indicate a screen recording. it means that the extension shops all your interactions with the websites.
youtube
Watir (pronounced water), is an open-source (bsd), household of ruby libraries for automating web browsers. it allows you to write tests that are easier to read and keep. it is straightforward and versatile.
watir drives browsers the exact same method people do. it clicks links, completes forms, presses buttons. watir likewise examines results, such as whether anticipated text appears on the page.
Browser Automation Utilizing Selenium
The primary step in web browser automation is to locate the elements online page that we want to interact with, like a button, input, dropdown list, etc.
the selenium representation of such html elements is the webelement. like webdriver the webelement is likewise a java interface. as soon as we acquire a webelement we can perform any operation on them that an end user can do, like clicking, typing, selecting, etc.
If you want to create robust, browser-based regression automation suites
and tests, scale and disperse scripts throughout lots of environments, then you want to use selenium webdriver, a collection of language specific bindings to drive a browser - the way it is indicated to be driven.
1 note
·
View note
Text
Hexagon showcases groundbreaking Surveying, Reality Capture and Geospatial Solutions at Hexagon India Summit
Hexagon India’s much anticipated Technology Summit took place at Novotel, Kolkata today, bringing together visionaries from around the state to discuss and experience the entire Surveying, Reality Capture, Mining and Geospatial product and solutions portfolio of Hexagon. The event showcased how Hexagon is putting data to work to boost efficiency, productivity, quality and safety across industrial, manufacturing, infrastructure, public sector, and mobility applications.
This Hexagon India Summit was inaugurated by: Randhir Kumar, IAS ,Secretary - IT and Electronics Department, WB and Managing Director WEBEL and was attended by: Pramod Kaushik, President Hexagon India; Manoj Sharma, Director Marketing and Sales Excellence; Bhaskar JV, IFS, Chief Conservator of Forest, Working Plan & GIS Circle, Dept. of Environment & Forest, Govt. Of WB; Ashish Kumar Jena, Joint Secretary Govt. of Odisha & Joint Director, Revenue Officers' Training Institute, Odisha; Dr. Bibhas Chandra Barman, Deputy Director (Hydraulics), Irrigation & Waterways Department, Govt. of WB; Dipankar Roy Chowdhury, Deputy Director (Hydrology), Irrigation & Waterways Department, Govt. of WB & many other eminent personalities.
At the summit, the latest technology that helps surveyors be faster and innovate workflows to meet clients’
needs with fewer resources and outstanding quality were presented. The event also witnessed the discovery
of latest technology advancements in Hexagon’s Power Portfolio of GIS, Remote Sensing &
Photogrammetry Software. In India, Hexagon has more than 2100 employees with offices in 14 cities and
two R&D centers (Hyderabad and Pune). In Kolkata, Hexagon India opened its new office in Eco Center,
Salt Lake, Sector 5 on Aug 25 with a state-of-the-art service center.
On this occasion, Pramod Kaushik, President Hexagon India said, “Data is in Hexagon’s DNA. We've
emerged as a leader in sensor solutions over 20 years, enabling the digital capture and positioning of the
physical world. India has always been a focus for Hexagon. It has been consistently growing both in terms
of technology adoption and socio-economic development, and we see a great potential to contribute to this
growth story through our technology in helping and serving the Government, private enterprises, farmers
and the citizens of our country. For decades we have been serving and supporting our customers in defense
and security, law enforcement, mapping organizations, oil and gas, industrial manufacturing, mining, forest
and agriculture, automobile industries, transportation, urban transformation, etc. Hexagon is engaged with
some of the top development projects in India. Be it digitization of Land Management and Records, Dam
monitoring, Railway’s development, making the nation smart by supporting its smart cities project for safer
city for people.”
“Hexagon Geosystem Solutions are the preferred method, for accurate 3D positioning with Leica
SmartTrack+ technology, of many states across India and forms the basis for Digital India. Hexagon
Geosystem’s optic technology has been further enhanced and offers multi-point measurement. This has
added new dimensions to the Reality Capture or Scanning industry. Today’s Smart Cities need cutting-edge
data analytics and visualization solutions that bridge between the geospatial and the operational worlds. By
combining our location-based data and business intelligence, these solutions fuse an infinite amount of data
sources for urban planning, census, transportation, utilities, property appraisal, fire and rescue, citizen
engagement, real estate, public safety, and more.” said Manoj Sharma, Director Marketing and Sales
Excellence.
Read the full article
0 notes
Text
Beer Events 9.23
Events
Buffalo Bill Cody led a hunting party of celebrities & wealthy people; supplies included 16 wagons of Bass Ale (1871)
John Gund Brewing destroyed by fire (Lacrosse, Wisconsin; 1897)
James Poole died (1905)
Brewery workers at the Birrerie Meridionali in Napoli defended it against German troops (Italy; 1943)
Edmund Webel patented a No-Return Container for Beer (1969)
Grindmaster Crathco Systems patented a Frozen Beer Product, Method and Apparatus (2003)
Big Rock Brewery patented a Cover Resembling a Beverage Container (2010)
Peter Darby patented a Hop Plant Named “Sumner” (2014)
Breweries Opened
Old Baldy Brewing (California; 1994)
Ellicottville Brewing (New York; 1995)
Pony Express Brewing (Kansas; 1995)
0 notes
Text
Tricky Selenium questions for automation interviews
Tricky Selenium Questions for Automation Interviews
Introduction
Selenium is one of the most popular automation testing tools for web applications, and its demand in the job market continues to grow. As an aspiring automation tester or an experienced professional looking for a new opportunity, you must be well-prepared for the challenging questions that might come your way during interviews. In this article, we will explore some tricky Selenium questions commonly asked in automation interviews and provide detailed explanations to help you master them.
What is the difference between 'findElement' and 'findElements' in Selenium?
This is a fundamental but frequently asked question.
findElement: This method returns the first matching WebElement on the web page. If no match is found, it throws a NoSuchElementException.
findElements: In contrast, findElements returns a list of matching WebElements. If no elements match the criteria, it returns an empty list, so it won't throw an exception.
Here's a code example:
javaCopy code
WebElement element = driver.findElement(By.id("exampleID")); List<WebElement> elements = driver.findElements(By.className("exampleClass"));
How can you handle dynamic elements in Selenium?
Dynamic elements are those whose attributes (such as IDs, names, or classes) change every time the page loads or during interactions. To handle them, you can use techniques like:
XPath and CSS Selectors: Use relative XPath or CSS selectors that do not depend on specific attribute values.
Explicit Waits: Employ WebDriverWait to wait for the element to become visible or clickable before interacting with it. You can use conditions like ExpectedConditions.visibilityOfElementLocated.
Partial Text Matching: When the attribute value changes partially, you can use XPath or CSS to match a substring of the attribute value.
What is the difference between driver.close() and driver.quit()?
These methods are used to close the browser window or terminate the WebDriver session, but they differ in their behavior:
driver.close(): This method closes the currently focused browser window. If there is only one browser window, it quits the entire WebDriver session.
driver.quit(): It terminates the WebDriver session, closing all open browser windows or tabs associated with it.
Always remember to use driver.quit() to ensure proper resource cleanup.
How do you handle pop-up windows and alerts in Selenium?
Handling pop-ups and alerts is a crucial part of web automation. Selenium provides the Alert interface for dealing with JavaScript alerts, confirms, and prompts. Here's how to use it:
To accept an alert: driver.switchTo().alert().accept();
To dismiss an alert: driver.switchTo().alert().dismiss();
To get the alert text: String alertText = driver.switchTo().alert().getText();
To enter text in a prompt: driver.switchTo().alert().sendKeys("Text");
For handling other types of pop-ups, like new browser windows, you can switch to them using driver.switchTo().window(windowHandle).
Explain the differences between Implicit Wait and Explicit Wait.
Both Implicit Wait and Explicit Wait are used to handle synchronization issues in Selenium, but they differ in their implementation and scope:
Implicit Wait: This wait is set once for the entire WebDriver session and applies to every element search. If an element is not immediately found, Selenium will wait for the specified time before throwing an exception.
Explicit Wait: With Explicit Waits, you can set different wait conditions for specific elements. It allows you to wait for elements with specific expected conditions, such as visibility or clickability, for a defined period. It is more flexible than Implicit Waits.
Example of Explicit Wait:
javaCopy code
WebDriverWait wait = new WebDriverWait(driver, 10); WebElement element = wait.until(ExpectedConditions.elementToBeClickable(By.id("exampleID")));
How do you handle file uploads in Selenium?
Handling file uploads is often required in web automation. You can use the sendKeys method to set the file path in the file input field.
Example:
javaCopy code
WebElement fileInput = driver.findElement(By.id("fileInput")); fileInput.sendKeys("path/to/your/file");
Make sure to provide the absolute or relative path to the file you want to upload.
What is the Page Object Model (POM), and why is it useful in Selenium?
The Page Object Model is a design pattern that helps in maintaining clean and organized automation code by encapsulating the interaction with web pages into reusable Page Objects. Each Page Object represents a web page or a component, and it contains the locators and methods required to interact with that page.
Benefits of POM include:
Improved code readability and maintainability.
Easy updates when the UI changes.
Reusability of Page Objects across different test cases.
How do you handle test data in Selenium?
Managing test data is crucial for automated testing. Common approaches include:
Test Data Files: Storing test data in external files like Excel, CSV, or JSON, and reading them during test execution.
Data Providers: Using TestNG or JUnit Data Providers to pass data directly to test methods.
Test Data Generation: Generating test data programmatically within your test scripts when necessary.
Explain the concept of Selenium Grid.
Selenium Grid is a tool used for parallel execution of Selenium tests across multiple machines and browsers. It allows you to distribute test cases on different nodes, each running its instance of WebDriver. Selenium Grid is helpful for reducing test execution time and increasing test coverage.
You can set up a Selenium Grid hub and connect multiple nodes to it, specifying the desired browser and platform configurations for each node.
How do you handle AJAX calls in Selenium?
Handling asynchronous JavaScript and AJAX calls can be challenging. To ensure synchronization, you can use Explicit Waits to wait for specific elements or conditions to become available or change.
Additionally, you can use JavaScript Executors to execute JavaScript code that interacts with AJAX responses, updating the page state as needed.
Conclusion
Selenium automation interviews often include tricky questions to assess your knowledge and problem-solving skills. Being prepared for these questions is essential to demonstrate your expertise and land that dream job. By mastering the concepts and techniques discussed in this article, you'll be better equipped to tackle challenging Selenium interview questions with confidence. Remember to keep practicing and stay updated with the latest Selenium developments to stay ahead in your automation testing career. Good luck!
0 notes
Text
WebDriver and WebElements in Selenium
WebDrvier is a collection of related methods. WebElements are buttons, text boxes, checkboxes, drop-down menus, hyperlinks, etc. on a web application. The Building Blocks for Selenium WebDriver is to first locate a WebElement then perform an action on the WebElement.
#development#developer#free certification#students#programmer#programming#certificates#certification#it certification#selenium webdriver#selenium
0 notes
Photo
When Africa was a German laboratory
At the turn of the 20th century, epidemics of trypanosomiasis, or "sleeping sickness" as it is more commonly known, started to appear across Africa. A vector-borne parasitic disease causing apathy, slow movement, speech disorders, physical weakness and death, sleeping sickness raised alarm among European colonisers on the continent who feared that its spread could slow down the African workforce, and subsequently their colonial projects.
In 1906, a renowned German scientist traveled to East Africa with his wife and assistants to try and find a “cure�� for the disease. He set up a sleeping sick “concentration camp” for East Africans, and started to “treat” them with Atoxyl - a reagent containing arsenic - even though it was known to cause pain, blindness and even death.
That scientist's name was Robert Koch.
Today, Koch's legacy lives on across Germany. The city of Berlin is full of plaques, monuments, and statues bearing his name and praising his medical accomplishments. The German federal agency responsible for disease control and prevention, which is currently leading the country's response to the COVID-19 pandemic, is also named after Koch.
Best known for his research on cholera and tuberculosis, Koch is considered to be the founder of modern microbiology and one of the finest scientists of the late 19th and early 20th centuries. He received the Nobel Prize for Physiology or Medicine in 1905 for his research on tuberculosis and gained international acclaim for his discoveries. His four postulates, used to establish a causative relationship between a microbe and a disease, are taught in high school biology lessons to this day, solidifying young students' understanding of disease, infection, and environment.
Today, while Koch's discoveries and accomplishments are well known and highly celebrated in Germany and the world, his expedition to East Africa rarely gets a mention. At the time of writing this article, even on Wikipedia, where his early life, education and career are discussed in detail, there is no mention of his work in Africa. There is no question that Koch designed, set up, and personally ran medical concentration camps in East Africa, causing immeasurable suffering and pain for thousands of people. So why are his colonial endeavours being ignored in modern conversations about his legacy?
Koch's advocates might argue that his notable contributions to the field of biology outweigh his brief expedition to East Africa. However, the influence Koch had on colonial Africa was not limited to the few years he spent on the continent. Moreover, his decision to conduct on African people medical experiments that were deemed too dangerous for Europeans had overreaching consequences that influence the way the Western scientific community treats Africans to this day.
When sleeping sickness struck Africa over a century ago, the disease was poorly understood. While its dangers were well known, both in Europe and in Africa, little could be done to prevent its spread.
Nevertheless, scientists in Germany came up with several remedies that they believed could be effective against sleeping sickness, as well as other illnesses widespread in Europe, such as syphilis. They tested these remedies on animals, but growing suspicions about medical experiments on humans in Europe meant these concoctions could not be tried on German test subjects. In Africa, however, there was no comparable public resistance, and colonial authorities cared little about the impact such experiments could have on Africans.
So when Koch embarked on his expedition to East Africa, his main task was to test these remedies - many of them containing poisonous substances like arsenic - on humans. It is hard to determine whether Koch's primary concern was to cure East Africans suffering from this horrible disease or to use them as guinea pigs to ascertain the efficiency of remedies that can also be used in the treatment of other illnesses widely affecting Europeans.
Was Robert Koch a racist willing to conduct dangerous experiments on Black people for the benefit of Germany or a canny scientist who took risks to heal the sick?
We may never know the definitive answer to this question. What we do know, however, is that regardless of his intentions, Koch's actions directly contributed to the colonial oppression of African people.
After arriving in East Africa, Koch established the Bugula sleeping sickness research camp and started “treating” up to 1,000 people a day with Atoxyl and other untested reagents. As historian Manuela Bauche explains, it is unclear how this many locals ended up in Koch's camp, and whether they were informed of the likely effects the toxic “treatments” would have on their bodies.
Koch's experiences and experiments in the Bugula camp set the standard for combating sleeping sickness in Germany's African colonies. Not only did Atoxyl establish itself as the standard drug in the treatment of sleeping sickness, but Koch's proposal to establish many more “concentration camps” - the name he himself gave to these facilities - to isolate the sick from the healthy and continue human experimentations, were taken to heart by German authorities.
By the time Koch left the continent in October 1907, three sleeping sick “concentration camps” had been established in German East Africa, and five such institutions were found in the German West African colonies, that is, present-day Togo and Cameroon.
In these camps, as Wolfgang U Eckart explains in his research paper, The Colony as Laboratory: German Sleeping Sickness Campaigns in German East Africa, thousands of Africans became the objects of dangerous therapeutical and pharmacological research. Scientists running the camps routinely gave different doses of Atoxyl to their "patients" and monitored the side effects they experienced. According to Pittsburg University historian Mary K Webel, at the Bugula camp established by Koch himself, test subjects were made to wear wooden identification tags around their necks or wrists and subjected to a series of dehumanising assessments. Their eyes, ears, and limbs were regularly punctured with needles in an effort to extract what scientists called Krankenmaterial, or “sick material”, from their bodies. The data collected in these camps was eventually shared with British officials, who were also trying to tackle sleeping sickness outbreaks in their colonies.
Faced with a deadly epidemic that could devastate the labor force and crash the economy, Koch and his contemporaries embarked on a quest to find a cure or at least a method to contain the spread of the disease. By choosing to conduct experiments that they deemed too dangerous for European populations on Africans, they created and sustained racial hierarchies of experimentation. In light of the international race to find a vaccine for COVID-19, these are issues that we should be wary of today.
In April 2020, two French doctors suggested in a TV show that a potential vaccine for coronavirus should first be tested on people in Africa.
“It may be provocative,” said Jean-Paul Mira, head of the intensive care unit at the Cochin Hospital in Paris. “Should we not do this study in Africa where there are no masks, no treatment or intensive care, a little bit like it's been done for certain AIDS studies, where among prostitutes, we try things, because we know that they are highly exposed and don't protect themselves? ”
His comments caused an uproar, and led many to publicly challenge the idea that “Africa is a testing lab for Europe”.
The French doctors' suggestion, however, did not come out of the blue. Over a century ago, when faced with a deadly novel disease, European colonial officials did not think twice before using Africans as test subjects, without seeking their acquiescence or informing them of the risks.
Koch was a brilliant scientist, and he likely genuinely wanted to cure sleeping sickness and improve the health and lives of those who suffered from the illness. Nevertheless, the methods he used to try and find a cure and the conditions he set up to contain the disease were rooted in colonial hierarchies. He not only poisoned thousands of people but also contributed to the widespread acceptance of the idea that, when it comes to medical ethics, different rules apply to Africa and Europe. As we continue to search for a vaccine or potential cure for the novel coronavirus, it is important to take heed from the dark chapters of the past, so that Africa is no longer a living laboratory for western scientists.
The views expressed in this article are the author's own and do not necessarily reflect Al Jazeera's editorial stance.
#world Read full article: https://expatimes.com/?p=11457&feed_id=8785
0 notes
Text
300+ TOP SELENIUM Interview Questions and Answers
Selenium Interview Questions for freshers and experienced :-
1. What is Automation Testing?
Automation testing or Test Automation is a process of automating the manual process to test the application/system under test. Automation testing involves use to a separate testing tool which lets you create test scripts which can be executed repeatedly and doesn’t require any manual intervention.
2. What are the benefits of Automation Testing?
Benefits of Automation testing are:
Supports execution of repeated test cases
Aids in testing a large test matrix
Enables parallel execution
Encourages unattended execution
Improves accuracy thereby reducing human generated errors
Saves time and money
3. Why should Selenium be selected as a test tool?
Selenium
is free and open source
have a large user base and helping communities
have cross Browser compatibility (Firefox, chrome, Internet Explorer, Safari etc.)
have great platform compatibility (Windows, Mac OS, Linux etc.)
supports multiple programming languages (Java, C#, Ruby, Python, Pearl etc.)
has fresh and regular repository developments
supports distributed testing
4. what is Selenium and what is composed of?
Selenium is a suite of tools for automated web testing. It is composed of
Selenium IDE (Integrated Development Environment) : It is a tool for recording and playing back. It is a firefox plugin
WebDriver and RC: It provide the APIs for a variety of languages like Java, .NET, PHP, etc. With most of the browsers Webdriver and RC works.
Grid: With the help of Grid you can distribute tests on multiple machines so that test can be run parallel which helps in cutting down the time required for running in browser test suites
5. What do we mean by Selenium 1 and Selenium 2?
Selenium RC and WebDriver, in a combination are popularly known as Selenium 2. Selenium RC alone is also referred as Selenium 1.
6. Which is the latest Selenium tool?
WebDriver
7. What are the testing types that can be supported by Selenium?
Selenium supports the following types of testing:
Functional Testing
Regression Testing
8. Why should Selenium be selected as a test tool?
Selenium
is free and open source
have a large user base and helping communities
have cross Browser compatibility (Firefox, chrome, Internet Explorer, Safari etc.)
have great platform compatibility (Windows, Mac OS, Linux etc.)
supports multiple programming languages (Java, C#, Ruby, Python, Pearl etc.)
has fresh and regular repository developments
supports distributed testing
9. What are the different types of waits available in WebDriver?
There are two types of waits available in WebDriver:
1.Implicit Wait
2.Explicit Wait
Implicit Wait: Implicit waits are used to provide a default waiting time (say 30 seconds) between each consecutive test step/command across the entire test script. Thus, subsequent test step would only execute when the 30 seconds have elapsed after executing the previous test step/command.
Explicit Wait: Explicit waits are used to halt the execution till the time a particular condition is met or the maximum time has elapsed. Unlike Implicit waits, explicit waits are applied for a particular instance only.
10. What are the limitations of Selenium?
Following are the limitations of Selenium:
Selenium supports testing of only web based applications
Mobile applications cannot be tested using Selenium
Captcha and Bar code readers cannot be tested using Selenium
Reports can only be generated using third party tools like TestNG or Junit.
As Selenium is a free tool, thus there is no ready vendor support though the user can find numerous helping communities.
User is expected to possess prior programming language knowledge.
SELENIUM Interview Questions
11. When should I use Selenium IDE?
Selenium IDE is the simplest and easiest of all the tools within the Selenium Package. Its record and playback feature makes it exceptionally easy to learn with minimal acquaintances to any programming language. Selenium IDE is an ideal tool for a naïve user.
12. How do I launch the browser using WebDriver?
The following syntax can be used to launch Browser:
WebDriver driver = new FirefoxDriver();
WebDriver driver = new ChromeDriver();
WebDriver driver = new InternetExplorerDriver();
13. What is Selenese?
Selenese is the language which is used to write test scripts in Selenium IDE.
14. When should I use Selenium Grid?
Selenium Grid can be used to execute same or different test scripts on multiple platforms and browsers concurrently so as to achieve distributed test execution, testing under different environments and saving execution time remarkably.
15. What is Selenium? What are the different Selenium components?
Selenium is one of the most popular automated testing suites. Selenium is designed in a way to support and encourage automation testing of functional aspects of web based applications and a wide range of browsers and platforms. Due to its existence in the open source community, it has become one of the most accepted tools among the testing professionals.
Selenium is not just a single tool or a utility, rather a package of several testing tools and for the same reason it is referred to as a Suite. Each of these tools is designed to cater different testing and test environment requirements.
The suite package constitutes of the following sets of tools:
Selenium Integrated Development Environment (IDE) – Selenium IDE is a record and playback tool. It is distributed as a Firefox Plugin.
Selenium Remote Control (RC) – Selenium RC is a server that allows user to create test scripts in a desired programming language. It also allows executing test scripts within the large spectrum of browsers.
Selenium WebDriver – WebDriver is a different tool altogether that has various advantages over Selenium RC. WebDriver directly communicates with the web browser and uses its native compatibility to automate.
Selenium Grid – Selenium Grid is used to distribute your test execution on multiple platforms and environments concurrently.
16. What is an Xpath?
Xpath is used to locate a web element based on its XML path. XML stands for Extensible Markup Language and is used to store, organize and transport arbitrary data. It stores data in a key-value pair which is very much similar to HTML tags. Both being markup languages and since they fall under the same umbrella, Xpath can be used to locate HTML elements.
The fundamental behind locating elements using Xpath is the traversing between various elements across the entire page and thus enabling a user to find an element with the reference of another element.
17. How to type in a textbox using Selenium?
User can use sendKeys(“String to be entered”) to enter the string in the textbox.
Syntax:
WebElement username = drv.findElement(By.id(“Email”));
// entering username
username.sendKeys(“sth”);
18. How can you find if an element in displayed on the screen?
WebDriver facilitates the user with the following methods to check the visibility of the web elements. These web elements can be buttons, drop boxes, checkboxes, radio buttons, labels etc.
1.isDisplayed()
2.isSelected()
3.isEnabled()
Syntax:
isDisplayed():
boolean buttonPresence = driver.findElement(By.id(“gbqfba”)).isDisplayed();
isSelected():
boolean buttonSelected =driver.findElement(By.id(“gbqfba”)).isDisplayed();
isEnabled():
boolean searchIconEnabled = driver.findElement(By.id(“gbqfb”)).isEnabled();
19. Can you explain the phase of Automation Testing LifeCycle?
Outline the potential benefits and test tool proposal
Test tool evaluation and selection
Steps necessary to outline automated testing to the project
Identifies the test procedure standards, defines the tests, defines development standard
Test plans are executed
This is done throughout the life-cycle
20. What are the different types of locators in Selenium?
Locator can be termed as an address that identifies a web element uniquely within the webpage. Thus, to identify web elements accurately and precisely we have different types of locators in Selenium:
ID
ClassName
Name
TagName
LinkText
PartialLinkText
Xpath
CSS Selector
DOM
21. What are the different types of Drivers available in WebDriver?
The different drivers available in WebDriver are:
FirefoxDriver
InternetExplorerDriver
ChromeDriver
SafariDriver
OperaDriver
AndroidDriver
IPhoneDriver
HtmlUnitDriver
22. What is difference between assert and verify commands?
Assert:
Assert command checks whether the given condition is true or false. Let’s say we assert whether the given element is present on the web page or not. If the condition is true then the program control will execute the next test step but if the condition is false, the execution would stop and no further test would be executed.
Verify:
Verify command also checks whether the given condition is true or false. Irrespective of the condition being true or false, the program execution doesn’t halts i.e. any failure during verification would not stop the execution and all the test steps would be executed.
23. What are the steps to run automation using selenium?
The very basic steps are:
Record the test steps using selenium-IDE.
Modify the script according to the testing needs. Add validation points, Java Scripts, Time-out etc.
Run the test.
View the result after test run complete analyze.
24. What are the capabilities of Selenium IDE?
Selenium IDE (Integrated Development Environment) works similar to commercial tools like QTP, Silk Test and Test Partner etc.
The below points describes well about Selenium IDE.
Selenium IDE is a Firefox add-on.
Selenium IDE can support recording the clicks, typing, and other actions to make a test cases.
Using Selenium IDE, a tester can play back the test cases in the Firefox browser.
Selenium IDE supports exporting the test cases and suites to Selenium RC.
Debugging of the test cases with step-by-step can be done.
Breakpoint insertion is possible.
Page abstraction functionality is supported by Selenium IDE.
Selenium IDE can supports an extensibility capability allowing the use of add-ons or user extensions that expand the functionality of Selenium IDE
25. How to find more than one web element in the list?
At times, we may come across elements of same type like multiple hyperlinks, images etc arranged in an ordered or unordered list. Thus, it makes absolute sense to deal with such elements by a single piece of code and this can be done using WebElement List.
Sample Code
// Storing the list
List elementList = driver.findElements(By.xpath("//div//ul//li"));
// Fetching the size of the list
int listSize = elementList.size();
for (int i=0; i {
// Clicking on each service provider link
serviceProviderLinks.get(i).click();
// Navigating back to the previous page that stores link to service providers
driver.navigate().back();
}
26. What is the difference between driver.close() and driver.quit command?
close(): WebDriver’s close() method closes the web browser window that the user is currently working on or we can also say the window that is being currently accessed by the WebDriver. The command neither requires any parameter nor does is return any value.
quit(): Unlike close() method, quit() method closes down all the windows that the program has opened. Same as close() method, the command neither requires any parameter nor does is return any value.
27. How can we get a text of a web element?
Get command is used to retrieve the inner text of the specified web element. The command doesn’t require any parameter but returns a string value. It is also one of the extensively used commands for verification of messages, labels, errors etc displayed on the web pages.
Syntax:
String Text = driver.findElement(By.id(“Text”)).getText();
What is the difference between “/” and “//” in Xpath?
Single Slash “/” –
Single slash is used to create Xpath with absolute path i.e. the xpath would be created to start selection from the document node/start node.
Double Slash “//” –
Double slash is used to create Xpath with relative path i.e. the xpath would be created to start selection from anywhere within the document.
How to select value in a dropdown?
Value in the drop down can be selected using WebDriver’s Select class.
Syntax:
SelectByValue:
Select selectByValue = new Select(driver.findElement(By.id(“SelectID_One”)));
selectByValue.selectByValue(“greenvalue”);
selectByVisibleText:
Select selectByVisibleText = new Select (driver.findElement(By.id(“SelectID_Two”)));
selectByVisibleText.selectByVisibleText(“Lime”);
selectByIndex:
Select selectByIndex = new Select(driver.findElement(By.id(“SelectID_Three”)));
selectByIndex.selectByIndex(2);
28. What are the different types of navigation commands?
Following are the navigation commands:
navigate().back() – The above command requires no parameters and takes back the user to the previous webpage in the web browser’s history.
Sample code:
driver.navigate().back();
navigate().forward() –
This command lets the user to navigate to the next web page with reference to the browser’s history.
Sample code:
driver.navigate().forward();
navigate().refresh() –
This command lets the user to refresh the current web page there by reloading all the web elements.
Sample code:
driver.navigate().refresh();
navigate().to() –
This command lets the user to launch a new web browser window and navigate to the specified URL.
Sample code:
driver.navigate().to(“https://google.com”);
29. How to get title?
driver.getTitle();~To Print: System.out.println( driver.getTitle());
30. Can Selenium handle windows based pop up?
Selenium is an automation testing tool which supports only web application testing. Therefore, windows pop up cannot be handled using Selenium.
31. Can WebDriver test Mobile applications?
WebDriver cannot test Mobile applications. WebDriver is a web based testing tool, therefore applications on the mobile browsers can be tested.
32. How can we handle web based pop up?
WebDriver offers the users with a very efficient way to handle these pop ups using Alert interface. There are the four methods that we would be using along with the Alert interface.
• void dismiss() – The accept() method clicks on the “Cancel” button as soon as the pop up window appears.
• void accept() – The accept() method clicks on the “Ok” button as soon as the pop up window appears.
• String getText() – The getText() method returns the text displayed on the alert box.
• void sendKeys(String stringToSend) – The sendKeys() method enters the specified string pattern into the alert box.
Syntax:
// accepting javascript alert
Alert alert = driver.switchTo().alert();
alert.accept();
33. How can we handle windows based pop up?
Selenium is an automation testing tool which supports only web application testing, that means, it doesn’t support testing of windows based applications. However Selenium alone can’t help the situation but along with some third party intervention, this problem can be overcome. There are several third party tools available for handling window based pop ups along with the selenium like AutoIT, Robot class etc.
34. How to click on a hyper link using linkText?
driver.findElement(By.linkText(“Google”)).click();
The command finds the element using link text and then click on that element and thus the user would be re-directed to the corresponding page.
The above mentioned link can also be accessed by using the following command.
driver.findElement(By.partialLinkText(“Goo”)).click();
The above command find the element based on the substring of the link provided in the parenthesis and thus partialLinkText() finds the web element with the specified substring and then clicks on it.
35. How to assert title of the web page?
//verify the title of the web page
assertTrue(“The title of the window is incorrect.”,driver.getTitle().equals(“Title of the page”));
36. What is a framework?
Framework is a constructive blend of various guidelines, coding standards, concepts, processes, practices, project hierarchies, modularity, reporting mechanism, test data injections etc. to pillar automation testing.
37. How to handle frame in WebDriver?
An inline frame acronym as iframe is used to insert another document with in the current HTML document or simply a web page into a web page by enabling nesting.
Select iframe by id
driver.switchTo().frame(“ID of the frame“);
Locating iframe using tagName
driver.switchTo().frame(driver.findElements(By.tagName(“iframe”).get(0));
Locating iframe using index
frame(index)
driver.switchTo().frame(0);
frame(Name of Frame)
driver.switchTo().frame(“name of the frame”);
38. When do we use findElement() and findElements()?
findElement(): findElement() is used to find the first element in the current web page matching to the specified locator value. Take a note that only first matching element would be fetched.
Syntax:
WebElement element =
driver.findElements(By.xpath(“//div//ul//li”));
findElements():
findElements() is used to find all the elements in the current web page matching to the specified locator value. Take a note that all the matching elements would be fetched and stored in the list of WebElements.
Syntax:
List elementList =
driver.findElements(By.xpath(“//div//ul//li”));
39. What are the advantages of Automation framework?
Advantage of Test Automation framework
Reusability of code
Maximum coverage
Recovery scenario
Low cost maintenance
Minimal manual intervention
Easy Reporting
40. How can I read test data from excels?
Test data can efficiently be read from excel using JXL or POI API. See detailed tutorial here.
41. Explain how Selenium Grid works?
Selenium Grid sent the tests to the hub. These tests are redirected to Selenium Webdriver, which launch the browser and run the test. With entire test suite, it allows for running tests in parallel.
42. How to mouse hover on a web element using WebDriver?
WebDriver offers a wide range of interaction utilities that the user can exploit to automate mouse and keyboard events. Action Interface is one such utility which simulates the single user interactions.
Thus, In the following scenario, we have used Action Interface to mouse hover on a drop down which then opens a list of options.
Sample Code:
// Instantiating Action Interface
Actions actions=new Actions(driver);
// howering on the dropdown
actions.moveToElement(driver.findElement(By.id("id of the dropdown"))).perform();
// Clicking on one of the items in the list options
WebElement subLinkOption=driver.findElement(By.id("id of the sub link"));
subLinkOption.click();
43. Can captcha be automated?
No, captcha and bar code reader cannot be automated.
44. Explain what is assertion in Selenium and what are the types of assertion?
Assertion is used as a verification point. It verifies that the state of the application conforms to what is expected. The types of assertion are “assert” , “verify” and “waifFor”..
45. While using click command can you use screen coordinate?
To click on specific part of element, you would need to use clickAT command. ClickAt command accepts element locator and x, y co-ordinates as arguments-
clickAt (locator, cordString)
46. What are the advantages of Selenium?
It supports C#, PHP, Java, Perl, Phython
It supports different OS like Windows, Linux and Mac OS
It has got powerful methods to locate elements (Xpath, DOM , CSS)
It has highly developer community supported by Google
47. How to retrieve css properties of an element?
The values of the css properties can be retrieved using a get() method:
Syntax:
driver.findElement(By.id(“id“)).getCssValue(“name of css attribute”);
driver.findElement(By.id(“id“)).getCssValue(“font-size”);
How to capture screen shot in WebDriver?
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import java.io.File;
import java.io.IOException;
import org.apache.commons.io.FileUtils;
import org.openqa.selenium.OutputType;
import org.openqa.selenium.TakesScreenshot;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public class CaptureScreenshot {
WebDriver driver;
@Before
public void setUp() throws Exception {
driver = new FirefoxDriver();
driver.get("https://google.com");
}
@After
public void tearDown() throws Exception {
driver.quit();
}
@Test
public void test() throws IOException {
// Code to capture the screenshot
File scrFile = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);
// Code to copy the screenshot in the desired location
FileUtils.copyFile(scrFile, new File("C:\\CaptureScreenshot\\google.jpg"));
}
}
48. What is the difference between type keys and type commands ?
TypeKeys() will trigger JavaScript event in most of the cases whereas .type() won’t. Type key populates the value attribute using JavaScript whereas .typekeys() emulates like actual user typing
49. What is the difference between setSpeed() and sleep() methods?
:Both will delay the speed of execution.
Thread.sleep () : It will stop the current (java) thread for the specified period of time. Its done only once
• It takes a single argument in integer format
Ex: thread.sleep(2000)- It will wait for 2 seconds
• It waits only once at the command given at sleep
SetSpeed () : For specific amount of time it will stop the execution for every selenium command.
• It takes a single argument in integer format
Ex: selenium.setSpeed(“2000”)- It will wait for 2 seconds
• Runs each command after setSpeed delay by the number of milliseconds mentioned in set Speed
This command is useful for demonstration purpose or if you are using a slow web application
What is same origin policy? How you can avoid same origin policy?
The “Same Origin Policy” is introduced for security reason, and it ensures that content of your site will never be accessible by a script from another site. As per the policy, any code loaded within the browser can only operate within that website’s domain.
To avoid “Same Origin Policy” proxy injection method is used, in proxy injection mode the Selenium Server acts as a client configured HTTP proxy , which sits between the browser and application under test and then masks the AUT under a fictional URL
50. What is Object Repository? How can we create Object Repository in Selenium?
Object Repository is a term used to refer to the collection of web elements belonging to Application Under Test (AUT) along with their locator values. Thus, whenever the element is required within the script, the locator value can be populated from the Object Repository. Object Repository is used to store locators in a centralized location instead of hard coding them within the scripts.
In Selenium, objects can be stored in an excel sheet which can be populated inside the script whenever required.
What is Selenium and what is composed of?
Selenium is a suite of tools for automated web testing. It is composed of
Selenium IDE (Integrated Development Environment) : It is a tool for recording and playing back. It is a firefox plugin
WebDriver and RC: It provide the APIs for a variety of languages like Java, .NET, PHP, etc. With most of the browsers Webdriver and RC works.
Grid: With the help of Grid you can distribute tests on multiple machines so that test can be run parallel which helps in cutting down the time required for running in browser test suites
51. What is Selenium 2.0 ?
Web testing tools Selenium RC and WebDriver are consolidated in single tool in Selenium 2.0
52. Mention what is the use of X-path?
X-Path is used to find the WebElement in web pages. It is also useful in identifying the dynamic elements.
53. List out the technical challenges with Selenium?
Technical challenges with Selenium are
Selenium supports only web based applications
It does not support the Bitmap comparison
For any reporting related capabilities have to depend on third party tools
No vendor support for tool compared to commercial tools like HP UFT
As there is no object repository concept in Selenium, maintainability of objects becomes difficult
53. List out the test types that are supported by Selenium?
For web based application testing selenium can be used
The test types can be supported are
a) Functional
b) Regression
For post release validation with continuous integration automation tool could be used
a) Jenkins
b) Hudson
c) Quick Build
d) CruiseCont
54. What is heightened privileges browsers?
The purpose of heightened privileges is similar to Proxy Injection, allows websites to do something that are not commonly permitted. The key difference is that the browsers are launced in a special mode called heightened privileges. By using these browser mode, Selenium core can open the AUT directly and also read/write its content without passing the whole AUT through the Selenium RC server
55. Why testers should opt for Selenium and not QTP?
Selenium is more popular than QTP as
Selenium is an open source whereas QTP is a commercial tool
Selenium is used specially for testing web based applications while QTP can be used for testing client server application also
Selenium supports Firefox, IE, Opera, Safari on operating systems like Windows, Mac, linux etc. however QTP is limited to Internet Explorer on Windows.
Selenium supports many programming languages like Ruby, Perl, Python whereas QTP supports only VB script
56. What are the four parameter you have to pass in Selenium?
Four parameters that you have to pass in Selenium are
Host
Port Number
Browser
URL
57. How you can use “submit” a form using Selenium ?
You can use “submit” method on element to submit form-
element.submit () ;
Alternatively you can use click method on the element which does form submission
Selenium IDE captures 3 options?
Command, Target, Value
58. Mention what is the difference between Implicit wait and Explicit wait?
Implicit Wait:Sets a timeout for all successive Web Element searches. For the specified amount of time it will try looking for element again and again before throwing a NoSuchElementException. It waits for elements to show up.
Explicit Wait : It is a one-timer, used for a particular search./p>
59. What is Object Repository ?
An object repository is an essential entity in any UI automations which allows a tester to store all object that will be used in the scripts in one or more centralized locations rather than scattered all over the test scripts.
60. Explain how to assert text of webpage using selenium 2.0 ?
WebElement el = driver.findElement(By.id(“ElementID”))
//get test from element and stored in text variable
String text = el.getText();
//assert text from expected
Assert.assertEquals(“Element Text”, text);
61. Can we use Selenium grid for performance testing?
Yes. But not as effectively as a dedicated performance testing tool like Loadrunner.
62. Can Selenium test an application on Android browser?
Selenium can handle Android browser.
63. Which browsers does WebDriver support?
The existing drivers are the ChromeDriver, InternetExplorerDriver, FirefoxDriver, OperaDriver and HtmlUnitDriver. For more information about each of these, including their relative strengths and weaknesses, please follow the links to the relevant pages. There is also support for mobile testing via the AndroidDriver, OperaMobileDriver and IPhoneDriver
64. What tests can selenium do?
Selenium could do functional, regression, and load of web based applications.p>
65. Which attribute you should consider throughout the script in frame for “if no frame Id as well as no frame name”?
You can use…..driver.findElements(By.xpath(“//iframe”))….
This will return list of frames.
You will ned to switch to each and every frame and search for locator which we want.
Then break the loop
66. How do I execute Javascript directly?
We believe that most of the time there is a requirement to execute Javascript there is a failing in the tool being used: it hasn’t emitted the correct events, has not interacted with a page correctly, or has failed to react when an XmlHttpRequest returns. We would rather fix WebDriver to work consistently and correctly than rely on testers working out which Javascript method to call.
We also realise that there will be times when this is a limitation. As a result, for those browsers that support it, you can execute Javascript by casting the WebDriver instance to a JavascriptExecutor. In Java, this looks like:
WebDriver driver; // Assigned elsewhere
JavascriptExecutor js = (JavascriptExecutor) driver;
js.executeScript(“return document.title”);
Other language bindings will follow a similar approach. Take a look at the UsingJavascript page for more information.
67. My XPath finds elements in one browser, but not in others. Why is this?
The short answer is that each supported browser handles XPath slightly differently, and you’re probably running into one of these differences. The long answer is on the XpathInWebDriver page..
68. Explain what is the difference between find elements () and find element () ?
find element ():
It finds the first element within the current page using the given “locating mechanism”. It returns a single WebElement
findElements () :
Using the given “locating mechanism” find all the elements within the current page. It returns a list of web elements.
Explain what are the JUnits annotation linked with Selenium?
The JUnits annotation linked with Selenium are
@Before public void method() –
It will perform the method () before each test, this method can prepare the test
@Test public void method() –
Annotations @Test identifies that this method is a test method environment
@After public void method()-
To execute a method before this annotation is used, test method must start with test@Before
69. What is Selenium IDE?
Selenium IDE is an integrated development environment for Selenium tests. It is implemented as a Firefox extension, and has a recording feature, which will keep account of user actions as they are performed and store them as a reusable script to play back. Selenium-IDE also offers full editing of test cases for more precision and control.
70. Why is my Javascript execution always returning null?
ou need to return from your javascript snippet to return a value, so:
js.executeScript(“document.title”);
will return null, but:
js.executeScript(“return document.title”);
will return the title of the document.
71. What is WebDriver?
WebDriver is a tool for writing automated tests of websites. It aims to mimic the behaviour of a real user, and as such interacts with the HTML of the application
72. Can Selenium test a application on iPhone’s Mobile Safari browser?
Selenium can handle Mobile Safari browser. There is experimental Selenium IPhone Driver for running tests on Mobile with Safari on the iPhone and iPad and iPod Touch.
73. What are the disadvantages of Selenium?
Disadvantages of Selenium:
Limitation in terms of browser support (It runs only in Mozilla).Scripts written using Selenium IDE can be used for other browsers only if it is used with Selenium RC or Selenium Core.
We can’t run recorded script if it is converted to Java, C#, Ruby etc.
Not allowed to write manual scripts like conditions and Loops for Data Driven Testing
There is no option to verify images
74. Explain what is Datadriven framework and Keyword driven?
Datadriven framework:
In this framework, the test data is separated and kept outside the Test Scripts, while test case logic resides in Test Scripts. Test data is read from the external files ( Excel Files) and are loaded into the variables inside the Test Script. Variables are used for both for input values and for verification values.
Keyworddriven framework:
The keyword driven frameworks requires the development of data tables and keywords, independent of the test automation. In a keyword driven test, the functionality of the application under test is documented in a table as well as step by step instructions for each test.
76. What are the features of TestNG and list some of the functionality in TestNG which makes it more effective?
TestNG is a testing framework based on JUnit and NUnit to simplify a broad range of testing needs, from unit testing to integration testing. And the functionality which makes it efficient testing framework are
Support for annotations
Support for data-driven testing
Flexible test configuration
Ability to re-execute failed test cases
77. Explain how you can login into any site if it’s showing any authentication popup for password and username?
Pass the username and password with url
Syntax- http://username:password@url
ex- http://creyate:[email protected]
78. What is the selenium’s recording language?
Selenium’s recording language is “HTML”.
79. What does it mean to be “developer focused”?
We believe that within a software application’s development team, the people who are best placed to build the tools that everyone else can use are the developers. Although it should be easy to use WebDriver directly, it should also be easy to use it as a building block for more sophisticated tools. Because of this, WebDriver has a small API that’s easy to explore by hitting the “autocomplete” button in your favorite IDE, and aims to work consistently no matter which browser implementation you use.
80. What are the steps to run automation using selenium?
The very basic steps are:
Record the test steps using selenium-IDE.
Modify the script according to the testing needs. Add validation points, Java Scripts, Time-out etc.
81. Why to use TestNG with Selenium RC ?
If you want full automation against different server and client platforms, You need a way to invoke the tests from a command line process, reports that tells you what happened and flexibility in how you create your test suites. TestNG gives that flexibility.
82. How you can capture server side log Selenium Server?
To capture server side log in Selenium Server, you can use command
java –jar .jar –log selenium.log
83. Other than the default port 4444 how you can run Selenium Server?
You can run Selenium server on java-jar selenium-server.jar-port other than its default port
84. How Selenium grid hub keeps in touch with RC slave machine?
At predefined time selenium grid hub keeps polling all RC slaves to make sure it is available for testing. The deciding parameter is called “remoteControlPollingIntervalSeconds” and is defined in “grid_configuration.yml”file
85. Using Selenium how can you handle network latency ?
To handle network latency you can use driver.manage.pageloadingtime for network latency
86. To enter values onto text boxes what is the command that can be used?
To enter values onto text boxes we can use command sendkeys()
87. How do you identify an object using selenium?
To identify an object using Selenium you can use
isElementPresent(String locator)
isElementPresent takes a locator as the argument and if found returns a Boolean
88. In Selenium what are Breakpoints and Startpoints?
Breakpoints: When you implement a breakpoint in your code, the execution will stop right there. This helps you to verify that your code is working as expected.
StartpointsStartpoint indicates the point from where the execution should begin. Startpoint can be used when you want to run the testscript from the middle of the code or a breakpoint.
89. Mention why to choose Python over Java in Selenium?
Few points that favor Python over Java to use with Selenium is,
Java programs tend to run slower compared to Python programs.
Java uses traditional braces to start and ends blocks, while Python uses indentation.
Java employs static typing, while Python is dynamically typed.
Python is simpler and more compact compared to Java.
90. Mention what are the challenges in Handling Ajax Call in Selenium Webdriver?
The challenges faced in Handling Ajax Call in Selenium Webdriver are
Using "pause" command for handling Ajax call is not completely reliable. Long pause time makes the test unacceptably slow and increases the testing time. Instead, "waitforcondition" will be more helpful in testing Ajax applications.
It is difficult to assess the risk associated with particular Ajax applications
Given full freedom to developers to modify Ajax application makes the testing process challenging
Creating automated test request may be difficult for testing tools as such AJAX application often use different encoding or serialization technique to submit POST data.
91. Mention what is IntelliJ?
Intellij is an IDE that helps you to write better and faster code for Selenium. Intellij can be used in the option to Java bean and Eclipse.
92. Mention in what ways you can customize TestNG report?
You can customize TestNG report in two ways,
Using ITestListener Interface
Using IReporter Interface
93. To generate pdf reports mention what Java API is required?
To generate pdf reports, you need Java API IText.
94. What is Listeners in Selenium WebDriver?
In Selenium WebDriver, Listeners "listen" to the event defined in the selenium script and behave accordingly. It allows customizing TestNG reports or logs. There are two main listeners i.e. WebDriver Listeners and TestNG Listeners.
95. What are the types of Listeners in TestNG?
The types of Listeners in TestNG are,
IAnnotationTransformer
IAnnotationTransformer2
IConfigurable
IConfigurationListener
IExecutionListener
IHookable
IInvokedMethodListener
IInvokedMethodListener2
IMethodInterceptor
IReporter
ISuiteListener
ITestListener
96. What is desired capability? How is it useful in terms of Selenium?
The desired capability is a series of key/value pairs that stores the browser properties like browser name, browser version, the path of the browser driver in the system, etc. to determine the behavior of the browser at run time.
For Selenium,
It can be used to configure the driver instance of Selenium WebDriver.
When you want to run the test cases on a different browser with different operating systems and versions.
97. For Database Testing in Selenium Webdriver what API is required?
For Database Testing in Selenium Webdriver, you need JDBC (Java Database Connectivity) API. It allows you to execute SQL statements.
98. Mention when to use AutoIT?
Selenium is designed to automate web-based applications on different browsers. But to handle window GUI and non-HTML popups in the application you need AutoIT.
99. Why do you need Session Handling while working with Selenium?
While working with Selenium, you need Session Handling. This is because, during test execution, the Selenium WebDriver has to interact with the browser all the time to execute given commands. At the time of execution, it is also possible that, before current execution completes, someone else starts execution of another script, in the same machine and in the same type of browser. So to avoid such situation you need Session Handling.
100. What are the advantages of Using Git Hub For Selenium?
The advantages of Using Git Hub for Selenium are
Multiple people when they work on the same project they can update project details and inform other team members simultaneously.
Jenkins can help you to build the project from the remote repository regularly. This helps you to keep track of failed builds.
SELENIUM Questions and Answers pdf Download
Read the full article
0 notes
Photo
Why is it better to use explicitly wait rather than implicitly wait in Selenium Web Driver?
Hi Friend,
Totally different concept for explicit wait and implicit wait.
When Implicit wait defined, selenium waits for every element on page or screen to become available before it throws NoSuchElementExeception.
And Explicit wait is, when selenium waits for certain condition before performing any action on WebElement.
Now see advantage of using explicit wait,where we can create WebbElement in different ways. For example
WebDriverWait wait = new WebDriverWait(driver, 50);
element=wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("loginButton"))); element=wait.until(ExpectedConditions.presenceOfElementLocated(By.id("loginButton")));
element=wait.until(ExpectedConditions.elementToBeClickable(By.id("loginButton")));
You can also see other implementations of these methods in webdriver API
Now please see, how Webdriver methods can be used to wait dynamically for any element using these explicit wait methods. All of the below methods return boolean ie true if element is found otherwise false.
Attribute Validation
wait.until(ExpectedConditions.attributeContains(By.cssSelector("box"),"name","txt"));
wait.until(ExpectedConditions.attributeToBe(By.cssSelector("box"),"name","txt1"));
wait.until(ExpectedConditions.attributeToBeNotEmpty(element,"name"));
Waiting for Elements Count
wait.until(ExpectedConditions.numberOfElementsToBe(By.cssSelector("box"),5));
wait.until(ExpectedConditions.numberOfElementsToBeLessThan(By.cssSelector("box"),5));
wait.until(ExpectedConditions.numberOfElementsToBeMoreThan(By.cssSelector("box"),5));
Waiting for a text in an element
wait.until(ExpectedConditions.textMatches(By.cssSelector("box"),Pattern.compile("(.*)(\\d+)(.*)")));
wait.until(ExpectedConditions.textToBe(By.cssSelector("box"),"Sample"));
Waiting for a title of the page
boolean flag = wait.until(ExpectedConditions.titleIs(title));
boolean flag = wait.until(ExpectedConditions.titleContains(title));
We provide testing courses both in-class and online, do check out.
**************************************************************************************
QACult Best Software Testing Courses in Chandigarh tricity.- We love to enhance your knowledge.
QACult is the premier institute catering to the requirements of experienced and fresh pass-out that gives leaders like you a new way to experience Quality engineering—while you work and giving you the flexibility to both advance your career.
Our faculty have 12+ years of industrial experience and have developed many automation testing frameworks in java using TestNG or BDD (cucumber) methodology. We expertise in developing automation testing frameworks in java, python, javascript, php, ruby(WATIR-webdriver & Capybara) and Appium.
please subscribe our channel for more such updates:
https://www.youtube.com/channel/UC0xat537YITJbN_9GSMUALA
And visit our website: www.qacult.com for various blogs and Upcoming Events.
0 notes
Text
Beer Events 9.23
Events
Buffalo Bill Cody led a hunting party of celebrities & wealthy people; supplies included 16 wagons of Bass Ale (1871)
John Gund Brewing destroyed by fire (Lacrosse, Wisconsin; 1897)
James Poole died (1905)
Brewery workers at the Birrerie Meridionali in Napoli defended it against German troops (Italy; 1943)
Edmund Webel patented a No-Return Container for Beer (1969)
Grindmaster Crathco Systems patented a Frozen Beer Product, Method and Apparatus (2003)
Big Rock Brewery patented a Cover Resembling a Beverage Container (2010)
Peter Darby patented a Hop Plant Named “Sumner” (2014)
Breweries Opened
Old Baldy Brewing (California; 1994)
Ellicottville Brewing (New York; 1995)
Pony Express Brewing (Kansas; 1995)
0 notes