Enviar pesquisa
Carregar
Gl qtp day 3 2
•
Transferir como PPT, PDF
•
0 gostou
•
281 visualizações
Pragya Rastogi
Seguir
Tecnologia
Vista de apresentação de diapositivos
Denunciar
Compartilhar
Vista de apresentação de diapositivos
Denunciar
Compartilhar
1 de 13
Baixar agora
Recomendados
Webinar: MongoDB Persistence with Java and Morphia
Webinar: MongoDB Persistence with Java and Morphia
MongoDB
REST/JSON/CoreData Example Code - A Tour
REST/JSON/CoreData Example Code - A Tour
Carl Brown
Entity Framework Core & Micro-Orms with Asp.Net Core
Entity Framework Core & Micro-Orms with Asp.Net Core
Stephane Belkheraz
Softshake - Offline applications
Softshake - Offline applications
jeromevdl
Cassandra Day Chicago 2015: Advanced Data Modeling
Cassandra Day Chicago 2015: Advanced Data Modeling
DataStax Academy
Python mongo db-training-europython-2011
Python mongo db-training-europython-2011
Andreas Jung
MongoDB-SESSION03
MongoDB-SESSION03
Jainul Musani
Moar tools for asynchrony!
Moar tools for asynchrony!
Joachim Bengtsson
Recomendados
Webinar: MongoDB Persistence with Java and Morphia
Webinar: MongoDB Persistence with Java and Morphia
MongoDB
REST/JSON/CoreData Example Code - A Tour
REST/JSON/CoreData Example Code - A Tour
Carl Brown
Entity Framework Core & Micro-Orms with Asp.Net Core
Entity Framework Core & Micro-Orms with Asp.Net Core
Stephane Belkheraz
Softshake - Offline applications
Softshake - Offline applications
jeromevdl
Cassandra Day Chicago 2015: Advanced Data Modeling
Cassandra Day Chicago 2015: Advanced Data Modeling
DataStax Academy
Python mongo db-training-europython-2011
Python mongo db-training-europython-2011
Andreas Jung
MongoDB-SESSION03
MongoDB-SESSION03
Jainul Musani
Moar tools for asynchrony!
Moar tools for asynchrony!
Joachim Bengtsson
Beginning icloud development - Cesare Rocchi - WhyMCA
Beginning icloud development - Cesare Rocchi - WhyMCA
Whymca
Getting Started with Datatsax .Net Driver
Getting Started with Datatsax .Net Driver
DataStax Academy
Building .NET Apps using Couchbase Lite
Building .NET Apps using Couchbase Lite
gramana
Realm: Building a mobile database
Realm: Building a mobile database
Christian Melchior
Mongo db勉強会20110730
Mongo db勉強会20110730
Akihiro Okuno
MongoDB + Java - Everything you need to know
MongoDB + Java - Everything you need to know
Norberto Leite
Rapid and Scalable Development with MongoDB, PyMongo, and Ming
Rapid and Scalable Development with MongoDB, PyMongo, and Ming
Rick Copeland
Getting started with Elasticsearch and .NET
Getting started with Elasticsearch and .NET
Tomas Jansson
Replacing Oracle with MongoDB for a templating application at the Bavarian go...
Replacing Oracle with MongoDB for a templating application at the Bavarian go...
Comsysto Reply GmbH
Qtp Imp Script Examples
Qtp Imp Script Examples
User1test
Green dao
Green dao
彥彬 洪
Neo4j GraphTour: Utilizing Powerful Extensions for Analytics and Operations
Neo4j GraphTour: Utilizing Powerful Extensions for Analytics and Operations
Mark Needham
Latinoware
Latinoware
kchodorow
ElasticSearch for .NET Developers
ElasticSearch for .NET Developers
Ben van Mol
Mythbusting: Understanding How We Measure the Performance of MongoDB
Mythbusting: Understanding How We Measure the Performance of MongoDB
MongoDB
Cassandra 3.0 - JSON at scale - StampedeCon 2015
Cassandra 3.0 - JSON at scale - StampedeCon 2015
StampedeCon
Indexing and Query Optimizer (Mongo Austin)
Indexing and Query Optimizer (Mongo Austin)
MongoDB
PostgreSQL Moscow Meetup - September 2014 - Oleg Bartunov and Alexander Korotkov
PostgreSQL Moscow Meetup - September 2014 - Oleg Bartunov and Alexander Korotkov
Nikolay Samokhvalov
greenDAO
greenDAO
Mu Chun Wang
Cassandra 2.2 & 3.0
Cassandra 2.2 & 3.0
Victor Coustenoble
18 octubre2007 borinbizkarra
18 octubre2007 borinbizkarra
HUGO ARAUJO
120 marketing-stats-charts-and-graphs
120 marketing-stats-charts-and-graphs
Consultora de Marketing Digital
Mais conteúdo relacionado
Mais procurados
Beginning icloud development - Cesare Rocchi - WhyMCA
Beginning icloud development - Cesare Rocchi - WhyMCA
Whymca
Getting Started with Datatsax .Net Driver
Getting Started with Datatsax .Net Driver
DataStax Academy
Building .NET Apps using Couchbase Lite
Building .NET Apps using Couchbase Lite
gramana
Realm: Building a mobile database
Realm: Building a mobile database
Christian Melchior
Mongo db勉強会20110730
Mongo db勉強会20110730
Akihiro Okuno
MongoDB + Java - Everything you need to know
MongoDB + Java - Everything you need to know
Norberto Leite
Rapid and Scalable Development with MongoDB, PyMongo, and Ming
Rapid and Scalable Development with MongoDB, PyMongo, and Ming
Rick Copeland
Getting started with Elasticsearch and .NET
Getting started with Elasticsearch and .NET
Tomas Jansson
Replacing Oracle with MongoDB for a templating application at the Bavarian go...
Replacing Oracle with MongoDB for a templating application at the Bavarian go...
Comsysto Reply GmbH
Qtp Imp Script Examples
Qtp Imp Script Examples
User1test
Green dao
Green dao
彥彬 洪
Neo4j GraphTour: Utilizing Powerful Extensions for Analytics and Operations
Neo4j GraphTour: Utilizing Powerful Extensions for Analytics and Operations
Mark Needham
Latinoware
Latinoware
kchodorow
ElasticSearch for .NET Developers
ElasticSearch for .NET Developers
Ben van Mol
Mythbusting: Understanding How We Measure the Performance of MongoDB
Mythbusting: Understanding How We Measure the Performance of MongoDB
MongoDB
Cassandra 3.0 - JSON at scale - StampedeCon 2015
Cassandra 3.0 - JSON at scale - StampedeCon 2015
StampedeCon
Indexing and Query Optimizer (Mongo Austin)
Indexing and Query Optimizer (Mongo Austin)
MongoDB
PostgreSQL Moscow Meetup - September 2014 - Oleg Bartunov and Alexander Korotkov
PostgreSQL Moscow Meetup - September 2014 - Oleg Bartunov and Alexander Korotkov
Nikolay Samokhvalov
greenDAO
greenDAO
Mu Chun Wang
Cassandra 2.2 & 3.0
Cassandra 2.2 & 3.0
Victor Coustenoble
Mais procurados
(20)
Beginning icloud development - Cesare Rocchi - WhyMCA
Beginning icloud development - Cesare Rocchi - WhyMCA
Getting Started with Datatsax .Net Driver
Getting Started with Datatsax .Net Driver
Building .NET Apps using Couchbase Lite
Building .NET Apps using Couchbase Lite
Realm: Building a mobile database
Realm: Building a mobile database
Mongo db勉強会20110730
Mongo db勉強会20110730
MongoDB + Java - Everything you need to know
MongoDB + Java - Everything you need to know
Rapid and Scalable Development with MongoDB, PyMongo, and Ming
Rapid and Scalable Development with MongoDB, PyMongo, and Ming
Getting started with Elasticsearch and .NET
Getting started with Elasticsearch and .NET
Replacing Oracle with MongoDB for a templating application at the Bavarian go...
Replacing Oracle with MongoDB for a templating application at the Bavarian go...
Qtp Imp Script Examples
Qtp Imp Script Examples
Green dao
Green dao
Neo4j GraphTour: Utilizing Powerful Extensions for Analytics and Operations
Neo4j GraphTour: Utilizing Powerful Extensions for Analytics and Operations
Latinoware
Latinoware
ElasticSearch for .NET Developers
ElasticSearch for .NET Developers
Mythbusting: Understanding How We Measure the Performance of MongoDB
Mythbusting: Understanding How We Measure the Performance of MongoDB
Cassandra 3.0 - JSON at scale - StampedeCon 2015
Cassandra 3.0 - JSON at scale - StampedeCon 2015
Indexing and Query Optimizer (Mongo Austin)
Indexing and Query Optimizer (Mongo Austin)
PostgreSQL Moscow Meetup - September 2014 - Oleg Bartunov and Alexander Korotkov
PostgreSQL Moscow Meetup - September 2014 - Oleg Bartunov and Alexander Korotkov
greenDAO
greenDAO
Cassandra 2.2 & 3.0
Cassandra 2.2 & 3.0
Destaque
18 octubre2007 borinbizkarra
18 octubre2007 borinbizkarra
HUGO ARAUJO
120 marketing-stats-charts-and-graphs
120 marketing-stats-charts-and-graphs
Consultora de Marketing Digital
Gl qtp day 1 & 2
Gl qtp day 1 & 2
Pragya Rastogi
70562-Dumps
70562-Dumps
Pragya Rastogi
70 433
70 433
Pragya Rastogi
32916
32916
Pragya Rastogi
Index Grey (1)
Index Grey (1)
ectprinting
A1
A1
retrogal
How to-segment-integrate-your-emails-fin
How to-segment-integrate-your-emails-fin
Consultora de Marketing Digital
Destaque
(9)
18 octubre2007 borinbizkarra
18 octubre2007 borinbizkarra
120 marketing-stats-charts-and-graphs
120 marketing-stats-charts-and-graphs
Gl qtp day 1 & 2
Gl qtp day 1 & 2
70562-Dumps
70562-Dumps
70 433
70 433
32916
32916
Index Grey (1)
Index Grey (1)
A1
A1
How to-segment-integrate-your-emails-fin
How to-segment-integrate-your-emails-fin
Semelhante a Gl qtp day 3 2
Qtp Training Deepti 4 Of 4493
Qtp Training Deepti 4 Of 4493
Azhar Satti
Jaffle: managing processes and log messages of multiple applicationsin devel...
Jaffle: managing processes and log messages of multiple applicationsin devel...
Masaki Yatsu
File and directories in python
File and directories in python
Lifna C.S
JS Essence
JS Essence
Uladzimir Piatryka
занятие8
занятие8
Oleg Parinov
Awesomeness of JavaScript…almost
Awesomeness of JavaScript…almost
Quinton Sheppard
Database training for developers
Database training for developers
Bhaveshkumar Thakkar
Apache ant
Apache ant
koniik
コードで学ぶドメイン駆動設計入門
コードで学ぶドメイン駆動設計入門
潤一 加藤
What is new in CFEngine 3.6
What is new in CFEngine 3.6
RUDDER
What is new in CFEngine 3.6
What is new in CFEngine 3.6
Jonathan Clarke
Apachepoitutorial
Apachepoitutorial
Srikrishna k
Files and streams
Files and streams
Pranali Chaudhari
JSLT: JSON querying and transformation
JSLT: JSON querying and transformation
Lars Marius Garshol
Object Oriented Programming in JavaScript
Object Oriented Programming in JavaScript
zand3rs
Apache poi tutorial
Apache poi tutorial
Ramakrishna kapa
File mangement
File mangement
Jigarthacker
Enjoy Munit with Mule
Enjoy Munit with Mule
Bui Kiet
Accelerating Data Ingestion with Databricks Autoloader
Accelerating Data Ingestion with Databricks Autoloader
Databricks
WorkFlow: An Inquiry Into Productivity by Timothy Bolton
WorkFlow: An Inquiry Into Productivity by Timothy Bolton
Miva
Semelhante a Gl qtp day 3 2
(20)
Qtp Training Deepti 4 Of 4493
Qtp Training Deepti 4 Of 4493
Jaffle: managing processes and log messages of multiple applicationsin devel...
Jaffle: managing processes and log messages of multiple applicationsin devel...
File and directories in python
File and directories in python
JS Essence
JS Essence
занятие8
занятие8
Awesomeness of JavaScript…almost
Awesomeness of JavaScript…almost
Database training for developers
Database training for developers
Apache ant
Apache ant
コードで学ぶドメイン駆動設計入門
コードで学ぶドメイン駆動設計入門
What is new in CFEngine 3.6
What is new in CFEngine 3.6
What is new in CFEngine 3.6
What is new in CFEngine 3.6
Apachepoitutorial
Apachepoitutorial
Files and streams
Files and streams
JSLT: JSON querying and transformation
JSLT: JSON querying and transformation
Object Oriented Programming in JavaScript
Object Oriented Programming in JavaScript
Apache poi tutorial
Apache poi tutorial
File mangement
File mangement
Enjoy Munit with Mule
Enjoy Munit with Mule
Accelerating Data Ingestion with Databricks Autoloader
Accelerating Data Ingestion with Databricks Autoloader
WorkFlow: An Inquiry Into Productivity by Timothy Bolton
WorkFlow: An Inquiry Into Productivity by Timothy Bolton
Mais de Pragya Rastogi
Gl android platform
Gl android platform
Pragya Rastogi
Qtp questions
Qtp questions
Pragya Rastogi
Qtp not just for gui anymore
Qtp not just for gui anymore
Pragya Rastogi
Qtp tutorial
Qtp tutorial
Pragya Rastogi
Qtp4 bpt
Qtp4 bpt
Pragya Rastogi
Get ro property outputting value
Get ro property outputting value
Pragya Rastogi
Bp ttutorial
Bp ttutorial
Pragya Rastogi
Gl istqb testing fundamentals
Gl istqb testing fundamentals
Pragya Rastogi
Gl scrum testing_models
Gl scrum testing_models
Pragya Rastogi
My Sql concepts
My Sql concepts
Pragya Rastogi
Oops
Oops
Pragya Rastogi
Java programming basics
Java programming basics
Pragya Rastogi
70433 Dumps DB
70433 Dumps DB
Pragya Rastogi
70562 (1)
70562 (1)
Pragya Rastogi
70 562
70 562
Pragya Rastogi
Mobile testingartifacts
Mobile testingartifacts
Pragya Rastogi
GL_Web application testing using selenium
GL_Web application testing using selenium
Pragya Rastogi
Gl qtp day 3 1
Gl qtp day 3 1
Pragya Rastogi
Mais de Pragya Rastogi
(18)
Gl android platform
Gl android platform
Qtp questions
Qtp questions
Qtp not just for gui anymore
Qtp not just for gui anymore
Qtp tutorial
Qtp tutorial
Qtp4 bpt
Qtp4 bpt
Get ro property outputting value
Get ro property outputting value
Bp ttutorial
Bp ttutorial
Gl istqb testing fundamentals
Gl istqb testing fundamentals
Gl scrum testing_models
Gl scrum testing_models
My Sql concepts
My Sql concepts
Oops
Oops
Java programming basics
Java programming basics
70433 Dumps DB
70433 Dumps DB
70562 (1)
70562 (1)
70 562
70 562
Mobile testingartifacts
Mobile testingartifacts
GL_Web application testing using selenium
GL_Web application testing using selenium
Gl qtp day 3 1
Gl qtp day 3 1
Último
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
Michael W. Hawkins
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
2toLead Limited
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
ThousandEyes
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
Delhi Call girls
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
Padma Pradeep
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
OnBoard
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
ThousandEyes
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
shyamraj55
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Alan Dix
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
HampshireHUG
Key Features Of Token Development (1).pptx
Key Features Of Token Development (1).pptx
LBM Solutions
Slack Application Development 101 Slides
Slack Application Development 101 Slides
praypatel2
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Safe Software
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
Paola De la Torre
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
Mark Billinghurst
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
Safe Software
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
BookNet Canada
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
Pixlogix Infotech
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
Allon Mureinik
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
Scott Keck-Warren
Último
(20)
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
Key Features Of Token Development (1).pptx
Key Features Of Token Development (1).pptx
Slack Application Development 101 Slides
Slack Application Development 101 Slides
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
Gl qtp day 3 2
1.
QTP Utility Functions
– File Operations File Creation 3. CreateFile "C:","mytextfile.txt","hi how are you?" 4. Public Function CreateFile(filpath,filname,filcontent) 5. xml_file = filpath & "" & filname 6. Dim fileobject, tf 7. Set fileobject = CreateObject("Scripting.FileSystemObject") 8. Set tf = fileobject.CreateTextFile(xml_file, True) 9. tf.Write (filcontent) 10. tf.Close 11. End Function 1 © Copyright GlobalLogic 2008
2.
QTP Utility Functions
– File Operations • dim oFSO • ' creating the file system object • set oFSO = CreateObject ("Scripting.FileSystemObject") • • 'Option Explicit • ' ********************************************************************************************* • ' Create a new txt file • • ' Parameters: • ' FilePath - location of the file and its name • ' ********************************************************************************************* • Function CreateFile (FilePath) • ' varibale that will hold the new file object • dim NewFile • ' create the new text ile • set NewFile = oFSO.CreateTextFile(FilePath, True) • set CreateFile = NewFile • End Function • • ' ********************************************************************************************* • ' Check if a specific file exist • • ' Parameters: • ' FilePath - location of the file and its name • ' ********************************************************************************************* 2 © Copyright GlobalLogic 2008
3.
QTP Utility Functions
– File Operations • Function CheckFileExists (FilePath) • ' check if file exist • CheckFileExists = oFSO.FileExists(FilePath) • End Function • • ' ********************************************************************************************* • ' Write data to file • • ' Parameters: • ' FileRef - reference to the file • ' str - data to be written to the file • ' ********************************************************************************************* • Function WriteToFile (byref FileRef,str) • ' write str to the text file • FileRef.WriteLine(str) • End Function • • ' ********************************************************************************************* • ' Read line from file • • ' Parameters: • ' FileRef - reference to the file • ' ********************************************************************************************* 3 © Copyright GlobalLogic 2008
4.
QTP Utility Functions
– File Operations • Function ReadLineFromFile (byref FileRef) • ' read line from text file • ReadLineFromFile = FileRef.ReadLine • End Function • • ' ********************************************************************************************* • ' Closes an open file. • ' Parameters: • ' FileRef - reference to the file • ' ********************************************************************************************* • Function CloseFile (byref FileRef) • FileRef.close • End Function • • '********************************************************************************************* • ' Opens a specified file and returns an object that can be used to • ' read from, write to, or append to the file. • • ' Parameters: • ' FilePath - location of the file and its name • ' mode options are: • ' ForReading - 1 • ' ForWriting - 2 • ' ForAppending - 8 • ' ********************************************************************************************* 4 © Copyright GlobalLogic 2008
5.
QTP Utility Functions
– File Operations • ' ********************************************************************************************* • Function OpenFile (FilePath,mode) • ' open the txt file and retunr the File object • set OpenFile = oFSO.OpenTextFile(FilePath, mode, True) • End Function • • ' ********************************************************************************************* • ' Copy a File • ' Parameters: • ' FilePathSource - location of the source file and its name • ' FilePathDest - location of the destination file and its name • ' ********************************************************************************************* • Sub FileCopy ( FilePathSource,FilePathDest) • ' copy source file to destination file • oFSO.CopyFile FilePathSource, FilePathDest • End Sub • • ' ********************************************************************************************* • ' Delete a file. • • ' Parameters: • ' FilePath - location of the file to be deleted • ' ********************************************************************************************* • Sub FileDelete ( FilePath) • ' copy source file to destination file • oFSO.DeleteFile ( FilePath) • End Sub 5 © Copyright GlobalLogic 2008
6.
QTP Utility Functions
– File Operations • ' ************** Example of calling the file functions ********************** • FilePath1 = "D:tempFSOtxt1.txt" • FilePath2 = "D:tempFSOtxt2.txt" • FilePathDiff = "D:tempFSOtxt_diff.txt" • • FilePath = "D:tempFSOtxt.txt" • • set fold = FolderCreate ( "D:tempFSOnew") • set f = OpenFile(FilePath,8) • ' = WriteToFile(f,"test line") • d = CloseFile(f) • set f = CreateFile(FilePath) • • Fexist= CheckFileExists(FilePath) • d = WriteToFile(f,"first line") • d = WriteToFile(f,"second line") • d = CloseFile(f) • FileCopy "D:tempFSOtxt.txt","D:tempFSOtxt1.txt" • FileDelete "D:tempFSOtxt1.txt" 6 © Copyright GlobalLogic 2008
7.
QTP Utility Functions
– Excel Sheet Operations • Function ReadExcelData(xlFile, sheetName, columnName, rowNum) • • ' Initializing the variables • varSheetName = sheetName • varColumnName = columnName • varRowNum = rowNum • • Set objExcel = CreateObject("Excel.Application") • objExcel.WorkBooks.Open xlFile • Set objSheet = objExcel.ActiveWorkbook.Worksheets(varSheetName) • rows = objSheet.Range("A1").CurrentRegion.Rows.Count • columns = objSheet.Range("A1").CurrentRegion.Columns.Count • For currCol = 1 to columns • If objSheet.Cells(1,currCol).Value = varColumnName then • ReadExcelData = objSheet.Cells(varRowNum+1,currCol).Value • currCol = columns • end if • Next • • objExcel.ActiveWorkbook.Close • objExcel.Application.Quit • Set objSheet = nothing • Set objExcel = nothing • End Function 7 © Copyright GlobalLogic 2008
8.
QTP Utility Functions
– Email Operations • SendMail “rajat.gupta@globallogic.com","hi","how r u","" • Function SendMail(SendTo, Subject, Body, Attachment) • Set ol=CreateObject("Outlook.Application") • Set Mail=ol.CreateItem(0) • Mail.to=SendTo • Mail.Subject=Subject • Mail.Body=Body • If (Attachment <> "") Then • Mail.Attachments.Add(Attachment) • End If • Mail.Send • ol.Quit • Set Mail = Nothing • Set ol = Nothing • End Function 8 © Copyright GlobalLogic 2008
9.
QTP Utility Functions
– Timed Msg-Box • MsgBoxTimeout (“Sample Text”,”Timed MsgBox”, 10) • Public Sub MsgBoxTimeout (Text, Title, TimeOut) Set WshShell = CreateObject("WScript.Shell") WshShell.Popup Text, TimeOut, Title • End Sub 9 © Copyright GlobalLogic 2008
10.
QTP Utility Functions
– Keystroke Functions • 'An example that presses a key using DeviceReplay. • Set obj = CreateObject("Mercury.DeviceReplay") • Window("Notepad").Activate • obj.PressKey 63 10 © Copyright GlobalLogic 2008
11.
QTP Utility Functions
– keyboard Values 11 © Copyright GlobalLogic 2008
12.
QTP Utility Functions
– System Operations • Running and Closing Applications Programmatically • Syntax: • SystemUtil.Run “file, [params], [dir] “ • Example: • SystemUtil.Run “notepad.exe myfile.txt “ 12 © Copyright GlobalLogic 2008
13.
QTP Utility Functions
– Clipboard Objects The object has the same methods as the Clipboard object available in Visual Basic: Clear GetData GetFormat GetText SetData SetText • Set cb = CreateObject("Mercury.Clipboard") cb.Clear cb.SetText "TEST" MsgBox cb.GetText 13 © Copyright GlobalLogic 2008
Baixar agora