dcsimg
Results 1 to 1 of 1

Thread: VB Scripting

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2019
    Posts
    1

    VB Scripting

    Hi,

    I am new to software automation testing and have wrote a descriptive code that goes on a provisioning app and first validates that none of the options are "checked" and if are "unchecks" them, then once all is set to "unchecked" begins "checking" them and validating that all provisioning works. What I am after is to validate that the provision boxes all have values in them after refreshing the page. Can anyone help with doing that?

    Code:
    Function UDF_ProvisionApp(param_array) Set test = description.Create test("micclass").value = "WebElement" test("acc_name").value = ".*Access has been granted" test("visible").value = True test("html tag").value = "A" Set applicationitems = browser("creationtime:=0").Page("micclass:=Page").ChildObjects(test) If applicationitems.count = 0 Then ' Nothing is checked else For i = 0 to applicationitems.count - 1 applicationitems(i).click wait(2) Next End If Set test = description.Create test("micclass").value = "WebElement" test("acc_name").value = ".*Access has been removed" test("visible").value = True test("html tag").value = "A" Set applicationitems = browser("creationtime:=0").Page("micclass:=Page").ChildObjects(test) expectedCount = applicationitems.count For i = 0 to applicationitems.count - 1 applicationitems(i).click wait(2) Next Set test = description.Create test("micclass").value = "WebElement" test("acc_name").value = ".*Access has been granted" test("visible").value = True test("html tag").value = "A" Set applicationitems = browser("creationtime:=0").Page("micclass:=Page").ChildObjects(test) If applicationitems.count = expectedCount Then RESULTS.InsertResult GLOBAL_STEP_DESCRIPTION,"Granting application access","Granting application access - Success" ,"PASS" else RESULTS.InsertResult GLOBAL_STEP_DESCRIPTION,"Granting application access","Granting application access - Error" ,"FAIL" End if End Function
    Last edited by Shaggy Hiker; Dec 14th, 2019 at 10:27 AM. Reason: Added CODE tags.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width