ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   HERE
Google
 
Categories  >>  Software  >>  Scripts  >>  VB Script
 
 


 

 
 PHP interview questions  PHP Interview Questions
 ASP interview questions  ASP Interview Questions
 CGI Perl interview questions  CGI Perl Interview Questions
 JavaScript interview questions  JavaScript Interview Questions
 VB Script interview questions  VB Script Interview Questions
 JSP interview questions  JSP Interview Questions
 Shell Script interview questions  Shell Script Interview Questions
 Python interview questions  Python Interview Questions
 Tcl interview questions  Tcl Interview Questions
 Awk interview questions  Awk Interview Questions
 AJAX interview questions  AJAX Interview Questions
 Ruby on Rails interview questions  Ruby on Rails Interview Questions
 Scripts AllOther interview questions  Scripts AllOther Interview Questions
Question
can any body give the code to write the function for given
suppose user login with usrer id and pwd to yahoomail.after 
cliking "sign in"if it is valid user id the next page will 
display userid'message box.( Note u have to use excel sheet 
to retrive the userid's data)
 Question Submitted By :: Jayanta
I also faced this Question!!     Rank Answer Posted By  
 
  Re: can any body give the code to write the function for given suppose user login with usrer id and pwd to yahoomail.after cliking "sign in"if it is valid user id the next page will display userid'message box.( Note u have to use excel sheet to retrive the userid's data)
Answer
# 1
'Create an excel sheet with username and password
'Get username and password from the excel sheet

Set excelobj=createobject("excel.application")
excelobj.workbooks.open("C:\Documents and 
Settings\12Desktop\test data.xls")
usrname=excelobj.sheets(1).cells(2,1)
pwd=excelobj.sheets(1).cells(2,2)
excelobj.workbooks.close
' add the objects to the Object Repository

'Function for username
Function username
If Browser("Yahoo! Mail: The best").Page("Yahoo! Mail: The 
best").WebEdit("login").Exist Then
	If Browser("Yahoo! Mail: The best").Page("Yahoo! 
Mail: The best").WebEdit("login").GetROProperty("disabled")
=false Then
		Browser("Yahoo! Mail: The best").Page
("Yahoo! Mail: The best").WebEdit("login").Set usrname
		reporter.ReportEvent 
micpass,"WebEdit","UsernameEntered: "&usrname
		End If
		else
		reporter.ReportEvent 
micfail,"WebEdit","Username Not Entered"
    End If
End Function
'Calling the username function
username

'Function for password
Function password
If Browser("Yahoo! Mail: The best").Page("Yahoo! Mail: The 
best").WebEdit("passwd").Exist Then
	If Browser("Yahoo! Mail: The best").Page("Yahoo! 
Mail: The best").WebEdit("passwd").GetROProperty("disabled")
=false then
		Browser("Yahoo! Mail: The best").Page
("Yahoo! Mail: The best").WebEdit("passwd").Set pwd
		  	reporter.ReportEvent 
micpass,"WebEdit","Password Entered: "&pwd
		End If
		else
		reporter.ReportEvent 
micfail,"WebEdit","Password Not Entered"
    End If
End Function
'calling the password function
password

'checking the username is valid or not
username="bhadrudu_p"
getdata=Browser("Yahoo! Mail: The best").Page("(1 unread) 
Yahoo! Mail").WebElement("bhadrudu_p").GetROProperty
("innertext")
Function usrvalid
	If  trim(getdata)=trim(username) Then
	reporter.ReportEvent micpass,"WebElement","Valid 
user"
	else
	reporter.ReportEvent micfail,"WebElement","Welcome 
page not present"
End If
End Function

usrvalid
 
Is This Answer Correct ?    0 Yes 0 No
Badri
 

 
 
 
Other VB Script Interview Questions
 
  Question Asked @ Answers
 
Open Yahoo Login Page in that page Suppose i have 100 mails and i want to delete 10'th mail now give procedure & Coding For that Scenario AppLabs3
HI how can handle dynamic image through vb script example we have to create email id fill the edit box(these latters change wrong password) i am wating your answer  1
When importing an excel file that has several columns each with different number of rows into QTP's Global datatable, how can you count the number of rows in a particular column? McGraw-Hill1
hey please tell me how to retriev data from excel sheet which puts the login name and password in the application? plz send me the code..please help me HP2
How do you get the value of a combo box in Javascript?  1
what is the use of Data base check point ?  3
how to retrive the tooltip by using descriptive programming in qtp? iGate1
How do you write an SQL insert statement? HCL1
How do you create a recordset object in VBScript?  1
what is the differenece btwn scripting language and programming language  3
Hello All, In QTP 9.2 for Mozilla Firefox, there is webelement in my application, I tried to click on that using decsriptive programming, but it does not work. and for this i tried this code too: Set obj = CreateObject ("Mercury.DeviceReplay") absx = Browser("").Page("").WebElement(".").GetROProperty ("abs_x") absy = Browser("").Page("").WebElement(".").GetROProperty ("abs_y") obj.MouseMove absx, absy obj.MouseClick absx, absy, 0 But it is not clicked. Can anyone help me out for this problem. Thnx in Advance  1
hai all.iam chandu..please let me know how to test a link in QTP when it is changing at run time..and what property we should take while we r using descriptive programming for a link..  4
What is wrong with the following code: <%afname="header.asp"%><!?#include file ="<%=afname%>"?>  1
What is the difference between ByRef and ByVal. When to use ByRef and ByVal TCS2
Hi, I need to accept user inputs for login at runtime.I know i can use Inputbox but how to proceed further that i dont know. Thanks in advance  2
i want to when we will write the scripts either after getting the build or after getting the SRS?  3
What is string concatenation function in VBScript?  1
we executed QTP scripts in one browser(i.e IN)same scripts is working on another browsers or not (i.e mean netscap,m azol..like ) Accenture5
How to check the particular window is exist or not with out using check points  1
how to declare a variable in vbscript using vbscript  2
 
For more VB Script Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com