Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
UFT Connection with Mongo DB
#2
I'm not really sure if the latest UFT version supports MongoDB. You may refer the product availability matrix (PAM.pdf) for the same. However, here is a workaround if it doesn't.
You can connect to MongoDB using .net/java languages since there are drivers for it.
Create a java jar which exposes methods like connect, execute, disconnect etc on MongoDB and call them from vbscript. This jar should also save the output of a query to excel. You can then invoke this jar or (executable jar) from command prompt and have the output sent to excel which can be used furthur for validations.
Code:
Systemutil.Run "cmd.exe"
Window("object class:=ConsoleWindowClass").Maximize
window("object class:=ConsoleWindowClass").Type "cd <location of executable jar"
window("object class:=ConsoleWindowClass").Type <excutablejar.jar>
window("object class:=ConsoleWindowClass").Type micReturn
Reply


Messages In This Thread
RE: UFT Connection with Mongo DB - by ravi.gajul - 07-16-2015, 01:13 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)