Selenium IDE: Comparing two variables - selenium-ide

I'm using the Selenium IDE on chrome (version 3.4.4)
I want to test if clicking a button adds a new row to a table.
I thought I'd just:
count the rows of the table before clicking (store the number in a variable)
clicking the button
count the rows of the table again and store this number in a different variable
Check if the second variable is one higher than the first
How do I do this?
If there are better solutions to this problem I'll be happy to hear them.

Related

Selenium IDE - not able to click into html table rows/columns to insert data

I am using Selenium IDE to automate a few scenarios for a Content Management System. Selenium is able to insert a table (similar to the table in MS word) but not able to click into the rows and columns to insert data. On selecting the step and clicking on "Find Target in page", the expected column is highlighted. Tried using Type and Sendkeys to pass data, neither works. Not sure how to get over this roadblock. Any help would be appreciated. Thanks!

apex tabular form icon link column

I am working with a wizard-generated Tabular Form column that needs to display an icon which launches a Javascript function and pass the row value into the function when clicked. The function launches a popUp2 window which sets the values of other fields on that row. So the row number is crucial, but it is always 0 for newly-created rows (in APEX 4.0.0.00.46). I managed to solve that problem by storing the rowNum of new rows into my Updated By column during AddRow.
What I have now is an Updated By column ("Lookup" Heading) which stores the row number of new rows, has onClick="javascript:usePopup(this);" in the Element Attributes which launches the popUp window function, and then gets any values under 2 digits wiped before submit. This fills the correct fields and submits to the table with no problem.
I can't keep using the Updated By column for this function, though. There are currently reports running on this table, so I can't add a new column to the table. I need a dummy column to display the icon, temporarily store the Row Number of newly created rows, and not mess up the MRU. It is f08, so the value of f08_0005 needs to be 0005. I tried making a null column with
select
"FUEL_USAGE_DETAIL_ID", ...
"EXPENSE_TO_PROJECT",
"EXPENSE_TO_TASK",
NULL Lookup,
"UPDATED_BY",
"PROVIDER"
from "#OWNER#"."FUEL_USAGE_DETAIL"
but that can't submit. I get the Error in mru internal routine: ORA-20001: Error in MRU: row= 1, ORA-20001: ORA-20001: Current version of data in database has changed since user initiated update process. current checksum = "01A949FAF0B3A91914ECACCDC9BBA9E6", item checksum = "B6ADF86455B14EF691B2AFB314926A0D".
Please help me create a null column to display this icon, store the row number of all the rows (including the brand new rows), and not mess up the MRU. If you need pictures of what I have and what I need, see my other thread: https://community.oracle.com/thread/3649771 Thank you!
Fractal65,
Do not add any null column in tabular form.
just go to>>Edit tabular form attribute make following change
you will get it position as f02_000X (x-rownum)
now uou can use this rownum value in javascript or anything.
Hope this helps.
I had a similar error with my last project. Do you have a none displayed row selector? Please try to delete it to see if it will work.

JasperSoft Studio Create Incrementing Gift Cards

I'm using JasperSoft Studio to create a gift card with a barcode. These gift cards do not use any information from a database. They only value that changes is the barcode, which is incremented with a variable. All this is setup and it works.
What I can't figure out how to do is specify the number of gift cards I want to generate. For example, I'd like to print out 100 gift cards. So, the report should generate 100 pages each with an incrementing barcode. I figured I could use a parameter that gives me a prompt when I go to preview, but I don't know how to use that parameter to actually tell Jaspersoft how many pages I want.
For anyone interested, I came up with a solution to this. Here is the JRXML. There is a prompt that asks how many labels you want and the starting point for the barcode id.
One thing to note is the query:
SELECT * FROM dbo.RowGenerator rg WHERE rg.row_num <= $P{HowMany}
This is assuming a Sybase database, so it may not necessarily work on different DBMS's. What this query does it build a resultset of rows with rg.row_num being an incrementing id for each row. For whatever DBMS you use, this will need to be reproduced.

In SSRS 2008, is there any way to add all dataset fields to a table at once?

