csharpfritz / csharpfritz/WebFormsTest
Can't find Controls - WebForms w/ nested Master pages
- Vorherrschende Sprache
- JavaScript
- Sterne
- 26
- Forks
- 14
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Has anyone had any success using WebFormsTest with nested Master Pages in WebForms?
I'm able to get WebApplicationProxy.Create to run, and WebApplicationProxy.GetPageLocation to run just fine, but controls are never able to be found.
```
WebApplicationProxy.Create(typeof(Platform.applications.applications), options);
var page= WebApplicationProxy.GetPageByLocation("/applications/test.aspx");
page.RunToEvent(WebFormEvent.Init);
var testControl= page.FindControl("btnTest"); // no controls are ever found recursively or otherwise.
```
Here is an example Master-page that inherits from a nested Master Page
```
<%@ Master Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true" CodeBehind="Site1.master.cs" Inherits="Platform.applications.Site1" %>
<%@ MasterType VirtualPath="~/Main.Master" %>
`
```
Thanks
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Start with the WebApplicationProxy.Create and GetPageByLocation calls in the reproduction, then trace page.RunToEvent(WebFormEvent.Init) and FindControl("btnTest") for the nested Master Page example. Done means controls can be found when WebForms uses nested Master pages, including the shown Site1.master structure.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- csharp
- Bereich
- testing-qa
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 30/100