In QTP (12.51) keyword view , how to edit the function call details? - automation

After add function call in keyword view, I want to edit this function call details.
How will edit this function call details ?

Your screenshot is in the keyword view, not the expert view.
To move to the expert view choose View ⇒ Editor and edit your script.

You mean you want to add parameters to the function call ?
you can double click on the value column for that function call line and it will show different parameters it can take and then you can add your parameter values
Parameters in keyword view
A basic overview of QTP keyword view is given in below link
http://www.softwaretestingclass.com/brief-overview-of-keyword-view-uftqtp-training-tutorial-11/
If you wanted to make customized functions I would suggest you to use the expert view and seperate function libraries
Let us know if you were looking for something else in answer.

Related

Pass table parameter to FM via selection screen

I need to call a function that has a table type as import parameter in a program. I thought about doing this with a selection screen but I can't use deep structures as parameters. When I 'TEST' that function module it shows me a thing where I can add multiple entries and submit everything in the end. Can I get something similar during the execution of a program?
edit: I have to offer a program that calls the function module create_skill_profile.
1
2
3
You can call the function module RS_COMPLEX_OBJECT_EDIT in your report for editing a complex structure. This is the same function module that is used for editing test data in the function module single test.
So, in your report, you could ask for the name of the desired type (if that has to be a dynamic one), and then, in start-of-selection, you can create a data object of this type and pass it to RS_COMPLEX_OBJECT_EDIT to let the user fill it.
A serious limitation of RS_COMPLEX_OBJECT_EDIT is that it can't handle sorted or hashed tables as input. So all the components of your complex structure, if they are of table kind, they have to be standard tables.
What I understand: You want to call a function module that requires a table as import parameter. The table's rows are filled from user input. The number of rows is dynamic.
Approaches:
1) use selection screen with predefined input fields and show/hide them dynamically via PAI (AT SELECTION-SCREEN (on xxx). LOOP AT SCREEN.) then build your table and call your function module on START-OF-SELECTION.
2) show editable ALV grid with table structure. Implement an application toolbar button or use SAVE button to let the user call your function module when he finished inserting his input.
I would defenitely prefer 2), although custom input validation is a bit tricky. But if the required user input is the same as ddic defined table structure the input validation happens automatically.

JetBrains: How to watch the return value of a function?

I have a question about debugging mode in JetBrains IDEs (PyCharm, WebStorm, IntelliJ ..). Let's say I have a line in the code that looks like this:
....func1()...func2()...func3()...
Several functinos are called in the same line, and none of them is assigned to a variable. Now, I want to know what is the return value of each of these functions. I know the feature Evaluate Expression, but I don't want to use it, since it may invoke these functions again.
Do you know any way to find the return values of a function without assigning its value to a variable and checking its value in debugger?
As of PyCharm 2016.2, you can show function return values; to do so, you need to:
Click on the Settings gear icon in the left-hand toolbar of the Debug panel
Ensure that Show Return Values is checked
Then when a Return Value is present, you will see it listed under Return Values at the top of the Variables section of the Debug panel (and that information is retained while still in the calling function)
I don't think that this is possible right now but you could set breakpoints inside the functions itself.
Additionally you could add a "Disable until selected breakpoint is hit" + "Disable again" and join them with a breakpoint above the line you posted to make sure they are only called from this line.
Or simply refactor your code:
foobar.huey()
.dewey()
.louie();
and set line breakpoints as usual.
I was looking also for this, and I can link you an answer I found, extending the answer of David Fraser: in IntelliJ, someone replied with screenshots to a similar question in this same site:
java - Can I find out the return value before returning while debugging in Intellij
Remember to put a breakpoint inside the function and step out :)
As said there (although it includes screenshots, much better than this) by the user Birchlabs:
On IntelliJ IDEA 2016.3: it's hidden inside the cog button of the
debug panel. Ensure Show Method Return Values is checked.
IntelliJ IDEA 2016.3 "Show Method Return Values"
Use the debugger to break somewhere inside the function whose return
value you'd like to see.
step into function
Step out of the function (or step over until you escape):
step out
Observe that the return value appears in your variables:
observe the return value

How can I make parameters optional?

I need some help with pentaho report designer.
I've used some parameters to filter my data, but, it seems that I'm obliged to filter on these parameters to show data on my charts.
So, this is what I want, I need to make my parameters optional. It means that I want to show global views even if I don't select a parameter.
Any thoughts?
Untick the mandatory checkbox in the parameter settings dialog.
You must create a hidden parameter; Let's call it "Flag" that tests whether the parameter are set, by using this post-processing formula.
=OR(ISNA([date_from]); ISNA([date_to]))
and then in your query reference that new parameter:
Select .....
where ${Flag} = TRUE OR (date between ${date_from} and ${date_to})

Documentation for user-defined functions in Scilab

I'm finishing a Scilab project for school, and I've added comments to all my function based on this passage from the documentation:
Inside a function, the first comment lines, up to the first instruction or an empty line may be used to provide the default contents for the function help.
Yet help does not display the comments when I type help myfunction. Instead, it launches the help browser, on the search page.
Any ideas? Basically I'm looking for an equivalent of Matlab's "H1 lines" and "Help text".
The right instruction is
head_comments myfunction
When there is no native function named myfunction and myfunction is known as a user-defined one, indeed it would be fine to use directly
help myfunction
This wish is reported # http://bugzilla.scilab.org/10785
You have to use this function to convert comments to a help page:
http://help.scilab.org/docs/current/en_US/help_from_sci.html
and then compile it.

How to use the data store to set a toolbar title in Sencha Touch

I am trying to set the toolbar item dynamically. So far I have a back button that resets the toolbar title to 'start' if the user chooses to go back.
But the following code won't work:
menuList.on('itemtap', function(dataView, index, item, e){
viewport.dockedItems.items[0].setTitle('{title}');
});
It tries to use a variable called 'title' out of my data store array. This works great for providing text to my Ext.List items. But the above code sets the toolbar title to the string '{title}' without even thinking of it being a variable.
Can you help me out?
List's use templates so items within curley braces get evaluated... you'll need to pass a reference to a variable without quotes. You haven't provided enough code for me to tell you where that information would be. If you already have a variable in scope called title that you put the data into then you can just reamove the '{ and }' ... otherwise you'll need to get the data you need from your store through some means, like Ext.StoreMgr or [appname].stores
Two things. 1) You will really want to get used to digging into the ST source code. In this case, if you look at the code for "setTitle", you will see that its argument is interpreted as straight HTML, not a template. So you can't use curly bracket syntax here. 2) Note that the type of the "item" argument to the event handler is an Element (i.e. ST's representation of the DOM object, not the selected datastore object. So that's not going to help you. However, the "index" arg gives you an easy way to get the appropriate object from the store. i.e.
[appname].stores.pages.getAt(index).title
I really don't know why, but it works if you put up to variables: One for the record and one for the value inside that record. There is a detailed explanation in the sencha.com-forum