Monday, 10 June 2024
Sunday, 10 March 2024
Divey's Trip to Udaipur
B. Fatehsagar Lake:
D.Pichola lake
Tuesday, 3 January 2023
Divey's Trip to Jaipur
Sunday, 18 October 2020
Murli Saar – 19th Oct’20
मीठे बच्चे - तुम्हें अभी बहुत-बहुत साधारण रहना है, फैशनेबुल ऊंचे कपड़े पहनने से भी देह-अभिमान आता है
- बाबा कहते बच्चे अपना सुधार करने के लिए चार्ट रखो। याद का चार्ट रखने में बहुत फायदा है। नोट बुक सदा हाथ में हो। चेक करो कितना समय बाप को याद किया? हमारा रजिस्टर कैसा है? दैवी कैरेक्टर है? कर्म करते बाबा की याद रहती है? याद से ही कट उतरेगी, ऊंच तकदीर बनेगी।
- मीठे-मीठे बच्चों पास यह लक्ष्मी-नारायण का चित्र घर में जरूर होना चाहिए। सबके लिए यह एक ही उद्देश्य है।
- जरूर भक्तों पर कोई आपदायें हैं। 5 विकारों की आपदायें सबके ऊपर हैं।
- जब ज्ञान मिलता है तो फिर भक्ति नहीं रहती। तुम सुखधाम के मालिक बनते हो। आधाकल्प के लिए सद्गति मिल जाती है।
- काम पर जीत पाने से तुम जगतजीत बनेंगे।
- तुम्हारा ज्ञान और योग सारा गुप्त है। स्थूल हथियार आदि कुछ नहीं हैं। बाप समझाते हैं यह है ज्ञान तलवार। उन्होंने फिर स्थूल हथियार निशानियाँ देवियों को दे दी हैं।
- यह तुम्हारी बात बहुत ढेर मनुष्य सुनेंगे। विद्वान आदि भी एक दिन आयेंगे। बेहद का बाप है ना। तुम बच्चों को श्रीमत पर चलने में ही कल्याण है तब देह-अभिमान टूटेगा, इसलिए साहूकार लोग आते नहीं हैं। बाप कहते हैं देह अहंकार को छोड़ो। अच्छे कपड़े आदि का भी नशा रहता है।
- दिन प्रतिदिन यह हंगामा आदि ज्यादा बढ़ता जायेगा इसलिए बाप कहते हैं अपने को आत्मा समझ मुझे याद करो। देह-अभिमान में आने से बाप को भूल जायेंगे। यह मेहनत अभी ही मिलती है।
- लड़ाई भी जरूर होगी। एटॉमिक बाम्ब्स आदि खूब बनाते रहते हैं। कितना भी माथा मारो कि यह बन्द हो जाए परन्तु ऐसे हो नहीं सकता। ड्रामा में नूँध है। समझाने से भी समझेंगे नहीं। मौत होना ही है तो बन्द कैसे होगा।
- यादवों और कौरवों को खलास होना ही है। यादव हैं यूरोपवासी। उन्हों का है साइन्स घमण्ड, जिससे विनाश होता है। फिर जीत होती है साइलेन्स घमण्ड की। तुमको शान्ति घमण्ड में रहना (शान्त स्वरूप रहना) सिखाया जाता है। बाप को याद करो - डेड साइलेन्स।
- हम आत्मा शरीर से न्यारी हैं। शरीर छोड़ने के लिए जैसे हम पुरूषार्थ करते हैं, ऐसे कभी कोई शरीर छोड़ने के लिए पुरूषार्थ करते हैं क्या?
- सारी दुनिया ढूँढकर आओ - कोई है जो बोले - हे आत्मा अब तुमको शरीर छोड़ जाना है। पवित्र बनो। नहीं तो फिर सज़ा खानी पड़ेगी। सज़ा कौन खाते हैं? आत्मा। उस समय साक्षात्कार होता है। तुमने यह-यह पाप किये हैं, खाओ सज़ा।
- बाप कहते हैं - अभी कोई पाप कर्म नहीं करो। अपना चार्ट देखो - कितना समय बाप को याद किया।
- कर्म करते हुए भी बाप को याद करना है तो पुरूषार्थ का फल मिल जायेगा। मेहनत है ना। ऐसे ही थोड़ेही ताज रख देंगे सिर पर।
- वह बेहद का बाप ही पतित-पावन, सुख का सागर है। उनसे ही सुख घनेरे मिलते हैं।
- जन्म-जन्मान्तर के लिए तुमको महल मिलते हैं। सुदामा का मिसाल है ना।
- तुम जानते हो - शिवबाबा को जो देते हैं वह सब हमारे ही काम में लगाते हैं। शिवबाबा तो अपने पास रखते नहीं हैं।
- इनको भी कहा सब कुछ दे दो तो विश्व के मालिक बन जायेंगे।
- जितना पुरूषार्थ करेंगे उतना ऊंच पद पायेंगे।
- तुमको अब भोलानाथ बाप मिला है। कितना भोला है। तुमको क्या बनाते हैं। कखपन के बदले तुमको 21 जन्म के लिए क्या बना देते हैं। मनुष्यों को कुछ भी पता नहीं।
- परन्तु यह भी किसको पता नहीं है कि भगवान किसको कहा जाता है। कोई से भी पूछो - परमपिता परमात्मा को जानते हो? बाप है बागवान। तुमको कांटों से फूल बना रहे हैं।
- जो खुद जाग जाते हैं तो दूसरों को भी जगाते हैं। नहीं जगाते हैं तो गोया खुद जगा हुआ नहीं है।
- रात के राही थक मत जाना - यह भी अच्छा है।
- बाप कहते हैं यह साक्षात्कार आदि की सब ड्रामा में नूँध है। जो भावना रखते हैं उसका साक्षात्कार हो जाता है।
धारणा के लिए मुख्य सार:-
1) बुद्धि में सदा अपनी एम ऑब्जेक्ट याद रखनी है। लक्ष्मी-नारायण का चित्र सदा साथ रहे, इसी खुशी में रहो कि हम ऐसा बनने के लिए पढ़ रहे हैं, अभी हम हैं गॉडली स्टूडेन्ट।
2) अपना पुराना कखपन चावल मुट्ठी दे महल लेने हैं। ब्रह्मा बाप को फालो कर अविनाशी ज्ञान रत्नों का जौहरी बनना है।
वरदान:- अशरीरी पन के इन्जेक्शन द्वारा मन को कन्ट्रोल करने वाले एकाग्रचित्त भव
जैसे आजकल अगर कोई कन्ट्रोल में नहीं आता है, बहुत तंग करता है, उछलता है या पागल हो जाता है तो उनको ऐसा इन्जेक्शन लगा देते हैं जो वह शान्त हो जाए। ऐसे अगर संकल्प शक्ति आपके कन्ट्रोल में नहीं आती तो अशरीरीपन का इन्जेक्शन लगा दो। फिर संकल्प शक्ति व्यर्थ नहीं उछलेगी। सहज एकाग्रचित हो जायेंगे। लेकिन यदि बुद्धि की लगाम बाप को देकर फिर ले लेते हो तो मन व्यर्थ की मेहनत में डाल देता है। अब व्यर्थ की मेहनत से छूट जाओ।
स्लोगन:- अपने पूर्वज़ स्वरूप को स्मृति में रख सर्व आत्माओं पर रहम करो।
Tuesday, 20 October 2015
#20. How to check mark a particular text box corresponding to a given mail on GMail Inbox?
Ans.
Create 2 description objects.
Using first object, collect all the check boxes.
Using second object, collect all the mails. See, if all the mails are being collected as links, if not, then they can be collected as webelements (each of the webelements will correspond to a particular class).
Find the index of the webelement which corresponds to the given mail.
Click on that index of the check box.
This will check mark the required check box.
Q. Count number of google search results
Ans.
Create description object
Define its micClass as Link and define its class and height to make it unique.
Thru this, we can count objects, that is the number of google search results
Monday, 19 October 2015
#19. Order to follow while trying to identify an object
1. Description Properties
2. Ordinal Identifier
3. Smart Identification
(Visual Relational Identifier, very rarely used)
4. If object is dynamic, then regular expressions.
5. While dealing with bulk amount of objects or when we don't want to use OR, then Descriptive programming.
6. Low level recording - either thru code (settings.webpackage("ReplayType") = "2") or by given recording mode in QTP.
7. OCR
8. Virtual Objects
9. Analog recording - if in case we need to record mouse movement.
#18. Location Index
Q. In which pattern does QTP identify objects:-
A. Location is indexed in the below pattern (The below numbers represent location index of objects):-
1 7
2 8
3 9
4 10
5 11
6 12
OR,
B. Location is indexed in the below pattern (The below numbers represent location index of objects):-
1 2
3 4
5 6
7 8
9 10
11 12.
Answer: B
This knowledge can be used during descriptive programming to identifying objects.
Wednesday, 14 October 2015
#17. Excel Functions using QTP
Set xlApp= CreateObject("Excel.Application")
xlApp.Visible=true
xlApp.DisplayAlerts=false
Set sheet= nothing
Set myXLS= nothing
Function BrowserMaximize(Object)
Dim hwnd
hwnd = Object.GetROProperty("hwnd")
On error resume next
Window("hwnd:="&hwnd).activate
If err.Number<>0 Then
hwnd = Browser("hwnd:="&hwnd).Object.hwnd
Window("hwnd:="&hwnd).activate
err.clear
End If
Window("hwnd:="&hwnd).Maximize
On error Goto 0
End Function
' saves the xl file and destroys all objectects related to it
Function destroyFile
' destroys sheet
If NOT sheet is nothing Then
Set sheet=nothing
End If
' destroy xl file
If NOT myXLS is nothing Then
myXLS.save
myxls.close
Set myxls=nothing
End If
End Function
Function destroyXLSApp
destroyFile
If NOT xlApp is nothing Then
xlApp.Application.Quit
Set xlApp=nothing
End If
End Function
' checks if a file exists
Function isFileExisiting(filePath)
Set fso = createObject("Scripting.FileSystemObject")
If fso.FileExists(filePath) Then
isFileExisiting=true
else
isFileExisiting=false
End If
End Function
' Checks if sheet is existing
Function isSheetExisting(filePath,sName)
Dim totalsheets,sNum
totalsheets = myXLS.Worksheets.count
For sNum=1 to totalsheets
If myXLS.Worksheets(sNum).name = sName Then
isSheetExisting=true
Exit Function
End If
Next
isSheetExisting=false
End Function
' write data in xls file
Function writeData(xlFilePath,sName,row,col,data)
If xlPath <> xlFilePath Then
' destroy previous xls opened - if
destroyFile
' check if the file is existing
If NOT isFileExisiting(xlFilePath) Then
msgbox "File not found " & xlFilePath
exitTest
End If
' open the xl file
Set myXls = xlApp.Workbooks.Open(xlFilePath)
xlPath=xlFilePath
' check if sheet is present
If NOT isSheetExisting(xlFilePath,sName) Then
msgbox xlFilePath & " has not got sheet - " & sName
exitTest
End If
' open the sheet of xl file
Set sheet=myXls.Worksheets(sName)
sheetName=sName
' file is same but sheet is diff
ElseIf sheetName <> sName Then
' check if sheet is present
If NOT isSheetExisting(xlFilePath,sName) Then
msgbox xlFilePath & " has not got sheet - " & sName
exitTest
End If
'destroys sheet
If NOT sheet is nothing Then
Set sheet=nothing
End If
' open the sheet of xl file
Set sheet=myXls.Worksheets(sName)
sheetName=sName
End If
' write data
sheet.Cells(row, col).Value =data
myXLS.save
End Function
' Reads the data from XLS File
Function readData(xlFilePath,sName,row,col)
If xlPath <> xlFilePath Then
' destroy previous xls opened - if
destroyFile
' check if the file is existing
If NOT isFileExisiting(xlFilePath) Then
msgbox "File not found " & xlFilePath
exitTest
End If
' open the xl file
Set myXls = xlApp.Workbooks.Open(xlFilePath)
xlPath=xlFilePath
' check if sheet is present
If NOT isSheetExisting(xlFilePath,sName) Then
msgbox xlFilePath & " has not got sheet - " & sName
exitTest
End If
' open the sheet of xl file
Set sheet=myXls.sheets(sName)
sheetName=sName
' file is same but sheet is diff
ElseIf sheetName <> sName Then
' check if sheet is present
If NOT isSheetExisting(xlFilePath,sName) Then
msgbox xlFilePath & " has not got sheet - " & sName
exitTest
End If
' destroys sheet
If NOT sheet is nothing Then
Set sheet=nothing
End If
' open the sheet of xl file
Set sheet=myXls.sheets(sName)
sheetName=sName
End If
' read the data from the sheet
readData = sheet.cells(row,col)
End Function
'returns total cols in xls file
Function getColumnCount(xlFilePath,sheetName)
Dim totalCols
totalCols=0
While readData(xlFilePath,sheetName,1,(totalCols+1)) <> ""
totalCols=totalCols+1
Wend
getColumnCount=totalCols
End Function
Function getRowCount(xlFilePath,sName)
Dim i, j, flag, r, c
If xlPath <> xlFilePath Then
' destroy previous xls opened - if
destroyFile
' check if the file is existing
If NOT isFileExisiting(xlFilePath) Then
msgbox "File not found " & xlFilePath
exitTest
End If
' open the xl file
Set myXls = xlApp.Workbooks.Open(xlFilePath)
xlPath=xlFilePath
' check if sheet is present
If NOT isSheetExisting(xlFilePath,sName) Then
msgbox xlFilePath & " has not got sheet - " & sName
exitTest
End If
' open the sheet of xl file
Set sheet=myXls.sheets(sName)
sheetName=sName
' file is same but sheet is diff
ElseIf sheetName <> sName Then
' check if sheet is present
If NOT isSheetExisting(xlFilePath,sName) Then
msgbox xlFilePath & " has not got sheet - " & sName
exitTest
End If
' destroys sheet
If NOT sheet is nothing Then
Set sheet=nothing
End If
' open the sheet of xl file
Set sheet=myXls.sheets(sName)
sheetName=sName
End If
r = sheet.usedrange.rows.count
c = sheet.usedrange.columns.count
flag = 0
For i = r to 1 step -1
For j = c to 1 step -1
If sheet.Cells(i, j)<>"" Then
flag = 1
Exit For
End If
Next
If flag = 1 Then
Exit For
End If
Next
r = i
getRowCount = r
End Function
Monday, 3 March 2014
#16. Blank Screens through CaptureBitmap
Blank Screens through CaptureBitmap method can be encountered if the system gets locked when the automation scripts are running. To avoid this, it can be assured that the system doesn't get locked when the scripts are getting executed.
This can be done by calling the following function through the automation scripts:-
Public Function AntiSleep()
Dim iter
randomize
iter = randomNumber(0, 100)
Dim objDeviceReplay
Set objDeviceReplay = CreateObject("Mercury.DeviceReplay")
objDeviceReplay.MouseMove iter,300
Set objDeviceReplay = Nothing
End Function
The above function can be called in an automation script using QTP, and the script can be scheduled to run through control panel recursively.
Monday, 17 February 2014
#14. QTP Web ReplayType Setting
ReplayType is QTP Web Add-in setting. It can be used to change how the events are replayed on the browser. There are two modes of ReplayType
- Events (1) – Replay of events using the Browser methods (something similar to DOM).
- Mouse (2) – Replay of events using the mouse and keyboard simulation.
Use of ReplayType can be best explained by a below example. In below sample textbox we need to type in any value and see that the button gets enabled when there some text in the textbox and disabled when there is not text. Click on the button will display the values inside the textbox.
Scenario #1
Type in textbox and enable the button:
Now when we record using QTP on this page we would get the below code
1
2
|
Browser("").Page("ReplayType").WebEdit("txtReplayType").Set "KnowledgeInbox"
Browser("").Page("ReplayType").WebButton("Type and enable me").Click
|
But on replay QTP will throw a “Object is disabled” error as shown in below image
QTP throws above error as the ReplayType of the Web Add-in is set to 1 (Events). Let’s look at the HTML code related to the text box
1
|
<input onkeyup="EnableThis(this, document.getElementsByName('btnReplayType')[0])" name="txtReplayType" size="20" type="text" />
|
The input text box has a handler for onkeyup event. Now with ReplayType as 1 (events) QTP just goes and sets the value of textbox which means non of the events get fired. Now there are two possible solutions for the same. We will look at each of them one by one
Solution #1
Firing the handled event manually using FireEvent. In this approach we need to look into the HTML and see which event has a handler and fire the same after changing the value of the textbox
1
2
3
|
Browser("").Page("ReplayType").WebEdit("txtReplayType").Set "KnowledgeInbox"
Browser("").Page("ReplayType").WebEdit("txtReplayType").FireEvent "onkeyup"
Browser("").Page("ReplayType").WebButton("Type and enable me").Click
|
Solution #2
Changing ReplayType to 2 (Mouse) will instruct QTP to replay the Set method using Keyboard and mouse simulation. This would simulate a actual user typing into the browser
1
2
3
4
|
Setting.WebPackage("ReplayType") = 2 'Mouse
Browser("").Page("ReplayType").WebEdit("txtReplayType").Set "IK"
Browser("").Page("ReplayType").WebButton("Type and enable me").Click
Setting.WebPackage("ReplayType") = 1 'Events
|
We saw two of the few possible solutions. Which one should be used then? IMO we should first go for Solution #1 and if that does not work then for Solution #2. The reason behind that opinion is that ReplayType=2 means that your workstation needs unlocked when QTP replays the script.
Scenario #2
I won’t demonstrate the 2nd scenario but would just give overview of the same. For some links which opens popups, when clicked manually popup would open. But when we do the same thing through QTP it IE popup blocker would show a popup blocked message. IE popup blocker is said to be smart enough to determine if a user clicked a link or it was done through code and based on the same the popup is blocked or shown. Changing ReplayType to 2 (Mouse) would simulate a user click and not give the popup bar.










