How to automate a Chrome extension with UFT - google-chrome

The new version of UFT 12.01 is supporting up to Chrome 36 when it comes to web content.
What about Chrome´s extensions though?
I read somewhere that they cannot be automated.
From the other hand side, when I use developer tools (12) I can identify buttons, textboxes etc.
Is it possible to test a Chrome extension by using UFT?
PS: I specifically try to automate one extension called POSTMAN - Rest Client (https://chrome.google.com/webstore/detail/postman-rest-client/fdmmgilgnpjigdojojpjoooidkmcomcm?hl=en)

UFT's Chrome support doesn't work with other extensions since Chrome disallows extensions being injected into other extensions.
As a workaround you may be able to use UFT's Insight option to automate any technology that UFT doesn't support directly.
Specifically for the Postman extension, this is a simple REST Client. I Assume you want to use it in order to test your REST services rather than actually testing the Postman extension. If this is the case wouldn't a more natural way to approach this issue be to use a UFT API test?
API tests support calling and validating REST services with all the functionality previously available in HP's Service Test.

Related

Controlling Chrome coverage feature with chromedriver

Is there a way currently to programmatically pull a coverage report from Chrome while Chrome is running under selenium or other automated control software?
From looking at this article, there is a reference in the comments that there's no way to export this data right now but there is a feature request.
There's another article here that talks about how the feature works and in the comments someone asks this same question. The response was that there's an API here that maybe you could take advantage of using a Chrome extension.
Now, Selenium only has access to the browser context via execute_script aimed to execute window.__coverage__; to collect the Front-end's coverage data. So, you need to instrument your source code using nyc and parse the returned value.

Is Postman Chrome Extension marked for deprecation? (Seeking company rep answer)

I've seen conflicting and stale information regarding whether Postman Chrome Extension is marked for deprecation or not. Could someone with direct knowledge address this question?
I need to know if I need to request that my work replace the extension with the native Windows app or not. Does the company intend to keep feature parity?
What's the difference between the Postman plugin and the extension? (since they are different)
The Chrome version of Postman is not using the same runtime for execution of requests & test scripts. It is recommended to transit to the native client. Especially when you plan to use Postman collections with the CLI client Newman.
You can read a blog post of the company on this topic here: Blog post on Chrome Extension vs. native app
We're encouraging Postman Chrome users to transition to the the Mac or Windows app when convenient, and to the Linux app when available, by heading to https://www.getpostman.com/apps and downloading the correct app. Going forward, we will be watching to see how Chrome OS app development proceeds, to make sure we provide the right tools for our community.

Interacting with firefox using an external program

I am looking for a way to interact with a web page and enter data to certain fields in it using an external program that interact with Firefox (or Chromium) web browser. The best I could find is the console commands for the browser, but they only let you go to a certain URL and not interact with the pages' content. I have also tried looking for some extension to do the job but I could not find any. Any suggestions?
You could create Chrome extension that communicates with your application via Chrome Native Messaging API: https://developer.chrome.com/extensions/messaging.html#native-messaging
Take a look at Selenium and the tools mentioned at Selenium alternatives?.

Chrome extension or chrome app?

I would like to create an extension or app for the Chrome browser which would require access to a user's Google Calender (for creating new appointments).
I am unsure of which technology to better research and use, Chrome extensions or apps. My "app" wouldn't need much of a GUI, so I'm leaning towards extension — but I don't know if this would pose any difficulties for accessing a user's Google Calender to add an event.
Anyone one have any idea which technology is best for this situation, and why? Thanks!
Either, or... Go with an extension if you'd like.
I assume you've looked at the API reference?
https://developers.google.com/google-apps/calendar/
From there, I'd imagine you'd just need OAuth to authenticate the user. Here's the JS library:
https://code.google.com/p/google-api-javascript-client/
There are pros/cons of each types, apps or extensions.
Apps
If you would like to create a client application of Google Calendar which has many rich GUI components, this type will become a better solution.
In addition, Chrome apps can communicate with many hardware devices and other servers. Of course, your Chrome app can become as a server (that is, your app can open a server socket and accept a request from other client apps).
Chrome apps can be executed not depending on your Chrome Web browser. That is, Chrome apps cannot access to a context of your Chrome Web browser.
Probably, you don't want to get the pros above, I guess...
Extensions
If you would like to create a small UI for posting your schedule to Google Calendar, this type will become a better solution.
In addition, Chrome extensions can access to a context of your Chrome Web browser. That is, your extension can get page contents of each tab and inject your CSS and/or JS code. For example, your extension will get a URL of some opened tab and include it in a body of the posted schedule.
Chrome extensions completely depend on your Chrome Web browser. That is, your extension cannot execute independently.
Also, generally, high cost will be needed to develop Chrome apps than Chrome extensions. As the result, you should choose Chrome extensions, I believe.

Sending POST request via HTTP using Safari on Mac

I need to call a webservice with Safari on Mac. Since the methods are in POST I can't paste the url in the address bar of Safari (like with GET methods).
So, I'm looking for a plug-in or similar that allows me to send the request and then receive the response inside the browser. The response is JSON so with the JSON plug in I can see all the response with his formatting.
Solutions ? Thanks !
Safari is my browser of choice, so I can empathize with you for wanting a native plugin. Fortunately, while there aren't any extensions available, there are quite a few native OSX clients for HTTP/REST end-point testing. I have been using CocoaRestClient, which includes auto-formatting and syntax highlighting for JSON, as you requested. It's open source, lightweight, and is at least actively supported by its developers:
http://mmattozzi.github.io/cocoa-rest-client
Another great tool is Postman, an application inside Google Chrome.
I don't know why you care whether the client is in Safari or not. A restful POST should be able to be executed from any sort of client. You might want to look at RESTClient extension for Firefox http://restclient.net/
Also just Google 'REST client' you should see plenty of other tools available to generate POST's against your service. If you are really would about Safari-specific responses, most good REST tools, should allow you to set the User-Agent header so as to make the request look like it is coming from Safari.