TestNG Annotations

 

TestNG_Annotations_ChandrasekharNaiduMuttineni

TestNG Annotations and their usage with examples.

Thank You.

CHANDRASEKHAR NAIDU MUTTINENI

Mail: chandu.saraswathi@gmail.com

Blog: https://techpresentations.wordpress.com/

          https://hack8d.wordpress.com/

 

 

VMWare’s Hyperic HQ APM solution – Analysis

Analysis on VMWare’s Hyperic HQ product for monitoring applications and server (APM) solutionHyperic HQ_CHANDRASEKHAR_NAIDU_MUTTINENI

 

By:

CHANDRASEKHAR NAIDU MUTTINENI

Mail: chandu.saraswathi@gmail.com

Blog: https://techpresentations.wordpress.com/

          https://hack8d.wordpress.com/

 

Naukri.py

Login to Naukri and search for the QA Automation and send the links in email to a specified email. Change the email address and password before running.

Code Below:

===========

 

#!/usr/bin/env python

“””NaukriTest.py: A python program using selenium webdriver to drive the automation of the following web page interactions :
Open the browser and login to naukri using a valid accountButton
Search for relevant job using search text ‘QA Testing’
Get all the available job links and signout of Naukri portal
Login to Gmail and send a mail to a friend’s email ID with all the links in the body of the mail
Logout from Gmail and close the browser
“””

__author__ = “ChaM”
__copyright__ = “Copyright 2016”
__license__ = “”
__version__ = “0.0.0.1”
__maintainer__ = “ChaM”
__email__ = “cmuttineni@novell.com”
__status__ = “Evaluation”
“””
__seliniumversion__ = “2.48.0”
_pythonversion__ = “2.7.10”

“””

from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
import string
from selenium.webdriver.support.ui import Select
import smtplib

