SDET- QA Automation Techie

Software Testing Blog

  • Home
  • Training
    • Online
    • Self-Paced
  • Video Tutorials
  • Interview Skills
    • HR Interview Questions Videos
    • Domain Knowledge
  • Career Guidance
  • Home
  • Software Testing
    • Manual Testing Tutorials
    • Manual Testing Project
    • Manaul Testing FAQS
    • ISTQB
    • AGILE
  • Web Automation Testing
    • Java Programmng
    • Python Programmng
    • Selenium with Java
    • Selenium with Python
    • Robot Framework(Selenium with Python)
    • selenium with Cucumber
    • TestNG+IntelliJ
    • Mobile App Testing(Appium)
    • JMeter
  • API Automation Testing
    • Rest Assured API Testing (BDD)
    • Rest Assured API Testing (Java+ TestNG)
    • Robot Framework(Rest API Testing with Python)
    • Postman
    • SoapUI
    • API Testing(FAQ's)
  • SDET|DevOps
    • Continuos Integration
    • SDET Essentials
    • AWS For Testers
    • Docker
  • SQL
    • Oracle(SQL)
    • MySQL for Testers
    • NoSQL
  • Unix/Linux
    • UNIX TUTORIALS
    • Linux Shell Scripting
  • ETL Testing
    • ETL Data warehouse Tutorial
    • ETL Concepts Tools and Templates
    • ETL Testing FAQ's
    • ETL Testing Videos
  • Big Data Hadoop
  • Video Tutorials
  • ApachePOI Video Tutorials
  • Downloads
    • E-Books for Professionals
    • Resumes
  • Automation Essencials
    • Cloud Technologies
      • Docker For Testers
      • AWS For Testers
      • Sub Child Category 3
    • Java Collections
    • Selenium Locators
    • Frequently Asked Java Programs
    • Frequently Asked Python Programs
    • Protractor
    • Cypress Web Automation

UFT-GUI Objects

 Automation, Descriptive Programming, Frameworks, QTP, UFT   

Working with GUI Objects:

There are various GUI objects with which QTP interacts during the script execution. Hence it is important to know the basic methods for the key GUI objects using which we will be able to work on it effectively.

Working with Text Box

Below are the methods using which we access text box during Run Time.
  • Set - Helps the tester to Set Values into the Text Box
  • Click - Clicks on the Text Box
  • SetSecure - Used to set the text in the password boxes securely.
  • WaitProperty - Waits Till the Property value becomes true.
  • Exist - Checks for the existance of the Text Box
  • GetROProperty("text") - Gets the Value of the Text Box
  • GetROProperty("Visible") - Returns a Boolean value if visible.

EXAMPLE:

Browser("Math Calculator").Sync
Set Obj = Browser("Math Calculator").Page("SQR Calc").WebEdit("n")
'Clicks on the Text Box
Obj.Click

'Verify if the Object Exist - Returns Boolean value
a= obj.Exist
print a
'Set the value
obj.Set "10000" : wait(2)

'Get the Runtime Object Property - Value of the Text Box
val = obj.GetROProperty("value")
print val
'Get the Run Time Object Property - Visiblility - Returns Boolean Value
x= Obj.GetROProperty("visible")
print x

Working with Check Box

Following are some of the key methods with which one can work with Check Box.
  • Set - Helps the tester to Set the checkbox value "ON" or "OFF"
  • Click - Clicks on the check Box. Even checks ON or OFF but user won't be sure about the status.
  • WaitProperty - Waits Till the Property value becomes true.
  • Exist - Checks for the existance of the Check Box
  • GetROProperty("name") - Gets the Name of the check Box
  • GetROProperty("Visible") - Returns a Boolean value if visible

EXAMPLE:

'To Check the Check Box
Set Obj = Browser("Calculator").Page("Gmail").WebCheckBox("PersistentCookie")
Obj.Set "ON"

'To UnCheck the Check Box
Obj.Set "OFF"
'Verifies the Existance of the Check box and returns Boolean Value
val = Obj.Exist
print val

'Fetches the Name of the CheckBox
a= Obj.GetROProperty("name")
print a
'Verifies the visible property and returns the boolean value.
x = Obj.GetROProperty("visible")
print x

Working with Radio Button

Following are some of the key methods with which one can work with Radio Button.
  • Select(RadioButtonName) - Helps the tester to Set the Radio Box "ON"
  • Click - Clicks on the Radio Button. Even Radio Button ON or OFF but tester can't get the status.
  • WaitProperty - Waits Till the Property value becomes true.
  • Exist - Checks for the existance of the Radio Button
  • GetROProperty("name") - Gets the Name of the Radio Button
  • GetROProperty("Visible") - Returns a Boolean value if visible

EXAMPLE:

'Select the Radio Button by name "YES"
Set Obj = Browser("Calculator").Page("Forms").WebRadioGroup("group1")
Obj.Select("Yes")

'Verifies the Existance of the Radio Button and returns Boolean Value
val = Obj.Exist
print val
'Returns the Outerhtml of the Radio Button
txt = Obj.GetROProperty("outerhtml")
print text

'Returns the boolean value if Radio button is Visible.
vis = Obj.GetROProperty("visible")
print vis

Working with Combo Box

Following are some of the key methods with which one can work with Combo Box.
  • Select(Value) - Helps the tester to Select the value from the ComboBox
  • Click - Clicks on the object.
  • WaitProperty - Waits Till the Property value becomes true.
  • Exist - Checks for the existance of the Combo Box
  • GetROProperty("Text") - Gets the Selected Value of the Combo Box
  • GetROProperty("all items") - Returns all the items in the combo Box
  • GetROProperty("items count") - Returns the number of items in the combo Box

EXAMPLE:

'Get the List of all the Items from the ComboBox
Set ObjList = Browser("Math Calculator").Page("Statistics").WebList("class")
x = ObjList.GetROProperty("all items")
print x

'Get the Number of Items from the Combo Box
y = ObjList.GetROProperty("items count")
print y
'Get the text value of the Selected Item
z = ObjList.GetROProperty("text")
print z

Working with Buttons

Following are some of the key methods with which one can work with Buttons.
  • Click - Clicks on the Button.
  • WaitProperty - Waits Till the Property value becomes true.
  • Exist - Checks for the existance of the Button
  • GetROProperty("Name") - Gets the Name of the Button
  • GetROProperty("Disabled") - Returns a boolean value if enabled/disabled

EXAMPLE:

'To Perform a Click on the Button
Set obj_Button = Browser("Math Calculator").Page("SQR").WebButton("Calc")
obj_Button.Click

'To Perform a Middle Click on the Button
obj_Button.MiddleClick
'To check if the button is enabled or disabled.Returns Boolean Value
x = obj_Button.GetROProperty("disabled")
print x

'To fetch the Name of the Button
y = obj_Button.GetROProperty("name")
print y

Working with webTables

In Today's web based application, webtables have become very common and testers need to understand how Web Tables work and how to perform an action on web Tables. This Topic will help you to work with the web Tables Effectively.
Sample Web Table
  • html id - If the table has an id tag then it is best to make use of this property.
  • innerText - Heading of the Table.
  • sourceIndex - Fetches the Source Index of the Table
  • ChildItemCount - Gets the number of ChildItems present in specified Row
  • RowCount - Gets the number of Rows in the Table
  • ColumnCount - Gets the number of Columns in the Table
  • GetcellData - Gets the Value of the Cell based on the column and Row Index

EXAMPLE:

Browser("Tutorials Point").Sync
' WebTable 
Obj = Browser("Tutorials Point").Page("VBScript Decisions").WebTable("Statement")
' Fetch RowCount
x = Obj.RowCount
print x
' Fetch ColumnCount
y = Obj.ColumnCount(1)
print y

' Print the Cell Data of the Table
For i = 1 To x Step 1
 For j = 1 To y Step 1
       z = Obj.GetCellData(i,j)
       print "Row ID : " & i & " Column ID : " & j & " Value : " & z
 Next
Next
'Fetch the Child Item count of Type Link in a particular Cell
z = Obj.ChildItemCount(2,1,"Link")
print z
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg
Email ThisBlogThis!Share to TwitterShare to Facebook
Newer Post Older Post Home
popup

Popular Posts

  • How To Explain Project In Interview Freshers and Experienced
    “ Describe an important project you’ve worked on ” is one of the most common questions you can expect in an interview. The purpose of a...
  • MANUAL TESTING REAL TIME INTERVIEW QUESTIONS & ANSWERS
    1. How will you receive the project requirements? A. The finalized SRS will be placed in a project repository; we will access it fr...
  • API/Webservices Testing using RestAssured (Part 1)
    Rest Assured : Is an API designed for automating REST services/Rest API's Pre-Requisites Java Free videos: https://www.you...

Facebook Page

Pages

  • Home
  • Resumes
  • Job Websites India/UK/US
  • ISTQB
  • Selenium with Java
  • E-Books for Professionals
  • Manual Testing Tutorials
  • Agile Methodology
  • Manual Testing Projects

Live Traffic

YouTube


Blog Visitors

Copyright © SDET- QA Automation Techie | Powered by Blogger
Design by SDET | Blogger Theme by | Distributed By Gooyaabi Templates