Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
ChromeDevTools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FrameIT
ChromeDevTools
Commits
2ced8a4d
Commit
2ced8a4d
authored
8 years ago
by
Kevin Prudente
Committed by
GitHub
8 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #8 from quamotion/fixes/fix-build
Update the sample program to fix build
parents
27d0b066
917e9324
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
source/ChromeDevTools/CommandResponse.cs
+9
-0
9 additions, 0 deletions
source/ChromeDevTools/CommandResponse.cs
source/Sample/Program.cs
+4
-4
4 additions, 4 deletions
source/Sample/Program.cs
with
13 additions
and
4 deletions
source/ChromeDevTools/CommandResponse.cs
+
9
−
0
View file @
2ced8a4d
...
...
@@ -24,6 +24,15 @@
public
class
CommandResponse
<
T
>
:
CommandResponse
{
public
CommandResponse
()
{
}
public
CommandResponse
(
T
result
)
{
this
.
Result
=
result
;
}
public
T
Result
{
get
;
...
...
This diff is collapsed.
Click to expand it.
source/Sample/Program.cs
+
4
−
4
View file @
2ced8a4d
using
MasterDevs.ChromeDevTools.Protocol.Page
;
using
MasterDevs.ChromeDevTools.Protocol.
Chrome.
Page
;
using
System
;
using
System.Linq
;
...
...
@@ -31,14 +31,14 @@ namespace MasterDevs.ChromeDevTools.Sample
// STEP 4 - Register for events (in this case, "Page" domain events)
// send an event to tell chrome to send us all Page events
// but we only subscribe to certain events in this session
var
pageEnableResult
=
chromeSession
.
SendAsync
<
ChromeDevTools
.
Protocol
.
Page
.
EnableCommand
>().
Result
;
var
pageEnableResult
=
chromeSession
.
SendAsync
<
ChromeDevTools
.
Protocol
.
Chrome
.
Page
.
EnableCommand
>().
Result
;
Console
.
WriteLine
(
"PageEnable: "
+
pageEnableResult
.
Id
);
chromeSession
.
Subscribe
<
Protocol
.
Page
.
DomContentEventFiredEvent
>(
domContentEvent
=>
chromeSession
.
Subscribe
<
Protocol
.
Chrome
.
Page
.
DomContentEventFiredEvent
>(
domContentEvent
=>
{
Console
.
WriteLine
(
"DomContentEvent: "
+
domContentEvent
.
Timestamp
);
});
// you might never see this, but that's what an event is ... right?
chromeSession
.
Subscribe
<
Protocol
.
Page
.
FrameStartedLoadingEvent
>(
frameStartedLoadingEvent
=>
chromeSession
.
Subscribe
<
Protocol
.
Chrome
.
Page
.
FrameStartedLoadingEvent
>(
frameStartedLoadingEvent
=>
{
Console
.
WriteLine
(
"FrameStartedLoading: "
+
frameStartedLoadingEvent
.
FrameId
);
});
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment