This is my code. in the below function am retriving caption and url. all i do is get the caption and store in a variable called 'RR' and get the url and concadenate with 'RR' string.
I get the output. But i need that in a formated way that is i need to feed a new line character to the string to make new line before it put the
URL in the notepad.
</font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">Function TimeKeeping()
If Browser("name:=Welcome to eWorkplace.*".Page("title:=Welcome to eWorkplace.*".exist then
MsgBox "Time keeping exists"
CaptionVal = Browser("name:=Welcome to eWorkplace.*".Page("title:=Welcome to eWorkplace.*".GetROProperty ("title"
If CaptionVal ="Welcome to eWorkplace®" then
RR = "Time Keeping" + " Caption is correct " + CaptionVal
RR = RR + "Time Keeping" + " Caption is Incorrect " + CaptionVal
Urlval=Browser("name:=Welcome to eWorkplace.*".Page("title:=Welcome to eWorkplace.*".GetROProperty ("url"
If UrlVal = "https://login.fidelity.com/ftgw/Fide...ome.html" Then
RR = RR + "Time Keeping " + " URL is Correct " + UrlVal
RR = RR + "Time Keeping " + " URL is InCorrect " + UrlVal
MsgBox("Time Keeping not there"
End Function</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">Note: am going to call the OpenTextFileTest(RR)
only one in a function. (I can attain wht i want if i call after each assignment to the string RR.)
Also i use WriteLine in the function OpenTextFileTest.
Add the following to the end of your string where you want the newline to be: chr(13)
- this is the carriage return ascii code. So strTest = "Hello" + chr(13) + "World" will display "Hello" and "World" in two lines.
You can use vbCR or vbCRLF or vbLF or vbNewLine instead of chr(13). Every application has a different representation for new line. Excel uses vbLF as the new line character while Word uses vbCRLF as the new line character