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
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 |
How load testing can be done with silk international?
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
In "Property" the user-defied property can have two functions only, define that?
what is the statment/command for invoke the browser from script
Where is a testplan stored?
What is the standard flow of execution of a test case?
How to add objects of other pages to a test frame?
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.
What are the problems you faced while identifying an object in silk?
What is custom object .what it contains. Difference between custom & standard objects.
How dom browser extension identify a web application ui object?
What is the vo browser extension?