What is JavaScriptExecutor in Selenium? – User friendly Tech help

What is JavaScriptExecutor?nnJavaScriptExecutor is an interface which provides mechanism to execute Javascript through selenium driver. It provides “executescript” & “executeAsyncScript” methods, to run JavaScript in the context of the currently selected frame or window.  n n n n n n Lets inject Javascript into Browser using Selenium n n n Why we use it?nnTo enhance…

How to convert Object Repository into XML format? – User friendly Tech help

We will be focusing on 2 methodologies to achieve our target.n n Approach 1:- nUsing “ObjectRepositoryUtil Object“ n ObjectRepositoryUtil(ORU):-By using this object we can work with object Repository files (Local/Shared) from outside of UFT. n We need to use “ExportToXML” method of ORU object. n n n n n n ExportToXML Method n n n ‘Creating…

Group id vs Artifact id for a project – User friendly Tech help

Problem:- nWhen creating a new project in java IDE, what is the significane of group id and artifact id?nnn nSolution:-nLets understand what are these values and why we use them.nnWhat?nGroup ID :- Its an value which gives unique name to the project (like primary key in SQL tables).nnArtifact ID:- Name of the project (jar file will…

Practical issues and solutions for working with JMeter – Part2 – User friendly Tech help

n n n n n n n n More Scenarios n Scenario:- nHow to display results from Beanshell sampler to response?nnSolution :- nnSimple code example:- nnString display=”HelloWorld”;n//Taking results and displaying in responsenSampleResult.setResponseData( display);nnSampleResult.setDataType( org.apache.jmeter.samplers.SampleResult.TEXT );nnnScenario:- Not able to understand the error message thrown by jmeter in beanshell sampler or beanshell assertions? n Solution :-  nnUse try-catch n try{ int…

How to launch Application from Command Prompt in UFT? – User friendly Tech help

Scenario:- How we can launch our application to be automated from ‘Command Prompt‘ in UFT/QTP?nnSolution:- Today we faced the situation, where we were not able to launch application nfrom ‘SystemUtil.Run’.Problem was that our application was not directly in the form of .exe, nbut rather it was expecting parameters based on the Region for which we want this…

CSS Positioning – User friendly Tech help

Meaning of CSS Positioning:-nThe CSS positioning property provides options to position an element. An element is said to be positioned if it its position property has a value other than static .Positioned elements results in boxes by using four properties – top, bottom, left, right.nnSyntax:-n position: static|absolute|fixed|relative|initial|inherit; n Types of positioning:-nStatic: n div { position:…

How to change Settings of Remote Agent ? – User friendly Tech help

After launching the Remote Agent successfully. we can play with the settings of Remote Agent in UFT.nnApproach 1:-nThe Remote Agent’s icon will appear as a Taskbar Button(Check the far bottom right of the taskbar). Right click on remote agent button and select “Settings” from the context menu. n n n n n n Remote Agent…

How to append zero(0) to user defined date? – User friendly Tech help

Scenario:- Creating date in user defined format like MM/DD/YYYY?nnSolution:- In one of our application automation, we came across a situation, where we nwanted to validate the date displayed on the AUT, for that we created the logical date to match with Actual Result .nnBut our validation was failing, reason being, for the single digit dates like 2nd month…