Execute RFT script on a button click from VB.NET - rft

I have automation scripts in RFT. I have designed UI in VS2012(coding in aspx.vb) which takes all the input fields here. I need to execute the RFT script on a click of a button taking all the fields from UI as arguments. Any help??
Thanks in advance.

You can use RFT command line interface.

could you elaborate on the issue more ?
need to execute the RFT script on a click of a button
which button are you referring to ?
EDIT - I hope it's not too late , What I understand is that from your application (ASP.NET based) , you want to execute an RFT script based on the parameters of the input fields in the application .
For that depending on the type of RFT scripts you have (VB scripts or Java Scripts)
you can use one of the following:
java -jar <BIN>\rational_ft.jar -datastore <path to the project> -playback <scriptname without extn>
or
<BIN>\rational_ft.exe -datastore <path to the project> -playback <scriptname without extn>
Both , rational_ft.jar and rational_ft.exe reside in the BIN directory of RFT installation .
(Usually C:\Program Files\IBM\SDP\FunctionalTester\Bin on a 32 bit windows machine).
From your application you would need to be able to start a process and you should be good to go.

Related

Automation for terminal commands input in IntelliJ IDEA-family IDEs?

If frequently input similar commands in IDE's terminal, can I automate it somehow?
For example, I use PhpStorm and frequently create MVC-controller in Laravel framework by console command like php artisan make:controller CotrollerName. The ideal that I want:
Some simple action like shortcut pressing
Modal window "Please, input controller name".
Pressing Enter
Then IDE will automatically input php artisan make:controller InputtedCotrollerName to console and run it.
What is currently possible instead of this?
I think you overcomplicate things, simple alias would be better for this, like:
alias pamc='php artisan make:controller '
which then you can use in PHPStrorm by opening embedded terminal (Alt + F12 by default) and typing pamc ControllerName
As seems like you use Laravel you could consider using the Laravel plugin for PhpStorm. Which should provide most of the functionality you want, and a bit more.
Or
you can do what streetturtle suggested and create alias. They can save lots of writing time.

How to run code from sql file directly from toad oracle

i have a *.sql file on my desktop. How can i create a job in toad for oracle so that it can directly pick up the file and run it everyday at a specific time.
thank you
What version of Toad? If it's a somewhat newer one, check out the Automation Designer. It's available from the Utilities menu.
Create a new app on the left side, give it a meaningful name
On the DB Misc tab double click the Execute Script action to add it to your app.
Double click the new execute script action and add your file to it. Set other options within as desired.
Click Apply and exit the script action properties dialog.
Right click on your script action and choose Schedule. Work through the Windows Task Scheduler prompts and it will be setup for you.
well different version of the TOAD have different options
the best way i would suggest you is - on the button "Execute as script"
Execute as script --> Execute via SQL plus
then the SQL-plus window will pop up and it will auto connect to your DB.
Gather all your sql queries / script in the file and run below command
#C:\Users\Desktop\script.sql
this will start executing the script from file directly and will give the log in the SQL plus window.

Juno IDE for Julia, how to interact?

One way to comfortably use an IDE in an interactive language is to interact via the IDE in a command line environment. I am wondering if that is a possibility in Juno. In other words, is there a command line environment as in Matlab, to call functions, give initial values, and run expressions. If so what is the way to access it?
Note: There is a console window in Juno, but I can't find a way to insert my commands inside that.
Note: The question and this answer apply to the version of Juno that was based on LightTable. The current version is based on Atom and has an interactive console.
You can't enter commands into the console in Juno--that's for displaying output. Commands can be submitted from within the editor by setting your cursor in the line to submit and pressing Ctrl+Enter or Shift+Enter. The value will then be displayed in a small popup next to the line and the output will be printed to the console if you have the console visible.
Note that the inability to use the console as you desire is by design. See here for information about the console from the Juno docs.

How do I use Selenium IDE on Firefox to test JavaScript generated codes?

