In a yahoo web Application there are 65 links.one day it
will opens 50 links and another day it will open 55
links.In this scenerio write Descriptive programing for
Automation?....Pls write the code for this scenerio.

Answer Posted / gaurav anand

for that page, use description.create() to get an object and then use that object to assign a "micclass" value i.e. in this case is links. then, count the no of links using count(). then store this in a variable and use a for loop to work on these links.

set a = description.create()
a.("micclass").value=links
for(i=0;i<a.count,i++)
set b= browser("").page("").childobjects(a)
-----use b as an object to do whatever you want to do on a link-----
next

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

i have two questions for regular expression :- Q1. I have date pattern eg-29/11/2011 29-11-2011 29.11.2011 Que- if any separator is there between date,month and year pattern should match else it should not match eg- pattern should not match in case of 2911-2011 Q2. let say i have a string and there is a number in between of that string eg.-Amount 30002.234 successfully credited to your account . now i have to match this pattern in such a way that even if decimal is not there pattern should match ,how i will do this using regular expression

1020


How do I generate Test Results window using descriptive method ( run time ) after my test execution process? Please have a look of my below code. ========================================================= Dim qtApp Dim qtTest Dim qtResultsOpt Set qtApp = CreateObject("QuickTest.Application") qtApp.Launch qtApp.Visible = True qtApp.Options.Run.CaptureForTestResults = "Always" qtApp.Options.Run.RunMode = "Fast" qtApp.Options.Run.ViewResults = True qtApp.Open "C:\Automation\Example", True Set qtTest = qtApp.Test qtTest.Settings.Run.OnError = "NextStep" Set qtResultsOpt = CreateObject ("QuickTest.RunResultsOptions") qtResultsOpt.ResultsLocation = "C:\Automation\Example\Res1" qtTest.Run qtResultsOpt MsgBox qtTest.LastRunResults.Status qtTest.Close Set qtResultsOpt = Nothing Set qtTest = Nothing Set qtApp = Nothing ========================================================== This code is working fine, but Test Result window is not displaying after execution. Anybody can please help me regading the same. Thanks Akshaya Madali Capgemini India Pvt Ltd 9823213538

3608


What is Test Fusion Report in QTP?

614


In qtp, explain what is qrs file?

581


How to find a window is minimized or not

1438






How can you identify the browser and its information using the qtp script?

579


Can any suggest me what is exposure testing?

1372


What is contained in the object repository?

612


What are the different types of recovery operation?

549


Tell me about your project? please help me how to tell about insurance project

1527


Explain QTP using different development techniques ?

531


Explain how Selenium is different from UFT?

690


how can i call function (which has link with excell sheet at a remote location) within another function

1571


How to give a call to another action from one action?

625


Explain more about the Test Fusion Report of QTP?

603