Hi Peter,
Wisej.NET already has a built-in feature to make it easier to identify elements for automation tests.
It’s as easy as setting up the default.json file by adding the following:
"options": {
"automation.mode": true
}
The complete JSON would be as follows:
{
"url": "Default.html",
"startup": "Wisej_Project_Name.Program.Main, Wisej_Project_Name",
"options": {
"automation.mode": true
}
}
Basically, what this feature does is that it replaces all the obfuscated ids of the controls and gives you a hierarchical representation of the control so you can easily identify all the components.
As an example, you can have a Button inside of a FlowLayoutPanel, instead of that button being represented as “id_X” in the dom, it would be something like: Page1_flowLayoutPanel1_Button.
HTH,
Alaa
I think the issue here is that you are trying to set the button properties textAlign to center, when you actually need to set the button label. Each button has a label, and the label is what the text is inside. You can even make the label and button different colors if you want to see it more clearly.
I tried working with the textAlign property and couldn’t get it to center. Luckily- there’s a workaround- you can use css styles. Specifically this style.
I’ve included a screenshot of a simple ribbonbar with this mixin.
Here’s the relevant part of the mixin:
“components”: {
“button”: {
“states”: {
“default”: {
“styles”: {
“backgroundColor”: “#66FF00” //set the background color of the button so you can see it clearly
},
“properties”: {
//you were previously setting “textAlign”: “center” here
“maxWidth”: null,
“padding”: [1, 4, 1, 4]
}
},
“vertical”: {
“properties”: {
“maxWidth”: 78
},
“styles”: {
}
},
“pushed”: {
“styles”: {
“backgroundColor”: “buttonSelected”
},
“properties”: {
“textColor”: “buttonSelectedText”
}
}
},
“components”: {
“icon”: {
“inherit”: “icon-dark”,
“states”: {
“default”: {
“styles”: {
},
“properties”: {
}
},
“vertical”: {
“properties”: {
“width”: 32,
“height”: 32,
“scale”: true
},
“styles”: {
}
},
“horizontal”: {
“properties”: {
“width”: 16,
“height”: 16,
“scale”: true
},
“styles”: {
}
}
}
},
“label”: { //here is the button label
“states”: {
“default”: {
“properties”: {
},
“styles”: {
“backgroundColor”: “#FFEF00” //I set the background color just so you can see it
}
},
“vertical”: {
“properties”: {
},
“styles”: {//here is the css to justify the text
“css”: “{\”text-align\”:\”justify\”}”
//alternatively if you want to center the text instead of justifying it you can do this
//”css”: “{\”text-align\”:\”center\”}”
} } } },
Hi Pablo,
We’re currently looking into your issue and we’ll report back ASAP!
Best,
Alaa
//
Hi Alex,
We’re currently looking at your issue and we’ll report back ASAP!
Best,
Alaa
//
Hi Tom,
Sorry for the delay.
The NOSCRIPT tag is displayed when the browser has javascript disabled.
Unfortunately, Wisej does not create any html strings. It’s all JavaScript components.
Best,
Alaa
//
Dear Alaa
This example of mycode in asp.net.
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Imports CrystalDecisions.Web
Imports System.Data
Imports System.Data.SqlClientPublic Class FrmUserPrint
Inherits System.Web.UI.Page
Public DSMaster1 As New DSMaster
Private cprt As New ReportDocument
Private scon As SqlConnection, scom As SqlCommand, strsql, strobra, strocomp, strousernm As String
Private POS1 As New Pos
Private strklik As StringPrivate Sub FrmUserPrint_PreInit(sender As Object, e As EventArgs) Handles Me.PreInit
strklik = Request(“klik”)
strobra = Request(“branch”)
strocomp = Request(“company”)
strousernm = Request(“username”)
If strklik = “” Then
Label1.Visible = False
DropExport.Visible = False
BtnExport.Visible = False
Return
End If
PTampil()
cprt.Load(Server.MapPath(“/rpt/Master/Rpt_Master_User.rpt”))
cprt.SetDataSource(DSMaster1.Tables(“DtMUser”))
cprt.SetParameterValue(“strprinted”, “Dicetak oleh : ” & strousernm & ” / ” & Now.ToString(“yyyy-MMM-dd HH:mm:ss”))
CRV.ReportSource = cprt
Label1.Visible = True
DropExport.Visible = True
BtnExport.Visible = True
End SubPrivate Sub BtnExport_Click(sender As Object, e As EventArgs) Handles BtnExport.Click
Try
Select Case DropExport.Text.ToLower.Trim
Case “pdf”
cprt.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, False, “List_User”)
Case “word”
cprt.ExportToHttpResponse(ExportFormatType.WordForWindows, Response, False, “List_User”)
Case “excel”
cprt.ExportToHttpResponse(ExportFormatType.Excel, Response, False, “List_User”)
Case “excel 2007”
cprt.ExportToHttpResponse(ExportFormatType.ExcelWorkbook, Response, False, “List_User”)
Case “csv”
cprt.ExportToHttpResponse(ExportFormatType.CharacterSeparatedValues, Response, False, “List_User”)
Case “rtf”
cprt.ExportToHttpResponse(ExportFormatType.RichText, Response, False, “List_User”)
Case “rtf editable”
cprt.ExportToHttpResponse(ExportFormatType.EditableRTF, Response, False, “List_User”)
Case “text”
cprt.ExportToHttpResponse(ExportFormatType.Text, Response, False, “List_User”)
End Select
Catch ex As Exception
cprt.Close()
cprt.Dispose()
GC.Collect()
End TryEnd Sub
Sub PTampil()
Dim srdr As SqlDataReader
scon = POS1.F_con()
DSMaster1.Tables(“DtMUser”).Rows.Clear()
Try
scon.Open()
strsql = “select userid,nama,group_access,last_login,host_login,ip_login,[status] from m_user order by [status],nama”
scom = New SqlCommand(strsql, scon)
srdr = scom.ExecuteReader()
While srdr.Read()
Dim arw As DataRow
arw = DSMaster1.Tables(“DtMUser”).NewRow
arw(0) = IIf(IsDBNull(srdr.Item(“userid”)) = True, “”, srdr.Item(“userid”))
arw(1) = IIf(IsDBNull(srdr.Item(“nama”)) = True, “”, srdr.Item(“nama”))
arw(2) = IIf(IsDBNull(srdr.Item(“group_access”)) = True, “”, srdr.Item(“group_access”))
arw(3) = IIf(IsDBNull(srdr.Item(“status”)) = True, 0, srdr.Item(“status”))
arw(4) = srdr.Item(“last_login”)
arw(5) = IIf(IsDBNull(srdr.Item(“host_login”)) = True, “”, srdr.Item(“host_login”))
arw(6) = IIf(IsDBNull(srdr.Item(“ip_login”)) = True, “”, srdr.Item(“ip_login”))
DSMaster1.Tables(“DtMUser”).Rows.Add(arw)
End While
srdr.Close()
srdr.Dispose()
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
scon.Close()
scon.Dispose()
End SubPrivate Sub FrmUserPrint_Unload(sender As Object, e As EventArgs) Handles Me.Unload
If cprt IsNot Nothing Then
cprt.Close()
cprt.Dispose()
GC.Collect()
End If
End SubPrivate Sub BtnExport_Unload(sender As Object, e As EventArgs) Handles BtnExport.Unload
If cprt IsNot Nothing Then
cprt.Close()
cprt.Dispose()
GC.Collect()
End If
End Sub
End Class
Hi Nicky,
We use Crystal Reports and have had tons of problems. We are in a transition to Stimulsoft Reports but have to support Crystal for some time. We built a library to take the report parameters and convert it to a PDF, we then deliver that PDF to the front end. If this would work for you I’m happy to share the source code for that library with you (it takes a database connection string, the report filename, the PDF filename etc.).
There’s also a limit of how many reports you can see in one session – I think the default is 20, then you get all sorts of issues. There are registry keys to get round this, but you’ll see memory leaks etc. from Crystal. It hasn’t progressed at all since SAP bought it.
Regards,
Neil.
Hi Nicky,
Would you be able to wrap-up a small reproducible test case for us to check the issue?
Best,
Alaa
Hi Mario,
You can find the GitHub source code for the DemoBrowser over at: https://github.com/iceteagroup/wisej-demobrowser
HTH,
Alaa
Thanks Alaa to reach me
but the problem still remains though I switched to the English language.
Hi Tiziano,
Session lifetime doesn’t work with ASPNet Core Services becauseASPNet Core doesn’t support it; It’s either a singleton or a new instance each tine the service is requested or a new instance each time the service is requested per thread.
Unfortunately, we cannot change the way it works.
However, Wisej.NET Service Manager instead can register services per session. Any service; Just use AddService() passing the service type.
You can also register a service using a factory callback and create the service instance in code however it needs to be created.
As for Dependency Injection, for Wisej.NET containers it’s automatic when you use [Inject].
For services created by ASPNet it cannot work but if you use a factory callback that you can use apnet service container to create a service instance using theirDependency Injection.
HTH,
Alaa
Hi Soran,
Looks like you have to use an english browser to copy/paste your license key.
The issue is, from what I can see from your screenshot, is the Indo-Arabic numerals that were replaced due to the browsers culture.
HTH,
Alaa
I’ve named the file Platform.Wisej.Web.ext.ImageUpload but doesn’t work yet.
In the js file, when I define the class:
qx.Class.define(“wisej.web.ext.ImageUpload”, {
extend: wisej.web.Upload,
properties: {
I have to define the name “wisej.web.ext.ImageUpload” or I have to set the name with also Platform at the start?
Thank you
Giorgia
The screenshots show the wrong docking. Just dock to top and dock to fill. There is nothing to fix. The order of the controls defines whether the fill uses the entirely available area or the area remaining after the other docked panels. Nothing gets resized by clicking unless it’s done in your code. You may be seeing the browser scrolling an element into view, which is normal browser behavior.
You are already controlling it in the sample (the wrong way):
It’s unclear what you are trying to achieve. If you describe what kind of layout you are trying to build we may be able to help.
Hi,
I have attached a sample that should work now.
We identified an issue with the Button not starting Drag & Drop because the pointer is captured for the down/up movement.
This issue will be fixed in the next build (3.1.8).
HTH,
Alaa
//
Good morning Luca,
your patience is greatly appreciated thank you again.
from the referenced WiseJ document “Drag & Drop” [ docs.wisej.com/docs/controls/general/drag-and-drop-1 ]
The first paragraph instructs:
set AllowDrag on my dynamically generated buttons that sit in my
SOURCE FlowLayoutPanel, as these buttons should initiate the drag operation.
I made sure my DESTINATION FlowLayoutPanel that is recieving the dragged buttons
to AllowDrop true, such that it CAN receive the dropped data/Buttons.
When the user starts dragging, the control will fire the DragStart event.
There is no DragStart event associated with this new programmatically created control.
– THAT I AM AWARE OF –
You must handle this event and call the DoDragDrop() method, otherwise the drag operation doesn’t start.
So one must apparently manually associate a DragStart event to these newly created buttons.
I have a method available for that but associating it correctly is not working for me as Shown in the image attached.
Thus far, my tests are allowing me to create / assign a method to the programmatically created control,
(but it doesn’t hit the method)
My method is not invoked on attempt to “DragStart” at runtime this new programmatically created button.
btnDynamic.DragStart += btnDynamic_DraggingButton;
Hi Nicholas,
I apologize for the delayed answer to this question.
You can control the space between tokens on a Theme level by changing the “spaceingX” property of the “Container” of the TagTextBox.
You’ll have to use the theme builder for that!
HTH,
Alaa
//
Hello,
Looks like the VB.NET compiler doesn’t use the folder names to build the embedded resource name. It only uses the default namespace of the project + the file name.
You can still place your embedded resources in \Resources or \Platform in VB.NET, but you also have to rename the file like this:
For more info, please check out the relevant documentation about Embedded Resources (Look a the VB.NET alert).
HTH,
Alaa