Knyaz.Optimus 2.4.1

Optimus is headless Web Browser fully implemented on .net.

There is a newer prerelease version of this package available.
See the version list below for details.
Install-Package Knyaz.Optimus -Version 2.4.1
dotnet add package Knyaz.Optimus --version 2.4.1
<PackageReference Include="Knyaz.Optimus" Version="2.4.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Knyaz.Optimus --version 2.4.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Knyaz.Optimus, 2.4.1"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Knyaz.Optimus as a Cake Addin
#addin nuget:?package=Knyaz.Optimus&version=2.4.1

// Install Knyaz.Optimus as a Cake Tool
#tool nuget:?package=Knyaz.Optimus&version=2.4.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Optimus

Optimus is headless Web Browser fully implemented on .net.

Release notes

Downloads

Samples

  • Quick start

Create console application and paste the code:

using System.Linq;
using Knyaz.Optimus;
using Knyaz.Optimus.Dom.Elements;
using Console = System.Console;

namespace ConsoleApplication1
{
	class Program
	{
		static async void Main(string[] args)
		{
			var engine = EngineBuilder.New()
			    .UseJint()// Enable JavaScripts execution.
			    .Build(); // Builds the Optimus engine.
       
			//Request the web page.
			var page = await engine.OpenUrl("http://google.com");
			//Get the document
			var document = page.Document;
			//Get DOM items
			Console.WriteLine("The first document child node is: " + document.FirstChild);
			Console.WriteLine("The first document body child node is: " + document.Body.FirstChild);
			Console.WriteLine("The first element tag name is: " + document.ChildNodes.OfType<HtmlElement>().First().TagName);
			Console.WriteLine("Whole document innerHTML length is: " + document.DocumentElement.InnerHTML.Length);
			Console.ReadKey();
		}
	}
}

Projects structure

  • Knyaz.Optimus - The main assembly with implementation of web browser (without GUI and rendering).
  • Knyaz.Optimus.Tests - Acceptance tests library.
  • Knyaz.Optimus.WfApp - Simple test application with DOM explorer and Log window.

Dependencies

  • Jint - JavaScript execution engine.

License

Optimus is released under the MIT license.

Optimus

Optimus is headless Web Browser fully implemented on .net.

Release notes

Downloads

Samples

  • Quick start

Create console application and paste the code:

using System.Linq;
using Knyaz.Optimus;
using Knyaz.Optimus.Dom.Elements;
using Console = System.Console;

namespace ConsoleApplication1
{
	class Program
	{
		static async void Main(string[] args)
		{
			var engine = EngineBuilder.New()
			    .UseJint()// Enable JavaScripts execution.
			    .Build(); // Builds the Optimus engine.
       
			//Request the web page.
			var page = await engine.OpenUrl("http://google.com");
			//Get the document
			var document = page.Document;
			//Get DOM items
			Console.WriteLine("The first document child node is: " + document.FirstChild);
			Console.WriteLine("The first document body child node is: " + document.Body.FirstChild);
			Console.WriteLine("The first element tag name is: " + document.ChildNodes.OfType<HtmlElement>().First().TagName);
			Console.WriteLine("Whole document innerHTML length is: " + document.DocumentElement.InnerHTML.Length);
			Console.ReadKey();
		}
	}
}

Projects structure

  • Knyaz.Optimus - The main assembly with implementation of web browser (without GUI and rendering).
  • Knyaz.Optimus.Tests - Acceptance tests library.
  • Knyaz.Optimus.WfApp - Simple test application with DOM explorer and Log window.

Dependencies

  • Jint - JavaScript execution engine.

License

Optimus is released under the MIT license.

Release Notes

Fixed css selector parsing when it contains special characters and codes.

NuGet packages (5)

Showing the top 5 NuGet packages that depend on Knyaz.Optimus:

Package Downloads
TAF.WebSupport.HeadlessBrowser
Headless browser for TAF web testing.
Arfilon.Ratchet
Package Description
Knyaz.Optimus.Graphics
Provides rendering for the Knyaz.Optimus
Knyaz.Optimus.Scripting.Jurassic
Plugin for the Knyaz.Optimus to connect Jurassic JavaScript engine.
Knyaz.Optimus.Scripting.Jint
Allows to use Jint to execute JavaScript in Optimus.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
3.0.0-beta-305 218 4/4/2021
3.0.0-beta-267 131 1/8/2021
3.0.0-beta-266 159 1/7/2021
2.4.1 758 11/21/2020
2.4.0 1,079 4/19/2020
2.3.6 467 3/15/2020
2.3.5 708 2/1/2020
2.3.4 487 1/11/2020
2.3.3 325 12/7/2019
2.3.2 326 11/24/2019
2.2.6 455 10/19/2019
2.2.5 735 7/24/2019
2.2.4 318 7/21/2019
2.2.3 2,816 5/8/2019
2.2.2 2,289 8/20/2018
2.1.43 1,519 3/12/2018
2.1.41 863 2/16/2018
2.0.39 765 12/22/2017
1.2.26 933 6/5/2017
1.2.23 689 5/3/2017
1.2.21 689 3/3/2017
1.2.20 867 12/1/2016
1.2.17 685 11/3/2016
1.2.15 661 10/3/2016
1.2.12 696 9/9/2016
1.2.9 644 8/29/2016
1.2.7 641 8/18/2016
1.2.4 630 8/16/2016
1.2.0 720 8/3/2016
1.1.0 651 8/3/2016
1.0.0 692 8/3/2016
Show less