browser = webdriver.Firefox()
browser.get(“https://login.naukri.com/nLogin/Login.php?msg=0&URL=http%3A%2F%2Fmy.naukri.com”)
time.sleep(10)
browser.maximize_window()

username = browser.find_element_by_id(“emailTxt”)
password = browser.find_element_by_id(“pwd1”)
username.click()
username.send_keys(“yourRealEmail@gmail.com”)
time.sleep(2)

password.click()
password.send_keys(“yourRealPassword”)
time.sleep(2)
LOGIN_BUTTON_XPATH = ‘//input[@type=”submit” and @name=”Login”]’

login = browser.find_element_by_xpath(LOGIN_BUTTON_XPATH)
login.click()
time.sleep(10)

JOB_SEARCH_XPATH = ‘//a[@title=”Search Jobs” and @target=”_blank”]’

jobSearch = browser.find_element_by_xpath(JOB_SEARCH_XPATH)
jobSearch.click()
time.sleep(2)

window_before = browser.window_handles[0]
window_after = browser.window_handles[1]
browser.switch_to_window(window_after)
browser.maximize_window()
time.sleep(4)
#winHandleBefore = browser.getWindowHandle()

#for(winHandle : browser.getWindowHandles()){
# browser.switchTo().window(winHandle)
#}
#browser.switchTo().window(browser.getWindowHandles())

SKILL_XPATH = ‘//input[@type=”text” and @placeholder=”Skills, Designations, Companies”]’
skill = browser.find_element_by_xpath(SKILL_XPATH)

skill.click()
time.sleep(1)
skill.send_keys(“QA Testing”)
time.sleep(1)

LOCATION_XPATH = ‘//input[@type=”text” and @placeholder=”Location”]’
location = browser.find_element_by_xpath(LOCATION_XPATH)
location.click()
time.sleep(1)
location.send_keys(“Bangalore”)
time.sleep(1)

SEARCH_BUTTON_XPATH = ‘//button[@type=”submit” and @id=”qsbFormBtn”]’
searchButton = browser.find_element_by_xpath(SEARCH_BUTTON_XPATH)
searchButton.click()
time.sleep(5)

link_name=browser.find_elements_by_xpath(“//a[@class=’content’ and @target=’_blank’]”)
time.sleep(10)
list1 = []
for link in link_name:
strLink = link.get_attribute(‘href’)
list1.append(strLink)

##myNaukri=browser.find_elements_by_xpath(“//a[@href=’http://my.naukri.com/HomePage/view’ and @target=’_blank’]”)
###myNaukri.send_keys(“”)
##builder = Actions(browser)
##builder.moveToElement(myNaukri).build().perform()
##time.sleep(1)

browser.get(“https://login.naukri.com/nLogin/Logout.php”)

time.sleep(5)

browser.quit()
time.sleep(1)

#SEND MAIL

browser = webdriver.Firefox()
time.sleep(4)
browser.maximize_window()
browser.get(“http://mail.google.com”)
time.sleep(7)

emailid=browser.find_element_by_id(“Email”)
emailid.send_keys(“yourRealEmail”)
emailid.submit()
time.sleep(2)

passw=browser.find_element_by_id(“Passwd”)
passw.send_keys(“yourRealPassword”)
time.sleep(1)

SIGNIN_BUTTON_XPATH = ‘//input[@type=”submit” and @name=”signIn”]’
signin = browser.find_element_by_xpath(SIGNIN_BUTTON_XPATH)
##signin=browser.find_element_by_id(“signIn”)
signin.submit()

time.sleep(15)

COMPOSE_BUTTON_XPATH = ‘//div[@class=”T-I J-J5-Ji T-I-KE L3″ and @role=”button”]’
compose = browser.find_element_by_xpath(COMPOSE_BUTTON_XPATH)
compose.click()
time.sleep(2)

RECIPIENTS_TEXT_XPATH = ‘//textarea[@name=”to” and @role=”combobox”]’
toList = browser.find_element_by_xpath(RECIPIENTS_TEXT_XPATH)

toList.click()
time.sleep(1)
toList.send_keys(“chandu.saraswathi@gmail.com”)

SUBJECT_TEXT_XPATH = ‘//input[@name=”subjectbox” and @class=”aoT”]’
subjectText = browser.find_element_by_xpath(SUBJECT_TEXT_XPATH)

subjectText.click()
time.sleep(1)
subjectText.send_keys(“Naukri Job URLs for ‘QA Testing’ “)
time.sleep(1)

MAIL_BODY_XPATH = ‘//div[@aria-label=”Message Body” and @role=”textbox”]’
bodyText = browser.find_element_by_xpath(MAIL_BODY_XPATH)
bodyText.click()
time.sleep(1)

bodyText.send_keys(“The Job URLs for the search text ‘QA Testing’ are as follows”)
bodyText.send_keys(Keys.ENTER)
bodyText.send_keys(Keys.ENTER)
for link2 in list1:
bodyText.send_keys(link2)
bodyText.send_keys(Keys.ENTER)
bodyText.send_keys(Keys.ENTER)
bodyText.send_keys(Keys.ENTER)
bodyText.send_keys(“Thank You”)
bodyText.send_keys(Keys.ENTER)
bodyText.send_keys(“–“)
bodyText.send_keys(Keys.ENTER)
bodyText.send_keys(“ChaM”)

time.sleep(2)

SEND_XPATH = ‘//div[@class=”T-I J-J5-Ji aoO T-I-atl L3″ and @role=”button”]’
sendButton = browser.find_element_by_xpath(SEND_XPATH)
sendButton.click()
time.sleep(4)

ACCOUNT_XPATH = ‘//a[@class=”gb_b gb_4a gb_R” and @tabindex=”0″]’
accountButton = browser.find_element_by_xpath(ACCOUNT_XPATH)
accountButton.click()
time.sleep(1)

SIGNOUT_XPATH = ‘//a[@class=”gb_Ca gb_Xd gb_5d gb_nb” and @target=”_top”]’
signoutButton = browser.find_element_by_xpath(SIGNOUT_XPATH)
signoutButton.click()
time.sleep(10)
browser.quit()

##END OF THE CODE

TDD(Test Driven Development) Automation Framework with TestNG for Java

Test Driven Development (TDD) AUTOMATION FRAMEWORK for Java programming using TestNG

This presentation provides the basic overview on TDD Automation approach and the TestNG Framework.

TDD Automation Framework_CHANDRASEKHAR_NAIDU_MUTTINENI

 

By:

CHANDRASEKHAR NAIDU MUTTINENI

Mail: chandu.saraswathi@gmail.com

Blog: https://techpresentations.wordpress.com/

          https://hack8d.wordpress.com/

NETWORK ADDRESS TRANSLATION Presentation ppt

Network Address Translation NAT_TechPresentations.wordpress.com

Hi:

     This presentation has all the details on the following topics related to Network Address Translation(NAT) and Port Address Translation(PAT).

—Types of IP Addresses (Public/Private Addresses)

—Introduction to NAT Network Address Translation

Introduction to PAT Port Address Translation

Types of Address Translations 

Security Considerations

Thank You. 

CHANDRASEKHAR NAIDU MUTTINENI

Mail: chandu.saraswathi@gmail.com

Blog: https://techpresentations.wordpress.com/

          https://hack8d.wordpress.com/

OVERVIEW OF ENCRYPTION presentation ppt

Encryption_Overview_TechPresentations.wordpress.com.ppt

This presentation has all the details on the following topics related to encryption.

  • Cryptology and its History
  • Types of Ciphers
  • What is Encryption and types of Encryption
  • Types of Encryption Algorithms
  • Symmetric and Asymmetric Algorithms
  • Choosing Encryption algorithms
  • Complexity Comparison
  • Hashing explained
  • Key management
  • TLS Model
  • Advanced Encryption System (AES-256) explained

This can be used as is for anyone who is new to encryption concepts and would like to learn.

Thank You.

CHANDRASEKHAR NAIDU MUTTINENI

Mail: chandu.saraswathi@gmail.com

Blog: https://techpresentations.wordpress.com/

          https://hack8d.wordpress.com/