Exforsys

Free Training

VBScript for "Record Not Found"

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 ...

Go Back   Exforsys > Testing > Software Testing

Exforsys.com


Software Testing Software testing is a process used to identify the correctness, completeness and quality of developed computer software.

Reply

 

LinkBack Thread Tools Search this Thread
  #1 (permalink)  
Old 09-25-2006, 12:56 AM
Junior Member
 
Join Date: Aug 2006
Posts: 4
venkata krishnamurthy t is on a distinguished road
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 03:45 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0
Copyright 2004 - 2009 Exforsys Inc. All rights reserved.