Sunday, July 14, 2019

How to control Chromedriver using curl

How to control Chromedriver using curl

Here is how to use Chromedriver without libraries like selenium-webdriver. This can be useful for debugging.
The following example visits a web page and reads the a headline's text contents.


1. download chromedriver.exe on windows/mac, go to the same directory and run this command:

On Mac: ./chromedriver &
On Windows: chromedriver.exe

2. Create a session:
Java Code:
WebDriver driver = new ChromeDriver();

Curl Command:
curl -XPOST http://localhost:9515/session -d '{"desiredCapabilities":{"browserName":"chrome"}}'

3. launch a URL:
Java Code:
driver.get("https://www.google.com");

Curl Command:
curl http://localhost:9515/session/142a7f9bb57b8fda48636c8709df9591/url -d '{"url":"https://www.google.com"}'

4. find an element:
Java Code:
WebElement element = driver.findElement(By.name("q"));

Curl Command:
curl http://localhost:9515/session/142a7f9bb57b8fda48636c8709df9591/element -d '{"using":"name", "value":"q"}'


5. enter text in element:
Java Code:
element.sendKeys("Naveen AutomationLabs");

Curl Command:
curl http://localhost:9515/session/142a7f9bb57b8fda48636c8709df9591/element/0.45843488917986774-1/value -d '{"value":["Naveen Automation Labs"]}'

6. Quit Browser/close the session:
Java Code:
driver.quit();

Curl Command:
curl -X DELETE http://localhost:9515/session/142a7f9bb57b8fda48636c8709df9591


Chromedriver follows the W3C WebDriver spec. There are tons of things you can do with it, but tasks that are simple using something like selenium-webdriver can be quite difficult.
However, for simple debugging or remote-controlling, consider just using curl.


Cheers!!
Naveen AutomationLabs



Tuesday, July 9, 2019

Usage of Cucumber Options which we use in TestRunner File


Usage of Cucumber Options which we use in TestRunner File

TestRunner File is used to build a Communication between Feature Files and StepDefinition Files. 


features: We use Cucumber features option to define path of feature file(s). 

glue: We use Cucumber glue option to define path of step definition file(s). 

format: We use Cucumber format option to generate output or test results in different types of formats. 
Eg: HTML Report, JUnit or TestNG Report, Cucumber Report and So. 

monochrome: We use Cucumber monochrome option to print console output in a very readable format. 
monochrome must be set to true in order to achieve it. 

strict: We use Cucumber strict option to check if any step if not defined in step definition file. 
If any step is not defined in step definition file then it will stop an execution of program. 

dryRun: We use Cucumber dryRun option to check whether all the steps from feature files has got methods and implemented or no in Step Definition File. 
Before execution of program dryRun must be set to true and we need to make sure that all steps are implemented in Step Definition File. 
Once we are sure that all steps are implemented then dryRun must be set to False and we should continue with Test Execution.

tags: We use Cucumber tags option when we have more number of scenarios in a single feature file which represents different purpose [Smoke, Sanity, Regression etc] in such cases we can make use tags option.
Eg: tags={ " @ Smoke " } >> It will pick only and only those scenarios which are tagged with Smoke in feature files.

   This blog is contributed by Pavan KrishnanReddy Working as Testing Executive at Infosys Limited            










Cheers!
Naveen AutomationLabs

Monday, July 8, 2019

How to solve Maven issue - Could not resolve archetype org.apache.maven.archetypes from any of the configured repositories.

How to solve Maven issue - Could not resolve archetype org.apache.maven.archetypes from any of the configured repositories.


  • Problem: - 


Solution
Steps to follow:
  1. Right click on project
  2. click on properties
  3. java build path
  4. select source
  5. add, apply then OK



6. Open window preferences
7. open Maven
8. deselect all dialog box



9. Open window : preferences, open Maven Archetype, click on ‘Add Remote catalog’ and add Catalog file: http://repo1.maven.org/maven2/archetype-catalog.xml
Description: Maven Catalog.



10. check library, right click on project
click on properties, go to java build path
click libraries
add external jars
add, apply ok. 

Error Resolved!! YEY!


This is Nazia. I have recently completed my post-graduation. Later I
joined Naveen Automation Labs which is one of the best online training
programs and improved my automation skills a lot. I face some difficulties
while configuring Maven, so I tried some of the possible ways to solve
them, hope this will help you as well.




Cheers!
Nazia
-Naveen AutomationLabs

