Suppose by navigation I went from 1 st page to 5 page ,so
Write a generic script for coming from any page to the 1st
page and by executing where the page may be it will come to
1st page



Suppose by navigation I went from 1 st page to 5 page ,so Write a generic script for coming from a..

Answer / priyesh pandya

To use this code for your navigation all you links are going
to look like this: filethatcodeisin.php?id=page and it will
actually take you to the page which you specified above.

<?php
switch($id) {
default:
include('index.html');
/* the url to your main page*/
break;

case "page1":
/*link id, the "title" what ever you wanna call it*/
include('page1.html');
/*the link id page file, the file it will go to*/
break;

case "page2":
include('page.html');
break;

case "page3":
include('page.html');
break;

case "page4":
include('page.html');
break;

case "page5":
include('page.html');
}
?>

Is This Answer Correct ?    1 Yes 2 No

Post New Answer

More VB Script Interview Questions

How will you convert a given number to long in vbscript?

0 Answers  


How to use Text file (Notepad) as ur data source in QTP? Can u please provide some function code for it?

1 Answers  


I'm new to QTP, i facing a a problem in the script says"Object not found", "Browser("").page("").frame(Name:=fminfo).webtable(). the issue is, QTp is not able to identify the web table in run time.becuase in that fram"fminfo" there are "n"table and the table do not have the names,Html id. 1) i need to count the number webtables available on that page. 2)need to identify the webtable cell values. 3)How Loop the once i get the count and retrive the cell data of each webtable? Can anyone help on this, plz.. Thanks, Suresh

3 Answers  


How can I write HTML text to the window in VB Script?

2 Answers  


Explain the constants in vbscript?

0 Answers  


a;;b;c;;;d in this string output is abcd will come how can we do that in vbscript in QTP testing?

2 Answers  


write a vb script to calculate factorial of a number?

5 Answers  


What is the difference between a dictionary and an array?

0 Answers  


hi what is called GUI in QTP 8.2 and how can we test the apllication using GUI?

0 Answers  


How to load vbs functions in qtp

2 Answers  


Is vbscript language a case-sensitive language and what does it mean?

0 Answers  


can u test the application without add-in?

1 Answers  


Categories