Hello! i am having two comboboxes.Each having 10 items in
it.when i select first item in first combobox,it is not
similar in the second combobox.for ex in first combo if it
is Hyderabad,in second it should be some chenai or some
other item .Write a VBSCRIPT for that?

Answer Posted / ravikumar

Lets take Combo1 & Combo2

If u r selecting < Item1 > from Combo1 the same item1
should not be present in the Combo2 right..
if it is the case

step1) select Item1 from Combo1
Step2) write a function to validate the given item i.e
passed as perameter(Item1)by getting the innertext of the
Combo2 and use Instr function to find Item1 is there in the
inner text..if no Pass...If yes Fail.........


if the case is
the item selected in the combo2 should not be <item1>
then

get the selected item from the Combo2

strcomp("selected item","item1")

if yes fail
if no pass.

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is an object repository?

599


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

1571


How to add object to object repository in qtp9.0 Suppose for brower yahoo home page

1427


Does QTP have any limitations?Can it work with all kinds of programming languages like java,springs,ajax ,hybernet?Also does it work well with windows 7.What are its other limitations

1759


assume i have few url link how will i dynamically call then using descriptive programming?

1597






How will you handle java tree in qtp?

621


What are the different types of recording modes?

529


What do you mean by iteration?

626


How can we retrieve the Bug Ids which are open&Reopen in status through QTP scrit?Please find the script which i tried... Dim objBugFactory, objBug Dim BugId Set TDConnection = QCUtil.TDConnection Set objBug = TDConnection.BugFactory If QCUtil.IsConnected then Reporter.ReportEvent 0, "Connected", "Connected to server: " + QCUtil.TDConnection.ServerName + chr (13) +"Project: " + QCUtil.TDConnection.ProjectName + chr (13) + "Domain: " + QCUtil.TDConnection.DomainName Reporter.ReportEvent 0, "Current time on server is","==>" & TDConnection.ServerTime Else Reporter.ReportEvent 1, "Not connected", "Not connected to Quality Center" End If If mybug.Status="Open" Then BugId=mybug.DefectId MsgBox BugId End If 'OR**********************************--------------------- -----********************************** If Bug_Fields("BG_STATUS").Value ="Open" Or "Re Open"Then BugId=Bug_Fields("BG_BUG_ID").Value MsgBox BugId End If

2565


An object is non standard object, i mapped it to standard object, eventhogh on mapping to standard object i cannot use the methods available on the standard object with the mapped object. How i can use those standard object methods with these mapped object. (((Note : dont tell that we can use virtual object as virtual object is to map nonstandard obj to standard obj)))

1581


What is the use of sendkeys and what are send keys

1947


How Can I find the least value in a bunch of variables using qtp.. E.g.:- A = 210, B = 212, C = 60, D = 111 I don’t want to write bunch of lines for this…. Is there a way to get the result in one line…..

1618


How do you test the text displayed in the header portion of times of india epaper. Hot news(banner) are scrolling in the top of the page, how do you test using QTP?

1504


i am trying to automate yatra.com,in that site, when i go to automate the Leaving from field showing as a WEBEDIT, but when i enter 1 or 2 char, it displaying dropdownlist, i try to use keyboard automation to select the item from that list but it is not possible, can anybody help he. Thans for posting the Answer

3491


Please Don't mind .i want in detail the real time process i.e in each document what it contains.

1432