Contributions
- 1.2KViews0likes1Comment
- 1.2KViews0likes3Comments
Syncfusion Virtual Grid properties and how to locate them
Hi The product I am testing has a number of syncfusion grids where by the layout of the grid is stored as a virtual grid. As users select things the look and feel of the product changes, e.g., A cell becomes italic, bolded or has a strikethrough and my aim is to test these changes by checking that internal properties reflect these changes. I have considered using bitmap comparison but as it can be extremely flakey I would prefer to use alternative methods unless no other option. I also considered export, however that only exports the raw data and ignores the formatting. The product I test contains grid data\features at 3 different levels 1 Grid Container 2 Grid Total 3 Grid Data I assumed originally and incorrectly that cell formatting properties would be part of the lowest level (#3) within the selected cell properties. Grid Total only contains details regarding the total rows of the grid, and again appears to ignore formatting. Grid container in theory should contain all the necessary information and I have located other view specific settings within this control, however, I spent a very long time checking every cell item property and I am unable to locate the required information. I have also spoken with developers and they say its a standard implementation of the syncfusion grid control, with only a few customisations. I have checked the syncfusion website and while providing information it doesn't provide it in the way that testcomplete visualises the methods and properties. Anyone have any ideas? Edit: What i am looking for is the StyleInfoBase collection of properties, but still not able to locate them.1.3KViews0likes5CommentsRe: GUI Walker test
In the spirit of détente i have attached the GUIWalker testI have created. The idea of the test is that itprovides a list of controls in the child structure from a designated parentand compares the returned structure to a baseline. When calling the FindAllChildren method I am only interested in alias entries i have created (this allows me to ignore all the padding you get with dotnet applications) I have been deliberately brief with the list of property and control typesI test for, however, it is possible to extend it to whatever level of detail you want (be aware it will slow down the test a fair bit) Where a differenceis found it outputs them as warnings. The comparison can handle both differences atthe controland property level, outputtingnot justdifferences in values but also missing and additional items\properties in both the baseline and received. Should a baseline not exist, it will also create one for you based upon the strucutre it finds. Anyways...Enjoy2.3KViews0likes0CommentsRe: GUI Walker test
Sorry for the delay in responding. Thanks very much for the example, I have got it working but I have also come across a rather confusing issue with how objects are passed to functions\routines. I have a solution but I can't quite grasp why this would be the case... The code below performs the same task in 2 different ways. Option1. The object is set and used for the FindAllChildren method and is part of the main routine (works as intended) Option2. The object is set and passed to a function (ByVal) as the oParent parameter. The function then calls the FindAllChildren method using identical values except they are passed parameters. ( This generates an error when the FindAllChildren method is called that is only really visible in locals or watch list...The GetCollectOfObjects returns the correct number of entries (3) however the value field shows the following error: Wrong number of arguments or invalid property assignment: 'GetCollectOfObjects') I solved the problem by passing the oParent parameter as ByRef, however I am curious as to why this is happening at all. Sub Main Dim arrayOfObjects, x, w Set w = Sys.Process("symphony").WinFormsObject("fLogin2") NamesArray = Array("ClrClassName", "VisibleOnScreen") ValuesArray = Array("Button", True) arrayOfObjects = w.FindAllChildren(NamesArray, ValuesArray, 100) For x = 0 To UBound(arrayOfObjects) If arrayOfObjects(x).Exists = True Then Log.Message arrayOfObjects(x).FullName End If Next Log.Message "Start 2nd iteration" Erase arrayOfObjects arrayOfObjects = GetCollectOfObjects(w, NamesArray, ValuesArray) For x = 0 To UBound(arrayOfObjects) If arrayOfObjects(x).Exists = True Then Log.Message arrayOfObjects(x).FullName End If Next End Sub Function GetCollectOfObjects(ByRef oParent, NamesArray, ValuesArray) GetCollectOfObjects = oParent.FindAllChildren(NamesArray, ValuesArray, 100) End Function2.4KViews0likes4CommentsGUI Walker test
Hi I was wondering if anyone has created a GUI walker test which they would be willing to share? Ideally i am looking for a test that iterates through all the child objects on a window testing certain properties like enabled, visible, class and default value. Many thanksSolved2.5KViews0likes6CommentsRe: ADODB - Syntax error when trying to open a recordset when using the adCmdTable parameter
Well it would appear the problem relates to the datatype being passed, adodb.stream expects it to be a byte() array and its being passed as a variant (as per vb script). There were numerous examples of converting a variant to byte array available on forums\solutions sites etc, but i struggled to get them to work. I solved it finally by writing a console app that replicates the adodb stream process and it works fine.2.5KViews1like0CommentsRe: ADODB - Syntax error when trying to open a recordset when using the adCmdTable parameter
Solved the first problem in that asCmdTable returns all the columns associated with the table, as i only need 1 columnsnot passing it as a parameter is a viable option which allows the script to continue... Unfortunately i have now come across another issue relating the to ADODB.Stream Dim adoSt Set adoSt = Sys.OleObject("ADODB.Stream") adoSt.Type = 1'adTypeBinary adoSt.Open adoSt.LoadFromFile sFileName 'Write the stream to the recordset and update it adoRs.Fields("BLOB").Value = adoSt.Read adoRs.Update adoSt.Close adoRs.Close I geta type mismatch when i read the value back to the record set (the file isa .png) Err.number -2147352571 Err.description: Type mismatch Err.source: Provider Any ideas?2.5KViews0likes1CommentADODB - Syntax error when trying to open a recordset when using the adCmdTable parameter
Hi I am trying to update a record in a sql server database table and when i try and open up a recordset using adCmdTable parameter i get the following syntax error. Err.number: -2147217900 Err.Description: Incorrect syntax near the keyword 'SET' The interesting part is this error occurs when trying to process the open method and appears to be related to the sql variable content adoRS.Open sql, OpenResConn, adOpenKeyset, adLockOptimistic, adCmdTable If i remove the adCmdTable parameter then the statement will process but the adOpenKeyset and adLockOptimistic settings will be default and not as specified. As i am trying to update a value in the table, the default settings are read only so i get an error relating to be unable to update due to lock state. Additional infomation: DB Version: SQL Server 12 Table:the blob table has the ID column set as the primary key BLOB field type is image the adCmdTable parameter is correctly beingreturned asint 2. Here is the code i am trying to run. Dim OpenResConn, sql, sFileName, adoRS, iDriverID iDriverID = 4 sFileName = "C:\Testing\Errors\TestUncertain.png" Set OpenResConn = Sys.OleObject("ADODB.Connection") OpenResConn.ConnectionString = "Provider=SQLNCLI11;" _ & "Server=auto-test-res;" _ & "Database=Results;" _ & "user id ='Results';" _ & "password='Password';" _ & "DataTypeCompatibility=80;" OpenResConn.Open sql = "SET NOCOUNT ON; " sql = sql & "insert into BLOBCopy (DriverID, Filename)" sql = sql & "values (" & iDriverID & ", '" & sFileName & "');" sql = sql & "SELECT SCOPE_IDENTITY() as ID;" Set adoRS = Sys.OleObject("ADODB.RecordSet") Call adoRs.Open(sql, OpenResConn) blobID= adoRs("ID") adoRs.Close 'Open a recordset of just the BLOB column for the row we just created sql = "SET NOCOUNT ON; " sql = sql & "select BLOB from BLOBCopy where ID = " & blobID adoRS.Open sql, OpenResConn, adOpenKeyset, adLockOptimistic, adCmdTable 'create a stream and populate it with the specified file Dim adoSt Set adoSt = Sys.OleObject("ADODB.Stream") adoSt.Type = 1'adTypeBinary adoSt.Open adoSt.LoadFromFile sFileName 'Write the stream to the recordset and update it adoRs.Fields("BLOB").Value = adoSt.Read adoRs.Update adoSt.Close adoRs.Close Does anyone have any ideas as to why this isnt working as intended?Solved2.5KViews0likes2Comments