Contributions
Verify and Find Truncated and Overlapping Text in Web application by Text Recognisation
Hi Team, Required support read visible text on object by using Text recognition method.We are tried with OCR, but its not working as expected some text are missed or added junk character while reading visible text from object. Scenario: We are able to recognize object by using "FindChildbyxpath". From the recognized object am trying to get visible text. set SetAppObj=Sys.Browser("iexplore").Page("*").FindChildByXPath("*", True) Could please help me from above scenario to recognize text by Text recognition mechanism Thanks, Dinesh.1.2KViews0likes3CommentsRe: Unable to perform actions on java swing trees
Sys.Process("java").SwingObject("BDMainFrame", "BD FACSDiva Software - Administrator (3-laser, 8-color (4-2H-2V) (BD default))", 0).SwingObject("JRootPane", "", 0).SwingObject("null.layeredPane").SwingObject("null.contentPane").SwingObject("JDesktopPane", "", 0).SwingObject("Browser").SwingObject("JRootPane", "", 0).SwingObject("null.layeredPane").SwingObject("null.contentPane").SwingObject("BrowserPane", "", 0).SwingObject("JScrollPane", "", 0).SwingObject("JViewport", "", 0).SwingObject("BrowserTreek", "", 0) Set desktopPane = Aliases.java.BDMainFrame.RootPane.null_layeredPane.null_contentPane.DesktopPane Set panel = desktopPane.Browser.RootPane.null_layeredPane.null_contentPane Set browserTreek = panel.BrowserPane.ScrollPane.Viewport.BrowserTreek browserTreek .getrowscount browserTreek .getcolumncount browserTreek.Changeselection(1,1,false,false) I found above methods ontrail bases, Tree identifying as table.1.8KViews0likes0Comments- 1.9KViews0likes2Comments
Re: Unable to perform actions on java swing trees
Hi Robert, Please find the code action expand and clicking performed. Script recored with coordinates when i preform action expand and click option in java tree. Set desktopPane = Aliases.java.BDMainFrame.RootPane.null_layeredPane.null_contentPane.DesktopPane Set panel = desktopPane.Browser.RootPane.null_layeredPane.null_contentPane Set browserTreek = panel.BrowserPane.ScrollPane.Viewport.BrowserTreek Call browserTreek.Click(28, 28) Call browserTreek.Click(49, 67) Call browserTreek.Click(107, 63) Call browserTreek.Click(105, 78) Sys.Process("java").SwingObject("BDMainFrame", "BD FACSDiva Software - Administrator (3-laser, 8-color (4-2H-2V) (BD default))", 0).SwingObject("JRootPane", "", 0).SwingObject("null.layeredPane").SwingObject("null.contentPane").SwingObject("JDesktopPane", "", 0).SwingObject("Browser").SwingObject("JRootPane", "", 0).SwingObject("null.layeredPane").SwingObject("null.contentPane").SwingObject("BrowserPane", "", 0).SwingObject("JScrollPane", "", 0).SwingObject("JViewport", "", 0).SwingObject("BrowserTreek", "", 0).AWTObject("CellRendererPane", "", 0) Please do the neefull. Thanks, Dinesh.1.9KViews0likes3CommentsUnable to perform actions on java swing trees
Hi Team, Am doing feasability study on java based desktop application where used swing objects. Getting trouble perform actions java swing tree. Please find the code Set JTreeObj=Sys.Process("java").SwingObject("BDMainFrame", "BD FACSDiva Software - Administrator (3-laser, 8-color (4-2H-2V) (BD default))", 0).SwingObject("JRootPane", "", 0).SwingObject("null.layeredPane").SwingObject("null.contentPane").SwingObject("JDesktopPane", "", 0).SwingObject("Browser").SwingObject("JRootPane", "", 0).SwingObject("null.layeredPane").SwingObject("null.contentPane").SwingObject("BrowserPane", "", 0).SwingObject("JScrollPane", "", 0).SwingObject("JViewport", "", 0).SwingObject("BrowserTreek", "", 0)ort", "", 0) From the above object, couldnt able perform expand, collapse tree and selection option from tree. Request you to kindly help on this issue. Thanks, Dinesh.1.9KViews0likes5Comments- 1.7KViews0likes1Comment
Unable receive message from TCP IP , Getting exception
Hi Team, Am able to send simple text message via tcp ip by using client socket program, but same message am unable to receive via tcp ip by using server socket program. Server socket programgetting hangs after binder.listen. or some time getting exception. Am using test complete 12+ version Please find the both scripts below Function SendMessageToClient() Dim address, port, receiveTimeout, socket, connectionsQueueLength, connectedSocket, broadcast,endpoint, byteType, binaryData, maxLength, receivedLength, byteStr, str address = "127.0.0.1" port = 65303 receiveTimeout = 6000 connectionsQueueLength = 0 Set Socket = dotNET.System_Net_Sockets.Socket.zctor(dotNET.System_Net_Sockets.AddressFamily.InterNetwork,dotNET.System_Net_Sockets.SocketType.Stream,dotNET.System_Net_Sockets.ProtocolType.Tcp) Set broadcast = dotNET.System_Net.IPAddress.Parse(address) Set endpoint = dotNET.System_Net.IPEndPoint.zctor_2(broadcast, port) 'socket.Bind(endpoint) 'socket.Listen(connectionsQueueLength) 'On Error Resume Next Socket.Connect(endpoint) 'On Error GOTO 0 ' Call connectedSocket.SetSocketOption_3(dotNET.System_Net_Sockets.SocketOptionLevel.Socket,dotNET.System_Net_Sockets.SocketOptionName.ReceiveTimeout,receiveTimeout) ' maxLength = 256 ' byteType = dotNET.System.Type.GetType("System.Byte") ' binaryData = dotNET.System.Array.CreateInstance(byteType, maxLength) binaryData = dotNET.System_Text.Encoding.ASCII.GetBytes_2("Tet") call Socket.SendTo(binaryData,endpoint) binaryData1 = dotNET.System_Text.Encoding.ASCII.GetBytes_2("Test") call Socket.SendTo(binaryData1,endpoint) 'connectedSocket = Socket.SendTo(binaryData,endpoint) ''' If Socket.ReceiveFrom(binaryData, endpoint) Then ''' receivedLength = Socket.ReceiveFrom(binaryData, endpoint) ''' Else ''''' An exception occurs if no data is received ''' receivedLength = 0 ''' End IF str = dotNET.System_Text.ASCIIEncoding.get_ASCII().GetString(binaryData) str1 = dotNET.System_Text.ASCIIEncoding.get_ASCII().GetString(binaryData) 'str.SetLength(receivedLength) Log.Message ("The received response is " & str) Socket.Close End Function Public Function server() Set oSocket = CreateObject("Socket.TCP") Dim address, port, receiveTimeout, socket, connectionsQueueLength, connectedSocket, broadcast,endpoint, byteType, binaryData, maxLength, receivedLength, byteStr, str address = "127.0.0.1" port = 445 receiveTimeout = 6000 connectionsQueueLength = 10 Set Tsocket = dotNET.System_Net_Sockets.Socket.zctor(dotNET.System_Net_Sockets.AddressFamily.InterNetwork, dotNET.System_Net_Sockets.SocketType.Stream,dotNET.System_Net_Sockets.ProtocolType.Tcp) Set broadcast = dotNET.System_Net.IPAddress.Parse(address) Set endpoint = dotNET.System_Net.IPEndPoint.zctor_2(broadcast, port) Tsocket.Bind(endpoint) Tsocket.Listen(connectionsQueueLength) Set connectedSocket = Tsocket.Accept() Call connectedSocket.SetSocketOption_3(dotNET.System_Net_Sockets.SocketOptionLevel.Socket,dotNET.System_Net_Sockets.SocketOptionName.ReceiveTimeout,receiveTimeout) maxLength = 256 set byteType = dotNET.System.Type.GetType("System.Byte") set binaryData = dotNET.System.Array.CreateInstance(byteType, maxLength) '********************* If connectedSocket.ReceiveFrom(binaryData, endpoint)Then receivedLength = connectedSocket.ReceiveFrom(binaryData, endpoint) Else '// An exception occurs if no data is received receivedLength = 0 End IF byteStr = ByteArrayToHexString(binaryData, receivedLength, "0x") str = dotNET.System_Text.ASCIIEncoding.get_ASCII().GetString(binaryData) str.SetLength(receivedLength) Log.Message (receivedLength + " bytes were received: " + byteStr +"String Value: " + str) if (str = "TestMessage") Then Log.Message "The received data is valid and a positive response will be sent" binaryData = dotNET.System_Text.Encoding.ASCII.GetBytes_2("OK") else Log.Message "The received data is invalid,a negative response will be sent" binaryData = dotNET.System_Text.Encoding.ASCII.GetBytes_2("OK") End IF connectedSocket.Close socket.Close End Function Request you kindly help on that issue Thanks, Dinesh.1.8KViews0likes4Comments