Thursday 25 October 2018

TruClient- Firefox Protocol


The Ajax TruClient protocol interactively records scripts as we navigate through the business process. This enables TruClient to easily record and replay dynamic, complex web-based applications and create user friendly scripts. Scripts are created in real-time and steps can be seen in the TruClient Sidebar as they are performed.

Ajax TruClient scripts are asynchronous. Steps do not have to wait for previous steps to complete. Each step defines an End Event which defines the point at which subsequent steps are allowed to start running.

We can select to record scripts with either the Mozilla Firefox or Internet Explorer browser.

Ajax TruClient scripts are recorded on the user level; therefore there are no correlations however the main challenge becomes object identification. All recorded events are saved in the script

The Run-Logic in Ajax TruClient scripts is controlled differently. There is only one action.

If we want to put any any object verification after a step then Just run the script upto that step and then stop the run. Then Put wait for Object from toolbox and highlight the object that we want for verification.Then open tranction editor and bring that verification under that transaction name by changing the end point.


Clear Cache: Evaluate JavascriptàArgumentsà CodeàUtils.clearCookies(); Utils.clearCache();àJS

window.alert("rajesh");-->Right
window.alert(10);-->right
window.alert(“10”);à This is right
window.alert(rajesh);à This is wrong
Double black slash is used for commenting
 
// window.alert(10);: This is used for the comment
 

Failed to initialize-Timeout error during execution in performance center:
Run all the users simultaneously. Sometimes it resolves the problem.

Below code to to generate a random number and using this number click a random record on the page.
var c=51;
var d = Math.floor(Math.random() * c + 1);
if(d==1)
{


  d=d+1;
}
window.alert(d);
evalXPath("//div[@id=\"t_Body_content\"]/div[3]/div/div/div/div[2]/div[2]/div[2]/div/div/div[2]/div[2]/div[6]/div[1]/div/div[3]/table/tbody/tr["+d+"]/td[2]/a/span");
 
 


 
 
 
 
 

Thursday 19 April 2018

How to write Macro

Hi,

I am giving some basic information about Macro. Hope it would be helpful:

A macro is a piece of programming code that runs in Excel environment and helps automate routine tasks.

Macros are one of the developer features. By default, the tab for developers is not displayed in excel.

  • If you want to save macros, then you must save your workbook in a macro-enabled format *.xlsm
  • The macro name should not contain any spaces.
  • Always fill in the description of the macro when creating one. This will help you and others to understand what the macro is doing.
  • Code placed on a sheet (assigned to a command button) is only available for that particular sheet.
Steps:
1. First turn on the Developer Tab
  • Right click anywhere on the ribbon, and then click Customize the Ribbon.
  • Under Customize the Ribbon, on the right side of the dialog box, select Main tabs (if necessary).
  • Check the Developer check box.
  • Click OK.
  • You can find the Developer tab next to the View tab.
2. Write 1st code:
  • On the Developer tab, click Insert.
  • In the ActiveX Controls group, click Command Button.
  • Drag a command button on your worksheet.
  • Right click CommandButton1 (make sure Design Mode is selected).
  • Click View Code.
  • Place your cursor between Private Sub CommandButton1_Click() and End Sub.
  • Add the code line shown below.
  • Close the Visual Basic Editor
  • Click the command button on the sheet (make sure Design Mode is deselected).
3. How to swap value
  • Dim temp As Double
  • temp = Range("A1").Value
  • Range("A1").Value = Range("B1").Value
  • Range("B1").Value = temp
Function and Sub
The difference between a function and a sub in Excel VBA is that a function can return a value while a sub cannot. Functions and subs become very useful as program size increases.

How to Change Password of IUSR_METRO Account

Sometime we need to change the password of IUSR_METRO Account. This may be required due to compliance issue. Below are the steps to chang...