Record Browser Actions - browser

I am looking for some browser recording software which can record browser actions for one of the business application and give the html elements :- name/id/xpath of the element along with the action performed (ex click, send keys, javascript etc)
My "application under test" is specific to IE and it doesn't run in any other browser.

Try using Selenium. It allows you to record browser actions and save them for later use (like automated browser testing).
You may want to try using SeleniumRC if you want to do this for Internet Explorer. You'll still have to set up some steps through firefox, but you should be able to run your tests on IE.

Try out contizee (www.contizee.com) which is a browser based plug in, easy record and playback and allows me to edit action paths e.g.
$("input#fk-top-search-box").val("HP COMPAQ");
form#fk-header-search-form>div.search-bar-wrap>div.search-bar>div.unit.search-bar-submit-wrap.size1of6>input.search-bar-submit.fk-font-13.fk-font-bold
We can customize according to our needs

Related

Chrome Extension Disappears while clicking outside of its resolution

Is there anyway that I can make Chrome Extension's window stick in window even while clicking outside of its resolution?
I'm trying to make it Sticky on the window for one simple google login so that I don't need to go back again to click extension to open it.
By using tabs API you could retrieve windowId of the window you want to focus on. You could do it only if needed e.g. by using query method from that API. You could pass url for example.
If you created a window that you want to be still focused then you have its id already in the hand.
After that, you could use window API update method in order to draw attention or focus. Take a look at updateInfo params - focus and drawAttention.
The same could be done by using tabs API. You could pass tabId and the URL you want to redirect someone.
Now in order to make it work you have a couple of options:
You can use setInterval which would be used to check if the tabId and windowId you want are active and focus the window/tab you want in another case.
Because in the MV3 extensions using setInterval is not recommended you could use alarms. Please take a look at AlarmCreateInfo, when param should help you instead of triggering the alarm periodically.
You could also use event listeners from both windows and tabs API to listen on tab / window focus change. Then you will be able block the change (from user perspective) by methods I described before.
You should play with all approaches and pick on that suits you, because all of them have some drawback. But don't want to make that comment very long.

High response times with Ajax True Client script

We are facing an issue with Ajax True Client script. When recording and replaying the script. One transaction took more than 60 sec time to load the page. Same behaviour observed after executing scenario in controller as well. But, if we manually perform the same transaction, it took only 8 sec. There is huge gap between the expected response times. Can any one suggest the fix?
This happens because of external resource download attempts by the script, which are not visible to you when you manually browse the page.
For example, if the page requests data from Google Analytics, or Facebook, and cannot access these sites (due to company restrictions, firewall, etc.), the response time would jump up to 60 seconds (timeout), but when you browse manually, you will not experience the timeout, since the browser behaves differently.
To resolve this issue, you should first find out which site is the script attempting to download data from? You can do this using a browser's developer tools (such as F12 tool in Google Chrome), and looking at the "Network" tab. Once you use this tab and browse to the web page, you should see the external HTTP requests. Make a list of these sites.
Once you know which external sites the page goes to, you can then use the Utils.removeAutoFilter JS command in your TruClient script:
From the Truclient Toolbox, choose "Misc" > "Evaluate Javascript Code" and add it to the first line of your script.
Then you can set the JS code in this action to:
Utils.removeAutoFilter(url, isIncluded);
for example, to prevent the script from downloading data from facebook:
Utils.removeAutoFilter('http://facebook.com', true);
Utils.removeAutoFilter('https://facebook.com', true);
Utils.removeAutoFilter('http://www.facebook.com', true);
Utils.removeAutoFilter('https://www.facebook.com', true);

Enforce print-only document on the web

I need to provide printable documents without any ability (or a very minimized ability) of the user to view or download them.
I don't even have to render the document. They could just click a text link and have it blindly print to a printer.
This can be done using native applications, but it would be far better to provide this feature from a web interface.
Some points:
I can encrypt the document on the server so the HTTP GET response is garbled. The client could fetch a dynamic key from the server just before print to re-assemble the data. This would prevent snooping through a web inspector.
I could demand the use of a browser extension that sends print jobs without presenting print preview windows.
What other ways could a user get the document? What else should I be thinking with preventing?

building chrome extension to read selected words from a web page

I would like to build a chrome extension to allow me select any word from any web page and by clicking a menu item to send it to a service of my company for tracking.
for example, if I am now reading some article on a page, I would like to select a specific word and right click on it, then I would like to make an http request to my service and track this word.
Is it possible to do with chrome extension? can you please link me to a tutorial that can be helpful?
Thanks.
Yes, you can use chrome extension to achieve that.
Refer Official Tutorial for more details.
Per your requirements, you may need:
Select a specific word. window.getSelection()
right click on it. You will need to listen to mousedown, mouseup or contextmenu event, the code looks like
document.addEventListener('contextmenu', function(event){...}, false);
make an http request. You can use XMLHttpRequest to transfer data between client and server.

Can Chrome Extension’s new options_ui trigger a page action?

I’ve been placing a page action on the options page of my Chrome extension. options.js calls chrome.runtime.connect({"name":"someName"}), and background.js has
chrome.runtime.onConnect.addListener(function(port) {
chrome.pageAction.show(port.sender.tab.id);
});
Unfortunately, in the new options_ui with the recommended default (and someday mandatory) "open_in_tab":false, the Sender's tab won't be set. Is there a way to get the tab id in order to show the page action?
I could use tabs.query to get the chrome://extensions/ tab, but that requires the tabs permission, which I currently don’t need. Active tab seems like it would work, but it doesn’t provide the tab id and isn’t enabled by opening an option dialog (source).
(Why do I want the page action on my options page? The extension works with a website that is only available ~7-10 weeks per year. I’d like my users to be able to interact with the extension the rest of the time, so that they can get used to the process. But I don’t want to adjust the displayed extension permissions just to do so. I can accomplish this by having the options page pretend to be the website in question.)

Resources