Give me some scripts for 1). checking webpage links
(counting links,opening web pages,counting child elements)

Answer Posted / lkiran

Hi Rnashok,

I used similar function in my script.But getting syntax
error when I try to run the script.Let me know how to solve
it.Herez my function.....

Function eTimeSummary(hours)

rowCount = Browser("XYZ").Page("XYZ_8").WebTable
("Employee #").RowCount

cellData = Browser("XYZ").Page("XYZ_8").WebTable
("Employee #").GetCellData(1,1)

If cellData <> "Commission Information is not available
for this time period" Then

For i = 2 to 2'rowCount
hoursTotal = Browser("XYZ").Page
("XYZ_8").WebTable("Employee #").GetCellData(rowCount, 6)

If Trim(hours)= Trim(hoursTotal) Then
Reporter.ReportEvent 0, "Verifying
AssociateSummaryForODhours and eTimeSummaryhours
Total", "Summary Total Passed."
'msgbox "testpassed"
Else
Reporter.ReportEvent 1, "Verifying
AssociateSummaryForODhours and eTimeSummaryhours
Total", "Summary Total Failed."
End If
Next

End If

Browser("XYZ").Back
Browser("XYZ").Page("XYZ_4").Sync
End Function

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the types of object repository?

574


How many types of run modes are there in qtp?

584


I AM TRYING PORT CODE FROM WINRUNNER TO QTP AND DON'T KNOW TO HOW TO CHECK THE ERRORS. IN WINRUNNER FUNCTION RETURNS EIGHER 0 OR -1 AGAINST WHICH RESULT CAN BE MADE PASS OR FAIL BUT IN QTP I DON'T SEE FUNCTIONS RETURNING ANY VALUE. APPRECIATE IF ANYONE COULD HELP ME CONVERTING FOLLWOING WINRUNNER CODE TO QTP. set_window("Customer Service"); rc = web_obj_get_text("Summary","#2","#4",ssn,""," ",1); if (rc != E_OK) { report_msg("[GetSubscriberSummary] Could Not get subscriber SSN; rc = "&rc); myRC = rc; } else { ssn = StripBlank(ssn); if (DEBUG) report_msg ("[GetSubscriberSummary] SSN: "&ssn); }

1697


Is QTP Supports SWT applications? If yes, can you write a sample script for opening a new package in eclipse.

3006


In QA Testing when do you use Loadrunner vs QTP? What are the main differences between those two tools? Explain the purpose with real world scenario examples...In advance thank you!!!

2381






Can the user toggle between using Local OR and shared OR for the same action?

556


can anyone tell me what to say in interview when interviewer asks about "tell me about your framework in your project"?

1402


Which is the best QTP training institute in Delhi/NCR region and what is the approximate fee for QTP course (Basics and Advanced)

1380


Explain different types of checkpoints?

560


What is a Patch in QTP?

604


After executing the script in qtp suppose i found some script execute successfully and found some error.So how to report the status for both (i.e pass and fail report)in test director. For "fail" We use "defect tab" in testdirector. But for "pass" how to report it to TL.what is the process plz anybody ans

1673


How to find the length of the string in qtp?

576


Can we access the java methods in qtp. Because my requirement is to access the swt(for eclipse an it is java code) methods in qtp is it possible?

1522


Analyzing the checpoint results?

597


How can i check items sorted or not in a weblist ? Give me the script for this...

1575