Testing with Selenium

I'd like to test my page with selenium. Problem is I can't set the HTML id for selecting and clicking the Buttons and setting values to the Textfields and so on. Is there an alternative?

You can set the id of every Radzen.Blazor component:

<RadzenButton id="my-button" />
1 Like

Is there a possiblity to adress the scheduler without calculating postions?

I don't understand your question.

I have a RadzenScheduler. How to trigger an appointment selection without calculating its absolute postion to click it? Same for the selection of a time slot. e. g. to add an event at a selected time.

You can set the id attribute of every appointment via the AppointmentRender event.

void OnAppointmentRender(SchedulerAppointmentRenderEventArgs<Appointment> args)
{
   args.Attributes["id"] = GenerateAppointmentId(args.Data);
}

Yeah. That helps with existing appointments. But how to create new ones? How to "click" on a Timeslot?

There is a SlotRender event as well.

I already use this for formatting. Problem is I test with selenium wich uses the browser tools. I'd like to create a new Appointment wiht js. don't want to access existing ones.

I got that. Use the SlotRender event to assign the slot element an id which you can later use with Selenium to click it.