What is the use of "Option Explicit"?
Answers were Sorted based on User's Feedback
Answer / sonal.pagare
You can force VBScript to require all variables to be
explicitly declared by including the statement Option
Explicit at the start of every script. Any variable that is
not explicitly declared will then generate an error.
| Is This Answer Correct ? | 5 Yes | 0 No |
"Option Explicit" statement is used to declare variables and
arrays on the top of the script.When this stmt in script ,QTP
can allows all variables used in that script without
returning any error.
For example: x= 10
y= 20
z= c*y
msgbox(z)
In the above code, by mistakenly typed as 'c' in the place
of 'x'. Bur QTP tool allows 'c' as a new variable without
returning error.
| Is This Answer Correct ? | 0 Yes | 0 No |
1. How to handle object implementation change in DP for Ex: i have login page with username,pasword (editboxes),login,cancel(buttons). Here i written DP code for login page with the help properties. My questions: 1.If properites are changing dynamically i will do (i want code for that) 2.if objects are changed dynamcally i will do (i wnat code for that)
I want to count the total no of links present in yahoo home page. The script like Set fileSysObject=createobject("Scripting.FileSystemObject") Set linksFileName=fileSysObject.opentextfile("D:\samplelinkfile.txt",2,true) Set linkDescObj=description.Create linkDescObj("micclass").value="Link" Set noOfLinks=browser("yahoo").Page("Yahoo!India").ChildObjects(linkDescObj) For i=0 to noOfLinks.count-1 linkName=noOfLinks(i).getROProperty("name") linksFileName.writeline(linkName) Next linksFileName.close Set fileSysObject=nothing But while running the script it is fail (the object not present in the object repository).How to overcome please tell me the detail steps...for QTP9.30
print the array values in ascending order?
Hello Friends , I am the new joinner of this website. I am working with Sapient ,Gurgoan I would like to ask few qurries regarding the QTP Tool of (Testing) Currently working on QTP Tool . I would like to no learn VB Script can u name some Books which i get in market. And a small issue in QTP I had 2 users right i have to login and send the document from this user to second user right. when i am send this doc some contendId number generates right. now i am loging into second user and i have to search for that contentId right i found it now i dont want to accept the document so i had an opption of check out ok i have to click on check out my QTP Code is like this Browser(" ").Page(" ").WebTable(" ").ChildItem (3,5,"Image",0).click Browser(" ").Page(" ").Link("ChecK Out").Click i new this code is perfectly right but when i am run the script i have to click on that particular contentId and click on check out but now the Problem is started the error is the document has been already checked out remeber every time my content id changes means it is the new contentId which is not been used atleast once Please help me out in this issue i am in big trouble
Explain about vb script?
what is inner join? what is outer join? what is a constraint? tell me about rdbms? tell me about acid properties?
how to operate webobjects in a webpage using getobject function and then using generic methods?
What is loose binding? Why is it not a good practice to use it?
What is the difference between VBScript and JavaScript?
write a function to read the items from combobox of Flight reservation & save in excel (QTP)??
Description.Create
write a vb script to create a folder?