Are there any suggestions for dealing with Borderless tables?
There are two ways to approach the problem.
The first suggestion in dealing with borderless tables is to set the value of the borderless table at the maximum (1.0). This unfortunately gives the problem that suddenly there may be 100"s of levels of table exposed. This can make declarations very large and very messy. One way to partially get around this is to build parent objects into the tags for the child objects. For example:
BrowserChild Registration tag "Registration Page 1" HtmlHeading EnterUserInfo tag "/[HtmlTable]#1/[HtmlColumn]#2/Enter User Information"
The above will allow a reference directly to the object without all of the intermediate levels being considered.
This is not a perfect solution, as it requires a massive effort on creating window declarations or a massive effort when reading scripts.
The opposite end of the spectrum would be to turn off the borderless tables entirely. This however can result in unreadable information being returned from the application, particularly if the dynamic tables that may have 10 objects, but sometimes have 200. This can also get difficult with Form Elements.
GhostTable is a class which turns itself on and off as needed by using whatever value is required to make the table appear.
winclass GhostTable : HtmlTable setting DontInheritClassTag = TRUE // create this data member in your ghost table and // set this to the value required to make this table // "appear" to SilkTest REAL rBorderlessTableSetting REAL rOldSetting void Appear () WINDOW wParent // find the top level parent of this instance wParent = GetTopLevelItem (this) // grab the current setting this.rOldSetting = wParent.GetUserOption ("ShowBorderlessTables") // set to the new setting for the parent wParent.SetUserOption ("ShowBorderlessTables", rBorderlessTableSetting, USEROPT_WINDOW)
Additionally, there"s a Vanish method that , sets the ShowBorderlessTables setting back to the original. The methods for the HtmlColumn class call this class method so that you can call HtmlColumn methods as well. The downside to this is that it will be required to rewrite the HtmlTable and HtmlColumn classes to first use Appear and then Vanish e.g.
INTEGER GetColumnCount () INTEGER iRtn // make the table appear Appear () // get the built-in method"s value [-] do [ ] iRtn = derived::GetColumnCount () [-] except [ ] Vanish () [ ] reraise // make the table disappear Vanish () [ ] return iRtn
This will have to be done for every method to be used.