This is a discussion on VBScript for "Record Not Found" within the Software Testing forums, part of the Testing category; Hi, Got your previsous message for importing data into Datatable. Thanks for that. I have one more doubt. Please help ...
|
|||||||
| Software Testing Software testing is a process used to identify the correctness, completeness and quality of developed computer software. |
![]() |
| LinkBack | Thread Tools | Search this Thread |
|
|||
|
VBScript for "Record Not Found"
Hi,
Got your previsous message for importing data into Datatable. Thanks for that. I have one more doubt. Please help me. I have written a script of Adding a user. Before add a user I wanted to check weather the user getting adding, already exist, if exists I wanted to delete the user and add. In this situation, When I am checking a user which is not existing in the database, A Message box should be displayed as "User Not Found". If user not found it has to Add the user and skip forward to next record and check for the next user and so on. I am not able to handle "User not found" situation. Will you please help me. I am herewith attaching my code for your kind information. DataTable.Import ("F:\192.168.76.21\Add Organization\Add Org.xls") Dim K, J For K = 1 to 3 Chk=0 Browser("Platform India - ISP Administrato").Page("Platform India - ISP Administrato_4").Link("List Organizations").Click Browser("Platform India - ISP Administrato").Page("Platform India - ISP Administrato_3").WebList("sites:Search:FieldList").Select "Name" Browser("Platform India - ISP Administrato").Page("Platform India - ISP Administrato_3").WebEdit("sites:Search:SearchText").Set DataTable("Org_Name",dtglobalSheet) Browser("Platform India - ISP Administrato").Page("Platform India - ISP Administrato_3").WebButton("Go").Click 'If ((Browser("Platform India - ISP Administrato").Page("Platform India - ISP Administrato_3").WebEdit("sites:Search:SearchText").Exist) = "True") then Chk = Browser("Platform India - ISP Administrato").Page("Platform India - ISP Administrato_3").Exist ("False") If (Chk = "True") Then ExitRun End If Browser("Platform India - ISP Administrato").Page("Platform India - ISP Administrato_5").WebRadioGroup ("html tag := INPUT","name :=*.*").Select "#0" Browser("Platform India - ISP Administrato").Page("Platform India - ISP Administrato_5").Link("Remove").Click Browser("Platform India - ISP Administrato").Page("Platform India - ISP Administrato_5").Sync Browser("Platform India - ISP Administrato").Dialog("Microsoft Internet Explorer").WinButton("OK").Click Wait (10) MSGBox (DataTable("Org_Name", dtGlobalSheet)) DataTable.SetNextRow Next ExitRun
__________________
Thanks & Regards Krishnamurthy Tatavarthy |
| Sponsored Links |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
|
|