1 / 92

VB Script

VB Script. VB Script Data Types. VB Script Data Types. VB Script doesn’t support explicit declaration of data types. Only data type of VB script is Variant (Dim) Example Dim a a= “Hyderabad” --- --- --- --- a= 1234 ----- --- -- A=10.25 etc…. VB Script Data Types. Dim Val

glynns
Download Presentation

VB Script

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. VB Script VB Scripting

  2. VB Script Data Types MANUAL TESTING

  3. VB Script Data Types VB Script doesn’t support explicit declaration of data types. Only data type of VB script is Variant (Dim) Example Dim a a= “Hyderabad” --- --- --- --- a= 1234 ----- --- -- A=10.25 etc… MANUAL TESTING

  4. VB Script Data Types Dim Val Msgbox Vartype(Val) ‘0 for empty or Uninitialized Val=“Pradeep” Msgbox Vartype(Val) ‘8 for String Msgbox Vartype(“Arun”) ‘8 for String Msgbox Vartype(“123”) ‘8 for String Msgbox Vartype(100) ‘2 for Integer Msgbox Vartype(10.12) ‘5 for Double Msgbox Vartype(#10/10/2015#) ‘7 for Date Set a = CreateObject(“Scripting.FileSystemObject”) Msgbox Vartype(a) ‘9 for Automation Objects MANUAL TESTING

  5. VB Script Data Types Dim a,b,c a=10 b=3 c=a+b Msgbox c ‘13 a=“10” b=3 c=a+b Msgbox c ‘13 a=“10” b=“3” c=a+b Msgbox c ‘103 MANUAL TESTING

  6. VB Script Data Types Dim a,b,c a=“Hyderabad” b=“123” c=a+b Msgbox c ‘Hyderabad123 a=“Hydera” b=“bad” c=a+b Msgbox c ‘Hyderabad a=“Hyderabad” b=3 c=a+b Msgbox c ‘Error MANUAL TESTING

  7. Get 2 numbers Find which is big number.Also verify if any alphabets are present say as only Numbers should be given as Input.Also check if there is any Blank data say that “Blank Value, Please enter a value” Dim a,b a=InputBox(“Enter A Value”) b=InputBox(“Enter B Value”) If a<>”” And b<>”” Then If IsNumeric(a)= True And IsNumeric(b)= True Then If Cint (a) > Cint(b) Then Msgbox “A is bigger Number” Else Msgbox “A is bigger Number” End If Else Msgbox “Only Numbers should be provided as Input” End If Else Msgbox “Blank Value, Please enter a value” End If MANUAL TESTING

  8. Functions MANUAL TESTING

  9. Functions MANUAL TESTING

  10. Functions MANUAL TESTING

  11. Functions MANUAL TESTING

  12. Functions MANUAL TESTING

  13. Functions MANUAL TESTING

  14. Functions MANUAL TESTING

  15. Functions MANUAL TESTING

  16. Functions MANUAL TESTING

  17. Functions MANUAL TESTING

  18. Functions MANUAL TESTING

  19. Functions MANUAL TESTING

  20. Functions MANUAL TESTING

  21. Functions MANUAL TESTING

  22. Functions MANUAL TESTING

  23. Functions MANUAL TESTING

  24. Functions MANUAL TESTING

  25. Functions MANUAL TESTING

  26. Functions MANUAL TESTING

  27. Functions MANUAL TESTING

  28. Functions MANUAL TESTING

  29. Functions MANUAL TESTING

  30. Functions MANUAL TESTING

  31. Functions MANUAL TESTING

  32. Conditional Statements MANUAL TESTING

  33. Conditional Statements • If Statements: • Executes the set of code when condition is TRUE • If…. THEN … Else • Use the If...Then...Else statement if you want to • Execute some code if a condition is true • Select one of two blocks of code to execute • If…. THEN … ElseIf • You can use the If...Then...ElseIf statement if you want to execute many blocks of code. MANUAL TESTING

  34. DO LOOP Statement MANUAL TESTING

  35. DO WHILE LOOP Statement MANUAL TESTING

  36. DO UNTIL LOOP Statement MANUAL TESTING

  37. EXIT DO WHILE LOOP Statement MANUAL TESTING

  38. EXIT DO WHILE LOOP Statement MANUAL TESTING

  39. WHILE WEND Statement MANUAL TESTING

  40. WHILE WEND Statement MANUAL TESTING

  41. WHITH Statement MANUAL TESTING

  42. Looping Statements MANUAL TESTING

  43. Looping Statements MANUAL TESTING

  44. Looping Statements MANUAL TESTING

  45. FOR NEXT Loop Statements MANUAL TESTING

  46. EXIT FOR Loop Statements MANUAL TESTING

  47. FOR EACH Loop Statements MANUAL TESTING

  48. IF … THEN… ELSE Loop Statements MANUAL TESTING

  49. IF … THEN… ELSE Loop Statements MANUAL TESTING

  50. IF … ELSEIF Loop Statements MANUAL TESTING

More Related