Wednesday, April 10, 2019

Selenium & Java Training Course Content - Regular Batch (8th July 2019)

Selenium & Java Training Course Content



Hi Folks,
Please enrol ASAP.  :) This time I'm introducing some amazing content on Java, Selenium and some different approaches on Framework Designing. This will be very different from my YouTube channel. 


After a very high demand on Java+Selenium training, Here I'm going to start next batch (7:00 AM IST to 8:00 AM IST) from 8th July 2019. 

Selenium + Java Course Training 


Thanks for registering "Selenium & Java Sessions" By Naveen AutomationLabs. As per the further registration process, you need to pay the 3000 INR (50 USD) as a registration fee.

Next Batch Starting from: 8th July, 2019 


Duration: 5-6 weeks


Registration Fee: 3000 INR (50 USD)


Total Fee: 

  • 16,500 INR (for Candidates in India) - including Registration Fee

  • 310 USD (for Candidates in USA/UK/AUS/Europe) - including Registration Fee

Location: Online (Goto Meeting) Classes


Timings: (Monday to Friday)
  • 7:00 AM IST (Indian Time)
  • 9:30 PM EST
  • 6:30 PM PST

Note:
  • There will be 2 demo sessions.

~~~ For more information, please refer this course content: Please fill your details here:

Here I'm sharing the bank account details. Please send me the receipt once you make the payment without fail.

Please find below bank details: You can make the transaction directly to the given account or make it via Western Union.

Bank Details:
Name
MANALI GUPTA
To Account
256010100095576
Bank Name
AXIS BANK
City
GUJARAT
Branch Location
PALANPUR, GUJRAT 

IFSC Code: UTIB0000256     

For Candidates in India:
You can make the payment via Tez (Google PAY) UPI also to this number: +91-9902233400. UPI: naveenanimation20@okicici OR Google IDnaveenanimation20@gmail.com


