The following is the code I used to launch qtp, It is working well with IE but not in chrome.
What are the changes I shd Make to open through Chrome
var qtApp = new ActiveXObject("QuickTest.Application");
qtApp.Launch(); // Start QuickTest
qtApp.Visible = true;
Microsoft's VBScript is integrated with COM and UFT also exposes a COM interface, this is why you were able to launch UFT from HTML using VBScript. However VBScript is not supported by Chrome and JavaScript is not integrated with COM (at least not Chrome's JavaScript).
Therefore I don't think there's a simple way to launch UFT from an HTML page using Chrome. It is possible if you write a Chrome Extension but I don't think this is worth the trouble.
One way to do it will be to create an ASP.Net website, ASP.net will support opening UFT using the COM interfaces. I am doing the same thing for ALM's OTA API.
Related
I want to develop a small extension to hide the browser chrome for a use case. It seems that the new way to develop addons is to use the web extension api. With the old api it seems to be possible to manipulate the chrome. E.g. in the webdeveloper console (with some config flags) I was able to run this code:
document.getElementById('toolbar-menubar').style.display = 'none';
However it seems to be impossible with the web extension api. Is there any way to do that?
I want to check if user has outlook application installed just by using a simple HTML page with javascript.
Is this possible?
NOTE: This should also work on google chrome. ActiveXObject does'nt work on Google chrome
Regards,
Arif
No. There is no way for a webpage to sniff out what is installed (with the occasional exception of browser plugins) on a visitor's system.
I'm having a problem and I really need your support!
Here's the problem:
I have an application (.NET 4.0) that exposes a COM interface. Most of our clients is able to simply use the tag in the HTML and that will launch our application; also they are able to interact with it.
Today a customer, that have a lot of Javascript rendering, informed us that using IE is not possible; in IE the page is very slow but in Google Chrome is very fast. So, they ask us how to interact with our application using Google Chrome.
I've made some searches in Google but it seems that OLE is only available in IE.
Anyone have a solution for my problem?
Basically the requirements are:
Launch our application as Local Server using a GUID or a name;
Be able to invoke methods in our COM interface;
Be able to receive events from our COM interface;
Thanks a lot.
Can I run my own javascript code in a browser when viewing a page?
For example I have page index.html. In that I want to run this javascript function
function myFunction()
{
alert("Say Hi");
}
I want to call this function through some browser interface because I don't have access to the source code of the web.
Yes. Just how depends on which browser you're using:
For Chrome and Safari you'll use the built-in Web Inspector—see the instructions on this page.
Firefox has the built-in Web Console, but the more advanced add-on Firebug is very popular.
The Internet Explorer equivalent is Developer Tools, which you can launch with F12.
You can use a bookmarklet, the javascript console or a browser plugin to run your own code in an already loaded page.
Greasemonkey is a browser plugin for Firefox that provides a framework for running your own javascript code in other web pages that are already loaded.
You can either simply type it into the JavaScript console for your browser, or for trivial things, you can use the javascript: protocol handler.
One of the first links when searching on google - Get Started With Greasemonkey
my application is setting browserhome page ,search provider ,favourites etc to all supported browsers like googlechrome,firefox,internet explorer.My purpose is to automate my application using selenium .In case of IE these informationa are stored in registry . so it is easy for me to validate the above details .But for firefox and google chrome its bit problem .So i just want know whether there is any functions available in javascript to check browser homepage ,search provider,favourites etc in firefox and google chrome ?
The simple answer is no. It would be a security and privacy issue if client side js code could access that information. Instead you would need to use a browser extension, or in your case you can just use an external program with administrative rights. I am pretty sure that selenium does not have this functionality built in, however it is all available if you know where the browser stores it. IE uses the registry, but chrome and Firefox use proprietary files in their profile directories. There may be an library that does this, otherwise it is possible