Hi All,

An newbiee to silk test tool. I wanted to write a function
which checks the browser type installed in the local machine
& then based on the browser type test case should run.

I tried little bit writing the function :

Void Func_ValidateBrowserType()
Window myWin
myWin = Browser.GetRealBrowser ()
print (myWin)

Any help please..

Thanks,
V



Hi All, An newbiee to silk test tool. I wanted to write a function which checks the browser type..

Answer / Anurag Singh Chauhan

In Silk Test, you can use the `GetCurrentBrowser()` method to get the current browser type installed on your local machine. Here is an example of how you could modify your function to check the browser type and run different test cases accordingly:nnVoid Func_ValidateBrowserType()n{nString browser = GetCurrentBrowser();nIf (browser == "Internet Explorer")n{n// Run IE-specific test casen}nElse If (browser == "Chrome")n{n// Run Chrome-specific test casen}nElse If (browser == "Firefox")n{n// Run Firefox-specific test casen}n}

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Silk Test Interview Questions

How load testing can be done with silk international?

1 Answers  


can we test the application by inserting checkpoints using silktest as we do in qtp and winrunner and also what are the automation frameworks in silktest

1 Answers  


In "Property" the user-defied property can have two functions only, define that?

1 Answers   IBM,


what is the statment/command for invoke the browser from script

4 Answers  


Where is a testplan stored?

1 Answers  


What is the standard flow of execution of a test case?

1 Answers  


How to add objects of other pages to a test frame?

1 Answers  


hai iam not working.iam try to job.on practice i have dout .HOW TO TEST THE CALCULATOR BY USING DATA DRIVEN.PLS REPLY WITH CODE.I HAVE NO IDEA ON DATA DRIVEN.

2 Answers   Aricent, Cincom,


What are the problems you faced while identifying an object in silk?

1 Answers  


What is custom object .what it contains. Difference between custom & standard objects.

3 Answers  


How dom browser extension identify a web application ui object?

1 Answers  


What is the vo browser extension?

1 Answers  


Categories