Note:

  • There will be 2 demo sessions. In case If you don't like the sessions or if you want to leave. Full Registration amount will be transferred back to you after 2 sessions.
  • After 2 demo sessions, pending amount must be paid.
  • I'll share the meeting id with URL to join the session before the training everyday.






    Course Content:

    Selenium WebDriver is a leading web automation testing tool in industry. It is one of the most popular tool. Selenium WebDriver jobs are on a rise and are highly paid and highly valued. Industry is shifting towards automation rapidly.

    Today, every start up, product based and service based companies need Automation QA Engineer to automate their web apps.

    With more and more applications becoming accessible through browser it becomes very important to learn Selenium WebDriver.
    This course is designed to teach in depth concepts of Selenium WebDriver 3 and Java. We focus on the basics first and then move towards the advance concepts of Selenium, Java and framework development.

    Part -1: Basics of Java & Selenium

    1) Automation : A brief introduction to automation and the need for automation. How automation will enable you to beat competition and make you get the better jobs in market.
    • What is Automation Testing
    • Use of automation Testing
    • Tools for Automation Testing
    • Why automation is important for you career?
    • What is Selenium
    • Advantage of Selenium
    • Introduction to WebDriver

    2) Core Java/Programming : This class will set you up for understanding Basic OOPs and java concepts. These concepts will be extremely important for you to become a good Automation tester. This section is specially designed so that can be followed by any Manual test very easily.
    • Data Types and Variables
    • String Class
    • Arithmetic Operators & Concatenation operators
    • Conditional & Decision Making
    • Single Dimensional Array
    • Loops (For, While)
    • Classes and Objects
    • Class Constructors
    • Functions in Java 
    • Function Input Parameters 
    • Function Return Types
    • Inheritance
    • Polymorphism
    • Method Overloading
    • Method Overriding
    • Abstract class
    • Interface
    • Super/This Keywords
    • Final/Finally/Finalize Keywords
    • Wrapper Classes
    • String Manipulation
    • Collections Basics (Array List, HashMap)
    • Interview Questions


    3) Eclipse IDE : This topic might seem little off place here but it’s very important topic to understand the tool you are using. Eclipse will the primary choice of development environment and we will discuss features of eclipse here.
    • How to use Eclipse
    • How to run, stop, pause
    • How to debug in Eclipse
    • Understanding console output
    • How to put a break point
    • How to add Watch variables
    • How to find errors from Problem window
    • Usage of step into and Step over debug functionality
    • Interview Questions

    4) Set up Eclipse : We will start with setting up WebDriver, so that every participant start flaunting off their newly learnt skills by writing some cool test programs:
    • Download and install java
    • Download and start Eclipse
    • Download and configure WebDriver java client
    • Set up a project
    • Create packages
    • Create a First Java test case
    • Import WebDriver Source file
    • Interview Questions


    5) WebDriver Interface : This topic will make you familiar with the concept of browsers in WebDriver and how to launch basic Firefox browser using WebDriver. Here we will also talk about WebDriver & WebElement interface which will enable us to answer many complicated Interview Questions about WebDriver Implementation.
    • Architecture of WebDriver
    • WebDriver Interface
    • WebElement Interface
    • Launching Firefox/Chrome/Safari
    • Interview Questions


    6) Browser & Navigation Commands : This is something which everybody do very first thing when they learn Selenium. Opening & closing of browser and some navigation function on top of it.
    • How to Open a URL
    • Verify Page title
    • Strategy to get the Page Source 
    • Difference between Close & Quit
    • Ways to Navigate Back & Forward
    • How to Refresh Page
    • Another way of Navigating to specific Page
    • Interview Questions


    7) WebElement Commands : An important and basic need of Selenium Automation. This part enables every participant to start writing automation test in their organizations. These are the most commonly used operations on any website.
    • Difference between FindElement & FindElements
    • Enter & Clear text from Input field
    • How Click action works differently on different elements
    • Managing Input fields, Buttons & Links
    • Finding all links on the Page
    • Extracting More than one object from a page 
    • Extracting Objects from a specific area of a web page 
    • Check if element is Present, Displayed, Enabled or Selected
    • Interview Questions


    8) Locators : In this class we will start learning about HTML, how elements are defined inside HTML document and what are the different attributes that are associated with an HTML element. We also try to find elements based on its attribute values.
    • What are locators
    • HTML Basics
    • HTML language tags and attributes 
    • ID, Name, Xpath, CSS etc
    • Difference between Absolute & Complete Xpath
    • Finding your first element
    • WebElement Commands
    • Interview Questions


    9) Element Identification : This part explains the lifesaver Add-Ons & tools for Selenium. Finding elements are the most common activity carried out in Selenium. These tools give us power to easily identify complex elements and help us in saving lot of time.
     Element Inspector in Mozilla, Chrome and IE
    • Element locator tool for FF
    • Various HTML locator strategies
    • XPath Helper Plug-in for Chrome
    • Selection of Effective XPath
    • Handling Dynamic objects/ids on the page
    • Interview Questions


    10) Tables, Checkboxes & Radio buttons : Many applications involve use of web tables and list boxes. These skills will help participant to get the expertise on complex tables structures and write effective automation test.
    • Identify table rows and columns
    • Extracting values from a cell
    • Dynamically Identify Tables Data
    • Select class in Selenium
    • Drop Down Handle
    • Select multiple values from the list
    • Select & Deselect operations by Index, Value & Visible Text
    • Interview Questions



    11) Selenium Waits, Alert & Switch Windows : A little complexity will start now onwards. To use Waits effective is very important for every automation tester. Wait helps us in switching windows, handling pop-ups, operating alerts correctly.
    • Implicit and Explicit waits
    • How to use Expected Conditions with Waits
    • PageLoadTimeout & SetScriptTimeout property
    • Simple use of Thread Sleep
    • Concept of Fluent Wait in Selenium 
    • Strategy to poll for an object
    • WebDriverWait and its uses 
    • Different WaitUntil Conditions 
    • Managing Ajax based components 
    • Ways to handle Simple, Confirmation & Prompt Alert
    • Concepts of Set Interface in Java 
    • Difference between Window Handle & Handles 
    • Switching & Closing Windows, Tabs & PopUps
    • Concept of window ID 
    • Extracting window IDs with Selenium Object reference
    • Interview Questions


    12) Action Class
    This gives us power on recently build Application with latest and complex object features. Hovering mouse or simulate Mouse and Keyword operations can be done by using Action Class. A necessary thing to learn in Selenium journey.
    • What is Action Class & What can we do with Action Class
    • Mouse Hover & Mouse Movement with Action
    • Finding Coordinates of a Web Object
    • Drag and Drop Action
    • Interview Questions




    13) Browser Profile: Different types of browser profiles and user authentication models with examples will be discussed in this class. You will need these to test secured websites and user authenticated websites.
    • What is Browser Profile
    • How to set up ChromeOptions and Firefox Options


    Part -2: Advanced Selenium


    14) TestNG Framework
    TestNG is a wonderful off the shelf framework that can be used directly to create your test framework. We will learn about this framework here.
    • What is TestNG
    • Benefits and Features of TestNG
    • How to download TestNG
    • Annotations in TestNg
    • How to run Test Suite in TestNG
    • Groups in TestNG
    • Depend On in TestNG
    • Test Case sequencing in TestNG
    • TestNG Reporters
    • TestNG Assets
    • TestNG Parameters
    • Multi Browser testing in TestNG
    • Parallel testing in TestNG
    • Interview Questions


    15) Automation Framework
    This class will cover the concepts of Frameworks. After this the participant would got to know that which type of Framework works best for their Application and the pros & cons of the selected framework. Knowledge of frameworks is key skill to learn.
    • What is Automation Framework
    • Features of Automation Framework
    • Benefits of using Automation Framework
    • Different types of Automation Framework
    • What is Data Driven Framework
    • What is Hybrid Framework
    • What is Page Object Model Design Pattern with Page Factory and Non Page Factory with OOP concepts
    • Interview Questions 

    16) Real Time Live PROJECT – Selenium Hybrid Framework (POM)
    In this class we will explore some major frameworks by looking at the code and understanding the key component of the framework. A demo website will be taken and framework will be built on top of that which will simulate actual project scenario.
    • Introduction and Component of Frameworks
    • Designing Test Data Provider (Excel)
    • Designing Run Data Provider (Text/Property file) 
    • Setting up Maven Build Tool
    • Data Provider Factory Design
    • Creating Page Objects & Object repository
    • Writing Test Script and Fetching Test Data
    • Designing Test Runner for Framework
    • Asserts, Test Fails & Error logging
    • Reporters, TestNG Listeners and Log file Generation
    • Running test with different Test Data
    • Generating the HTML reports 
    • Emailing test reports 
    • Interview Questions

    17) How to create project JARs (Generic Jars used by different teams)

    • Normal library JAR
    • Runnable JAR
    • Run JAR with Command Line Arguments
    • How to add generic JAR as a build path in your Java Project
    • How to add generic JAR as maven dependency in POM.xml in your Maven Project
    • How to create libraries with FAT Jars

    18). Selenium GRID

    • How to setup GRID Server locally
    • How to setup Nodes
    • How to make connection between GRID HUB and NODE
    19) Dev Ops & Continuous Integration
    • Jenkins Setup Basics
    • Running Script via Jenkins
    • Report Generation using Extent Report
    • GIT Repo/GIT HUB
    • GIT PULL Request Process
    • CheckIn-CheckOut Process
    • Push and Pull Commands
    • Learn how to use commit command
    • What is cloning in GIT
    • My First Code Check-in to GIT
    • Interview Questions

    20) Life Time Access on all recorded Videos, Free Code Repos, and Java Code
    21) Free Cucumber Videos only



    Some of the reviews from my previous batches candidates:









    Frequently Asked Questions:
    Q1: Can I get all the recordings for these sessions?
    Ans: Yes, you will get all the recordings daily basis for the specific topic.

    Q2: Is this training useful for freshers?

    Ans: 100% useful for freshers, who are looking for to start their career into automation QA field.

    Q3: Is this training useful for Manual Testers?

    Ans: 100% useful for Manual QA folks, it will surely help to trigger your interest from manual QA to Automation QA. After this training, you will become an expert in automation. 

    Q4: Can I justify my automation experience, after this training?

    Ans: Yes, training is designed like this only. You can easily justify 2+ yrs of exp in automation after this training.

    Q5: Can I crack selenium interviews after this training?

    Ans: Yes, 100% guarantee. 

    Q6: What is the duration of this course?

    Ans: I never compromise in training content and syllabus. It depends how exactly we are going with this training. Ideally it should take 6-7 weeks. It can take more than this also.

    Q7: Who will be the trainer?

    Ans: Only Naveen from Naveen AutomationLabs.

    Q8: Will this training be different from existing YouTube videos?

    Ans: Yes, it will be in-depth training and more topics will be covered with different scenarios.

    Q9: What if I miss any session?

    Ans: You will get each session recording daily basis. You can cover that session after watching the recordings. 

    Cheers~
    Naveen AutomationLabs




    Featured Post

    Advanced Selenium Webdriver Interview Questions and Answers in Java

    Advanced Selenium Webdriver Interview Questions and Answers in Java Selenium WebDriver - QA Here is the list of Selenium Inte...