Monday, May 4, 2015

How to download the video from the youtube without installing any software

Step1. Open the Youtube on your browser and open the video that you want to upload

Step2. Copy the Url of that video.

Step3. Open the new browser or new tab and paste the copied url.
for example :URL is https://www.youtube.com/watch?v=MXG63Vxgk8g

Step4 . Update the copied URL as: just add "ss" before youtube in the copied URL and Press Enter

for example :https://www.ssyoutube.com/watch?v=MXG63Vxgk8g

Step 5. Now you will get the download option and just click on that link and save your video at your pc without using any software.

Enjoy......

Sunday, May 3, 2015

Basic Programs that can be ask by Interviewer during QTP Interview

1. Write the program to print following string.
*
**
***
****
*****

Ans.
'Written by Zeeshan Khan

For i= 1to 5
    For j=1 to i

        vstr =vstr& "*" & " "

    Next
vstr =vstr &vbnewline
Next
print vstr

Output would be:





Q2. Write the program to print following string.

*****
****
***
**
*
Ans.

'Written by Zeeshan Khan
For i= 5 to 1 step-1
    For j=i to 1 step-1

        vstr =vstr& "*" & " "

    Next
vstr =vstr &vbnewline
Next

print vstr

OutPut Would be:


Friday, May 1, 2015

What is WebService ,Explanation with example

A web service can be thought of as a software application with the following designed to send and receive information from other software applications. For example -- you fill out your tax info on TurboTax.com and click send. Intuit's web service finds the IRS's web service, they talk to each other, and your tax info gets sent form Intuit to the IRS.
Other examples of a web service:
  • When you log into your Android phone, you have to put in an email address and password. There's a server on the Interwebz somewhere that sits around waiting for login information. When the Google authentication service receives the login request, it looks up the info, and then tells the phone whether or not the request is legit.
  • When someone swipes your credit card, the credit card machine sends a request over the Internet or a phone line to a web service that determines whether or not the transaction is legit.
  • If you want an example with a little more lingo... Twitter built the first version of Twitter using Ruby on Rails. Twitter wants to let people post messages to Twitter, so they build a REST API that basically allows anyone to talk to Twitter's API if they use REST and follow certain instructions. Then FourSquare comes along and builds their check-in app using Scala and Lift. Scala doesn't know a damn thing about Ruby and vice versa, but they don't need to. Some dude uses FourSquare to check into Starubucks, the FourSquare web service receives the check-in from the dude's smartphone and then says "Hey Twitter, I'm sending you a tweet in that REST format you like." Twitter is just sitting there picking it's nose when a package arrives all wrapped in REST. Twitter opens it, says "Hey look, dude's tweet" and then posts a tweet in dude's account saying "Dude just checked-in to Starbucks".

Program to Reverse the words from the string

'Program to Reverse the words from the string
'Created by Zeeshan

strName = "Hello Everyone"
arrayq =split(strName," ")
For i=ubound(arrayq) to 0 step-1

strNew =strNew+" "&arrayq(i)

Next
print strNew

Program to calculate the count of each chatacter from the string

'Function to find the each character count from the given strings
'Created by :Zeeshan

'Declare the Variable
Dim strName
iSum = 0
strName ="zeeshan"

'Apply the For Loop till the length of the string
For i=1 to len(strName)
    iSum = i

'Create the Object of Regular Expression
    Set Regex =new RegExp
'Find out the each character from the left side of the screen
    Str = left(strName,1)
    Regex.Pattern =left(strName,1)
    Regex.IgnoreCase =True

'Apply the condition if length of the string is zero then loop will be closed
If len(strName)=0  Then
    Exit For
    End If

'Calculate the length of the Original string
OldString = len(strName)

'Replace the retrieve character from the null value
strName =Regex.replace(strName,"")
Print strName
'Calculate the length of the string after applying replace function
NewString =len(strName)
StrDisplay = StrDisplay & Str & (OldString-NewString)
Next

print "Loop Executed"&" "&iSum&" "&"Times"
Print "Count of each string would be-"&StrDisplay

Some Questions and Answers that very frequently ask in Interview

Q1. In UFT how you can prevent the system from getting locked?
 Ans. To prevent system getting locked, any of the two ways can be used
  • Create a simple vbs file having code to press numlock key and run that vbs file
  • Edit one registry key “DisableLockWorkstation =1” to disable locking

    Q2. How we can find out the Total execution time of the test case?
    Ans. We can use the below code

    Teststart =now()

    'Test steps

    Testend =now()
    TotalTime =datediff("n",Teststart,Testend)
    Print TotalTime

    Q3. How we encrypt any value in QTP for security purpose
    Ans.

    pwd= "Password"
    pwd = Crypt.Encrypt (pwd)
    print pwd

    Q4.What Coding standards we have to follow during writing any function
    Ans.
    1. Variable Naming Convention
    2. Function name should be related to Function
    3. Since we are automating manual test case to QTP scripts, So scripts should be Manual Test scripts name in QTP
    4.Each Action, Function, Scripts should have
    Created Date
    Created By
    Purpose
    Modified

    Q5. What is the difference between the Systemutil.Run and InvokeApplication?
    Ans.  Systemutil.Run method can open any kind of application but Invoke application method is used for only exe file.