I'm working with SSRS for the first time. When adding a table to a report, is there any way to add all fields of a dataset to it at once or does it have to be done individually? Drag & drop, insert column -> right is a pain when there are a lot of fields that are being displayed.
It's a bit of a workaround, but the "Add new report" wizard automatically creates a table with the specified columns and groups from your given dataset. I don't believe there's a way to trigger this functionality from within an existing report, but you could create a "sacrificial" report to get what you're looking for - run through the wizard, generate the table, and copy / paste it into your original report. As long as your datasets are the same, it should work just fine...
Hope this helps.
I have a similar problem as the op and am new to SSRS/BIDS. And, I am updating a previously created report which (for me) is too complex to just quickly re-create using the "wizard generation" as the datasource is a web service (with code-generated web service parameters, lots of calc'd datasource fields, etc). It is faster to just copy the .rdl, delete all, and create the table manually.
I thought I would add that (only a little better than op's method, but nonetheless it is time-saving) you can just drag and drop to populate columns w/o the "right click > insert column > right". Just drag the dataset field to the place you want it in the table and BIDS/SSRS will automatically insert a new column. It also helps to drag the latter columns first (i.e. always inserting a previous column) so you don't have to scroll to the right all the time.
I was looking for the similar thing and I have figured this out. Open your report in Report Builder 3.0 which is a free BI tool by Microsoft. Go to Insert > Table wizzard. Then just follow the wizard steps to generate auto columns. Save and reopen the file in your visual studio, file will refresh itself.
Ved
#Kevin Fisher actually there is no need a workaround. There is way to do this out of the box of Report Builder 3. Open your existing favorite report template. on the tool bar, click on INSERT tab, look for TABLE icon, click on the down-ward arrow at the bottom of the TABLE icon, then choose TABLE WIZARD. Then I guess you know what to do from here. -hope this help.
I agree that there is no way to bring all of the columns over from the data set to a table easily. But I came up with a method that helped me:
Insert a blank table (this usually gives you 3 columns). Then insert columns to the right of the table (right click, Insert Column, To the Right), as many times as you need in order for it to equal the number of columns in your data set.
Once you have all the blank columns created in your table, click inside a table cell box and use the drop-down to select the field. This has the added benefit of allowing you to get the fields in the correct order, since I've noticed that the field names in the dataset don't always appear in the same order as the SQL stored proc output.

Prevent a text field within a portal from being truncated, filtering portal contents to display in another layout

I am already using Filemaker Pro 10, I have two questions:
I have a text field in a portal, and whenever I am entering values like "B12C45" in it, it works well, but when the string is longer like "BC12F42, B45z87" it doesn't show whole the strings and omits the letters from it. what Can I do?
My second question is that: I have a portal in a layout, in this portal every row has an id sometimes the id is repeated in other rows but the value of another field called Position is changing. Now I want to have those rows of this portal which have the same id in another layout. I have tried using scripts for it, but scripts don't work well in this case, and they are entering whole the portal in the new layout not the parts I want . How can I write a script which does this?
I will really appreciate any help.
For the first question there are many ways you could display more data in a field and the best one will depend on the particular implementation in your database. There are three main ways to solve this problem: field-size adjustments, text-size adjustments and programming adjustments to dynamically change the text-size.
Field-size adjustments include:
Making the field longer
Using the autosizing aspect of a field so that as the window grows, so does the field
Text-size adjustments include:
Making the font size for that field smaller.
Setting the font style for that field to condensed.
Programatically, though, three things stand out to me as possibilities. I like the third one the best for most of my solutions:
Set the tooltip for the field to "Self" (without the quotes). A user can see the entire contents of the field by hovering the mouse over the field.
In "Define Database" set the field's calculated value to: "TextStyleAdd(self;Condense)" (without the quotes) and make certain that "Do not replace existing value of field" is turned off
Use Conditional formatting to add the Condense style or use a smaller font when the number of the characters in the field gets long.
The steps for using conditional formatting are as follows:
In layout mode select the field and select 'Conditional Formatting...' from the pop-up menu
Add a new condition
Change the condition to 'Formula is'
In the text field enter "Length(Self) > 8" (without the quotes)
Press the "More Formatting..." button
Select "Condense" as the Style from the text
You can add multiple conditions, so you might have "Condense" only for Length(Self) > 8 and another condition for Length(Self) > 16 where you set both "Condense" and reduce the Font Size.
As for your second question, I'm not able to get a picture of what you're trying to do from the question you asked. You might be able do the following in a script:
Go to Related Record [the portal relationship]
Sort Records [by ID]
And then use a summary field (Count of ID) to determine how many of each ID you have.
If you clarified what you were trying to do, gave more information about your tables and table occurrences, we might be able to provide a better answer for this instance.