![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBoxdM_aV87dKJN4aAe9aHn47HMAFTe9zMY4QTv1Wl_GpYTLK4mBJV16QVRGoEVHHRvJemF-agTYJnhyphenhyphenN5eHuIppLEef_AqB4hnyMazxZrbKh0aj9lZISml1lCudxtHN8lyjbIkioBYbY/s320/QTPVBScripts.png)
As you know in my previous post, we can invoke java methods from QTP, also we can invoke VBScript from Java. However, it doesn't looking good when our Java code contains VBScripts, So it's better to write our test cases it in pure Java. Like the example below.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_8hccrPtLLlhRLyOI9blDlh-VHD_65F00CTu1cH4_X-OPO4UweHo6Kx7G1dfrBtkBO8lkwny1DhkqyPzpC7KNPWlPwxu8MwX9Lvl1VRfMSZUiWtp9U_ctm_WwGI9Gnpc08MY2snxU22c/s320/jqtp.png)
As you can see above my test case doesn't contains VBScript anymore. For more information regarding write QTP test case in pure java please go to http://jqtp.blogspot.com