Can we add the function library directly from scripting in
qtp instead of adding from resource tab?
Answers were Sorted based on User's Feedback
Answer / nath .t
Sorry for the small mistake in the above answer.
Set qtApp = CreateObject("QuickTest.Application")
qtApp.Launch
qtApp.Visible = True
qtApp.Open "C:\Tests\Test1", False, False
qtApp.Test.Settings.Resources.Libraries.Add "e:\Utils.vbs"
| Is This Answer Correct ? | 8 Yes | 2 No |
Answer / nath .t
through script we can do
executefile "give the path"
Ex: executefile "d:\functionlibrary.vbs"
another way we can add to our script is AOM(Automated
object model)
first of all create Quick Test object than we can add with
that object.
Ex:
qtApp.Test.Settings.Resources.Add "Path of the library file"
like this we can add.
| Is This Answer Correct ? | 5 Yes | 1 No |
Executefile "filepath.qfl" (we can do with qfl,vbs,txt extensions in this method)
loadfunctionlibrary "filepath.qfl" (we can do only qfl extension in this method)
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / mohit
Naren,
Seems like u need to learn that adding a library and executing a library are two different tasks. In a laymen language, (that u seems to b more suitable for u) the difference is exactly what is in between loading a gun with bullets and firing the bullets. If u add something to ur resources, u may or may not use it in future. But when u execute something.. u command the control to execute it then and there without knowing even it is needed or not. So come prepared next time when u post something. Gud Day!
| Is This Answer Correct ? | 0 Yes | 3 No |
Answer / naren
Hi Nath,
Please understand the questions first no hurry. Execute File
is the correct answer then again what is the need for adding
OR through scripting. Function Library means user defined
function(x.vbs) so Execute file is enough. The question does
not ask about adding Object Repository through scripting.
| Is This Answer Correct ? | 1 Yes | 10 No |
If there are 100 checkboes in a page then how can we select all chexkboxes at once through descriptive programing in QTP using vb script. Please send the answers...
Should have experience in framework means?
Explain advantages and disadvantages of ddf?
i am trying to automate yatra.com,in that site, when i go to automate the Leaving from field showing as a WEBEDIT, but when i enter 1 or 2 char, it displaying dropdownlist, i try to use keyboard automation to select the item from that list but it is not possible, can anybody help he. Thans for posting the Answer
What are the different types of action?
Why QTP is termed as a Record and Playback tool?
What is Version control?
Hai anyone please "Explain about Framework in QTP?"
how do find current links in webpage for ex: in yahoowebsite today mainpage is having 50 links and next day same page is having 60 links. if i run same programe it should display total links in webpage ?
what is difference between Mandatrary proparties and Assistive proparties? Explain
How to do the Mouse Operations in QTP. How to aacess an Image in a web application to save it on my desktop. To my Knwoledge that can be done by mouse right click on the Image and selecting 'Save the Image'option. Or Is there any alternate way to do this..
Hi friends I need to know about jubula automation tool. Is anybody know in bangalore where jubula tanning class is going on do let me know. Its urgent for me to learn that tool please help.