Why won't web_reg_find see certain static text in LoadRunner? - performance-testing

Why won't web_reg_find see certain static text in LoadRunner? Even when I use the 'Find Text' tool while recording, it throws an error.

Related

How to maintain rich text format and in line images in a email send to web?

I have a view which receives emails from web, then I catch those and send them to a website. The problem is that the rich text which contains the body of the email loses its attributes (color, bold text, etc.) and images are lost or, if I use embedObject, they lost position (only are placed in the begging or end of the email).
There is a lot of information on the web but, few examples which work. Something with MIME format, convert to hmtl or xml are the options, but I cannot put them to work.
Seeing the properties of the document in the view, the MIME format converts all the email in a bunch of pieces, a lot of body ones. One of the body's have all the html code of the email, but I cannot access it. That is I think, the easiest solution, and my question. How can I access it, put in to a string and send it to the web?
Anyone have any tips or other solution to it?
P.S.: In the client view the email is perfectly formatted and images in place, I cannot just put the view on the web.
The body's parts and the html one
The base of my java agent is the following code:
public void NotesMain() {
try {
//I create a doc and use replaceItemValue to copy the other parts of the email.
RichTextItem rich = null;
String string = "";
rich = (RichTextItem) doc.getFirstItem("Body");
string = rich.getFormattedText(false, 0, 0);
rich.appendText("string");
}
}
This code kind of converts MIME/RichText to plane text.
Just readdress (change the SendTo field) and forward the existing document instead of creating a new document and copying items.
If you don't want to alter the existing document, that's okay. You just call the Send() method without calling the Save() method.

dat.gui display simple text

Is it possible to display a simple text in dat.gui?
A text input field can be achieved, but I would like to use dat.gui to display comments, such as the application controls. Is that even possible?
Yes it is.
First you will have to determine the location of your particular text. It will be either in gui.__controllers or gui.__folders.__controllers.
For instance, I have a Folder called "Animation", and inside this folder I have a simple text display. But to get rid of input that is associated with the simple text display, you have to manipulate the domElement.
The command below,
gui.__folders["Animation"].__controllers[0].domElement.hidden = true;
will hide the 'input' and only display the 'application controls'.

In J2ME, How to resize StringItem according to its content

I am developing Location based J2ME app for my final year project. In that I have created an array of StringItem in Appearance mode Item.BUTTON which displaying Place name & address in its Text area,returning this results from Google Places API. The length & content of the place name & address return by Places API is not fixed. That's why sometimes entire Place name & address fits in StringItem's by default size & sometimes it get over limit and only shows place name because of long place name.
I set the StringItem size by this code ResultStrItem[i].setPreferredSize(ResultStrItem[i].getPreferredWidth(), ResultStrItem[i].getPreferredHeight());
But, it is not giving me desire result.. What should I do... plzz suggest me as soon as possible....

disable scrolling when selecting text in richTextBox (C#)

I have a rich text box that contains (a lot of) text. I've added a search option for it, and when the user presses the search button, the program marks all the matches in yellow (by performing selectionBackColor on each selection) and then selects the first match.
The result is that the program looks like it "scans" the text and then selects the first match.
I don't want this to happen so I need to disable the autoscrolling (that occurs when performing Select()) for a specific code segment.
I searched this problem before posting and the main topics I found involved appending text, and that's not my case.
Any idea of how to solve my problem?
I'm using .NET framework 4 (visual studio 2010) and I write in C#.
Thanks in advance,
Guy
Well it seems that I'll answer my own question - all I had to do was to put these two lines among with the other class's properties:
[DllImport("user32.dll", EntryPoint = "LockWindowUpdate", SetLastError = true, CharSet = CharSet.Auto)]
private static extern IntPtr LockWindow(IntPtr Handle);
and surround the desired code segment with this at the start:
LockWindow(this.Handle);
and this at the end:
LockWindow(IntPtr.Zero);

Loading embedded resource .rtf file into richtextbox on load C#

Ok so I read about loading an embedded rtf into a rich text box and I am trying to do it when the form loads. The form is not the main form, it is a second form that loads when a control is clicked. This is what I have on the form when it loads:
private void Credits_Load(object sender, EventArgs e)
{
Assembly creditAssm = Assembly.GetExecutingAssembly();
using (Stream creditStream =
creditAssm.GetManifestResourceStream("YDisplayView.credits.rtf"))
{
creditsRichTextBox.LoadFile(creditStream, RichTextBoxStreamType.RichText);
}
}
In the solution explorer the rtf file shows as a resource and the build action is set to embedded resource.
when I click the button to load the form, it shows as expected, but nothing happens. The contents of the rtf doesn't seem to show :/
I can only assume I am doing it wrong :(
Any help for this newbie would be appreciated.
I figured it out:
creditAssm.GetManifestResourceStream("YDisplayView.credits.rtf"))
needed to be:
creditAssm.GetManifestResourceStream("YDisplayView.Resources.credits.rtf"))
Edit: For some reason this time around I can't get the above code to work but I found another one that did so hopefully either/or will be of some help to new coders out there :)
string rtf = yourAppName.Properties.Resources.yourEmbeddedRTFName;
yourRichTextBox.Rtf = rtf;
I wanted to create an rtf help file named Help.rtf and have it stored as a resource and so it could be loaded when a Help form was loaded without having a Help.rtf hanging around the application folders.
I found I needed to add the rtf file to the resources through the menu's Project-> 'Your name space' Properties... then navigate to Resources tab, then Add Item etc etc... before the intellisense would offer the rtf file in it's drop-down list when I typed 'My.Resource.' Now, the list of resources including the Help file I added shows up (without extension, which is normal).
In short, once this was done, then the following worked:
RichTextBox1.rtf = My.Resources.Help
Apparently it wasn't enough just to Drag&Drop, Copy or even add the file using the 'Solution Explorer'!
Spent 3 days on this problem so I hope someone finds it usefull.

Resources