I am trying to test a website which contains alot of javascript.
Javascript does alot of opening new dialog to let user choose "yes" or "no".
It also has a function to upon right clicking, it opens up a right click menu which contains many functions such as zip, delete etc.
In Selenium, I can use the Selenium IDE to login, click, and others, but I don't know how to test those functions.
I've read there are codes I can write such as in Java to run the test, but I'm hoping to make it work by using the simple Selenium IDE if possible. If not, then can someone post a simple testing code which works to run java scripts? Such as click button -> javascript menu pops up -> click ok on the pop up.
Thank you very much.
Right context menus can be a little tricky. I'd suggest making custom commands for the right click context menu. Add the code from this article to your custom user-extensions.js file.
http://old.nabble.com/How-to-recognise-right-click-of-the-mouse-in-IDE-td14913052.html
The parameters for these functions in these commands become the expected arguments of your Selenium IDE commands. If you really want to make it simple, you can just call your javascript functions in these custom user-extension commands. :-) That might be a bit lazy and isn't truely testing what your right click is doing, but it would work.
Option #1 - if using IDE:
Specify the user-extensions.js file under Selenium IDE > Options (menu) > Options (menu option) > General Tab, then browse to your file under "Selenium Core Extensions".
Option #2 - if using Selenium RC Server:
If you're not using the IDE and using Selenium RC server with a client driver (like JUnit for example), you must specify the path of the *.js file with the -userExtensions parameter when you start the Selenium RC Server on the command line. But you said you just wanted to use the IDE, so I'd ignore this. It takes quite a bit of other setup to use the Selenium RC server.
java -jar selenium-server.jar -userExtensions user-extensions.js
=======================
I've never done this before, so I made the following custom command (JavaScript function) in my custom user-extensions.js file, and it worked well for me. I had to exit and restart the IDE before it found it. For some reason, you type everything after the "do" in the "Command" field in the IDE. It looks like it also added a "customAlertAndWait" to the IDE as well.
Code in user-extensions.js file:
Selenium.prototype.doCustomAlert = function(sTarget, sValue) {
alert('Target: ' + sTarget + ' ... Value: ' + sValue);
};
Selenium IDE command details:
Command: customAlert
Target: custom alert target
Value: custom alert value
The selenium IDE has a lot of tools to verify that specific elements are present and that the value is correct.
To set something up, you would create a test case, and start to record it. When you get to a page where you have to verify that something exists, right click on that element, and you will see a lot of Selenium commands tagged at the bottom of the click menu, such as "VerifyTextPresent" or "verifyValue" or "verifyElementPresent" When you select those commands, they will appear in your test case, and will fail if the verification fails.

Extract the contents of cmd.exe IDE to a text file using autohotkey scripts

I am trying to extract the contents of cmd.exe IDE to a text file using autohotkey scripts ie one test.ahk and its written as shown below:
WinGetText, text, "C:\WINDOWS\system32\cmd.exe"
FileAppend, %text%, C:\ThreePartition\ACTUAL.txt
I am not able to extract the contents. Can anyone please suggest the correct way to do the extraction?
The text retrieved is generally the same as what Window Spy shows for that window.
The Window Spy shows no text elements for CMD windows - what you see is not necessarily what you can get :)
What you can do is to simulate the Select All and Paste commands, and then use the clipboard contents.
I don't believe you can extract the contents of a cmd window without somehow using DllCall to read the process memory directly.
If you just want the output of a CLI command such as Grep or AWK, using stdout via the run command should work. Honestly though, I stopped relying on AHK because this sort of thing is just too clunky.
http://www.autohotkey.com/docs/commands/Run.htm.
Edit for comments:
What you want is doable, but the solution depends entirely on how your IDE works. What behavior does it have that's unique to building a project? If it makes temp files, you can overload your "build" button with an AHK subroutine that watches for the existence of those files, and then checks the modified date of the output executable to see if the build succeeded. The same kind of solution works if the IDE changes its window title when building. Be clever. :)
Failing that, you might have to install a message hook.