How to use StandardKernel class of Telerik.JustMock.AutoMock.Ninject package

Best JustMockLite code snippet using Telerik.JustMock.AutoMock.Ninject.StandardKernel

Run JustMockLite automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

StandardKernel.cs

Source: StandardKernel.cs Github

copy
1//-------------------------------------------------------------------------------
2// <copyright file="StandardKernel.cs" company="Ninject Project Contributors">
3//   Copyright (c) 2007-2009, Enkari, Ltd.
4//   Copyright (c) 2009-2011 Ninject Project Contributors
5//   Authors: Nate Kohari ([email protected])
6//            Remo Gloor ([email protected])
7//           
8//   Dual-licensed under the Apache License, Version 2.0, and the Microsoft Public License (Ms-PL).
9//   you may not use this file except in compliance with one of the Licenses.
10//   You may obtain a copy of the License at
11//
12//       http://www.apache.org/licenses/LICENSE-2.0
13//   or
14//       http://www.microsoft.com/opensource/licenses.mspx
15//
16//   Unless required by applicable law or agreed to in writing, software
17//   distributed under the License is distributed on an "AS IS" BASIS,
18//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19//   See the License for the specific language governing permissions and
20//   limitations under the License.
21// </copyright>
22//-------------------------------------------------------------------------------
23
24namespace Telerik.JustMock.AutoMock.Ninject
25{
26    using System;
27    using Telerik.JustMock.AutoMock.Ninject.Activation;
28    using Telerik.JustMock.AutoMock.Ninject.Activation.Caching;
29    using Telerik.JustMock.AutoMock.Ninject.Activation.Strategies;
30    using Telerik.JustMock.AutoMock.Ninject.Components;
31    using Telerik.JustMock.AutoMock.Ninject.Injection;
32    using Telerik.JustMock.AutoMock.Ninject.Modules;
33    using Telerik.JustMock.AutoMock.Ninject.Planning;
34    using Telerik.JustMock.AutoMock.Ninject.Planning.Bindings.Resolvers;
35    using Telerik.JustMock.AutoMock.Ninject.Planning.Strategies;
36    using Telerik.JustMock.AutoMock.Ninject.Selection;
37    using Telerik.JustMock.AutoMock.Ninject.Selection.Heuristics;
38
39    /// <summary>
40    /// The standard implementation of a kernel.
41    /// </summary>
42    public class StandardKernel : KernelBase
43    {
44        /// <summary>
45        /// Initializes a new instance of the <see cref="StandardKernel"/> class.
46        /// </summary>
47        /// <param name="modules">The modules to load into the kernel.</param>
48        public StandardKernel(params INinjectModule[] modules) : base(modules)
49        {
50        }
51
52        /// <summary>
53        /// Initializes a new instance of the <see cref="StandardKernel"/> class.
54        /// </summary>
55        /// <param name="settings">The configuration to use.</param>
56        /// <param name="modules">The modules to load into the kernel.</param>
57        public StandardKernel(INinjectSettings settings, params INinjectModule[] modules) : base(settings, modules)
58        {
59        }
60
61        /// <summary>
62        /// Gets the kernel.
63        /// </summary>
64        /// <value>The kernel.</value>
65        protected override IKernel KernelInstance
66        {
67            get
68            {
69                return this;
70            }
71        }
72
73        protected virtual bool ShouldAddComponent(Type component, Type implementation)
74        {
75            return true;
76        }
77
78        private void AddComponent<TComponent, TImplementation>()
79            where TComponent : INinjectComponent
80            where TImplementation : TComponent, INinjectComponent
81        {
82            if (ShouldAddComponent(typeof(TComponent), typeof(TImplementation)))
83            {
84                Components.Add<TComponent, TImplementation>();
85            }
86        }
87        
88        /// <summary>
89        /// Adds components to the kernel during startup.
90        /// </summary>
91        protected override void AddComponents()
92        {
93            AddComponent<IPlanner, Planner>();
94            AddComponent<IPlanningStrategy, ConstructorReflectionStrategy>();
95            AddComponent<IPlanningStrategy, PropertyReflectionStrategy>();
96            AddComponent<IPlanningStrategy, MethodReflectionStrategy>();
97
98            AddComponent<ISelector, Selector>();
99            AddComponent<IConstructorScorer, StandardConstructorScorer>();
100            AddComponent<IInjectionHeuristic, StandardInjectionHeuristic>();
101
102            AddComponent<IPipeline, Pipeline>();
103            if (!Settings.ActivationCacheDisabled)
104            {
105                AddComponent<IActivationStrategy, ActivationCacheStrategy>();
106            }
107
108            AddComponent<IActivationStrategy, PropertyInjectionStrategy>();
109            AddComponent<IActivationStrategy, MethodInjectionStrategy>();
110            AddComponent<IActivationStrategy, InitializableStrategy>();
111            AddComponent<IActivationStrategy, StartableStrategy>();
112            AddComponent<IActivationStrategy, BindingActionStrategy>();
113            AddComponent<IActivationStrategy, DisposableStrategy>();
114
115            AddComponent<IBindingResolver, StandardBindingResolver>();
116            AddComponent<IBindingResolver, OpenGenericBindingResolver>();
117
118            AddComponent<IMissingBindingResolver, DefaultValueBindingResolver>();
119            AddComponent<IMissingBindingResolver, SelfBindingResolver>();
120
121#if !NO_LCG
122            if (!Settings.UseReflectionBasedInjection)
123            {
124                AddComponent<IInjectorFactory, DynamicMethodInjectorFactory>();
125            }
126            else
127#endif
128            {
129                AddComponent<IInjectorFactory, ReflectionInjectorFactory>();
130            }
131
132            AddComponent<ICache, Cache>();
133            AddComponent<IActivationCache, ActivationCache>();
134            AddComponent<ICachePruner, GarbageCollectionCachePruner>();
135
136#if !NO_ASSEMBLY_SCANNING
137            AddComponent<IModuleLoader, ModuleLoader>();
138            AddComponent<IModuleLoaderPlugin, CompiledModuleLoaderPlugin>();
139            AddComponent<IAssemblyNameRetriever, AssemblyNameRetriever>();
140#endif
141        }
142    }
143}
144
Full Screen

PluginsRegistry.cs

Source: PluginsRegistry.cs Github

copy
1/*
2 JustMock Lite
3 Copyright © 2020 Progress Software Corporation
4
5   Licensed under the Apache License, Version 2.0 (the "License");
6   you may not use this file except in compliance with the License.
7   You may obtain a copy of the License at
8
9   http://www.apache.org/licenses/LICENSE-2.0
10
11   Unless required by applicable law or agreed to in writing, software
12   distributed under the License is distributed on an "AS IS" BASIS,
13   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   See the License for the specific language governing permissions and
15   limitations under the License.
16*/
17
18using System;
19using System.Collections.Generic;
20using System.Reflection;
21using Telerik.JustMock.AutoMock.Ninject;
22using Telerik.JustMock.AutoMock.Ninject.Infrastructure.Disposal;
23using Telerik.JustMock.AutoMock.Ninject.Modules;
24using Telerik.JustMock.AutoMock.Ninject.Parameters;
25
26#if !PORTABLE
27namespace Telerik.JustMock.Plugins
28{
29    internal class PluginsRegistry : DisposableObject
30    {
31        private Dictionary<Type, INinjectModule> plugins = new Dictionary<Type, INinjectModule>();
32        private readonly StandardKernel kernel = new StandardKernel();
33
34        public PluginT Register<PluginT>(string assemblyPath, params IParameter[] parameters)
35            where PluginT : INinjectModule
36        {
37            lock (this)
38            {
39                var assembly = Assembly.LoadFile(assemblyPath);
40                this.kernel.Load(assembly);
41
42                var plugin = this.kernel.TryGet<PluginT>(parameters);
43                if (plugin == null)
44                {
45                    throw new NotSupportedException(string.Format("Plugin type {0} not found, lookup assembly {1}", typeof(PluginT), assembly));
46                }
47
48                plugins.Add(typeof(PluginT), plugin);
49
50                return plugin;
51            }
52        }
53
54        public bool Exists<PluginT>() where PluginT : INinjectModule
55        {
56            lock (this)
57            {
58                return plugins.ContainsKey(typeof(PluginT));
59            }
60        }
61
62        public PluginT Get<PluginT>() where PluginT : INinjectModule
63        {
64            lock (this)
65            {
66                return (PluginT)plugins[typeof(PluginT)];
67            }
68        }
69
70        public PluginT Unregister<PluginT>() where PluginT : INinjectModule
71        {
72            lock (this)
73            {
74                INinjectModule plugin = null;
75                if (plugins.TryGetValue(typeof(PluginT), out plugin))
76                {
77                    var pluginDisposable = plugin as IDisposable;
78                    if (pluginDisposable != null)
79                    {
80                        pluginDisposable.Dispose();
81                    }
82                }
83                return (PluginT)plugin;
84            }
85        }
86
87        public override void Dispose(bool disposing)
88        {
89            lock (this)
90            {
91                if (disposing && !this.IsDisposed)
92                {
93                    foreach (var plugin in plugins.Values)
94                    {
95                        var pluginDisposable = plugin as IDisposable;
96                        if (pluginDisposable != null)
97                        {
98                            pluginDisposable.Dispose();
99                        }
100                    }
101                }
102
103                base.Dispose(disposing);
104            }
105        }
106    }
107}
108#endif
109
Full Screen

MockingContainer.cs

Source: MockingContainer.cs Github

copy
1/*
2 JustMock Lite
3 Copyright © 2010-2015,2018-2019 Progress Software Corporation
4
5   Licensed under the Apache License, Version 2.0 (the "License");
6   you may not use this file except in compliance with the License.
7   You may obtain a copy of the License at
8
9   http://www.apache.org/licenses/LICENSE-2.0
10
11   Unless required by applicable law or agreed to in writing, software
12   distributed under the License is distributed on an "AS IS" BASIS,
13   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   See the License for the specific language governing permissions and
15   limitations under the License.
16*/
17
18using System;
19using System.Linq;
20using System.Linq.Expressions;
21using System.Reflection;
22using Telerik.JustMock.AutoMock.Ninject;
23using Telerik.JustMock.AutoMock.Ninject.Planning.Bindings.Resolvers;
24using Telerik.JustMock.AutoMock.Ninject.Syntax;
25using Telerik.JustMock.Core;
26using Telerik.JustMock.Core.Castle.DynamicProxy;
27using Telerik.JustMock.Core.Context;
28using Telerik.JustMock.Expectations;
29using Telerik.JustMock.Helpers;
30
31namespace Telerik.JustMock.AutoMock
32{
33	/// <summary>
34	/// Auto-mocking container that can automatically inject mocks for all
35	/// dependencies of the tested class. The container is based on NInject and
36	/// supports the core NInject syntax as well as syntax extensions for arranging
37	/// mocks and injecting mocks into properties and constructor arguments.
38	/// </summary>
39	/// <typeparam name="T">The type of the class whose dependencies should be mocked.
40	/// If this is an abstract class, then a Behavior.CallOriginal mock is created for the instance.
41	/// Abstract members of the instance can be manipulated using the methods in the Mock class.
42	/// </typeparam>
43	public sealed class MockingContainer<T> : StandardKernel where T : class
44	{
45		private T resolvedInstance;
46		private IMockResolver mockResolver;
47
48		/// <summary>
49		/// Initializes a new instance of the <see cref="MockingContainer{T}" /> class.
50		/// </summary>
51		/// <param name="settings">Optional settings that modify the way the auto-mocking container works.</param>
52		public MockingContainer(AutoMockSettings settings = null)
53			: base(settings ?? new AutoMockSettings())
54		{
55		}
56
57		/// <summary>
58		/// Implementation detail.
59		/// </summary>
60		protected override bool ShouldAddComponent(Type component, Type implementation)
61		{
62			if (implementation == typeof(SelfBindingResolver))
63			{
64				return false;
65			}
66
67			return base.ShouldAddComponent(component, implementation);
68		}
69
70		/// <summary>
71		/// Implementation detail.
72		/// </summary>
73		protected override void AddComponents()
74		{
75			base.AddComponents();
76
77			this.Components.Add<IMissingBindingResolver, MockResolver>();
78			this.Components.Add<IMockResolver, MockResolver>();
79			this.mockResolver = this.Components.Get<IMockResolver>();
80
81			if (Settings.ConstructorArgTypes == null)
82			{
83				this.Bind<T>().To(this.ImplementationType);
84			}
85			else
86			{
87				this.Bind<T>().ToConstructor(CreateConstructorExpression());
88			}
89		}
90
91		private Type implementationType;
92		private Type ImplementationType
93		{
94			get
95			{
96				if (this.implementationType == null)
97				{
98					var targetType = typeof(T);
99					if (targetType.IsAbstract)
100					{
101						MockCreationSettings settings = MockCreationSettings.GetSettings(Behavior.CallOriginal);
102						ProxyTypeInfo typeInfo = MockingContext.CurrentRepository.CreateClassProxyType(targetType, settings);
103
104						this.implementationType = typeInfo.ProxyType;
105						foreach (var mixin in typeInfo.Mixins)
106						{
107							this.Bind(mixin.Key).ToConstant(mixin.Value);
108						}
109					}
110					else
111					{
112						this.implementationType = targetType;
113					}
114				}
115				return this.implementationType;
116			}
117		}
118
119		/// <summary>
120		/// Gets the kernel settings.
121		/// </summary>
122		public new AutoMockSettings Settings
123		{
124			get { return ProfilerInterceptor.GuardInternal(() => (AutoMockSettings)base.Settings); }
125		}
126
127		private Expression<Func<IConstructorArgumentSyntax, T>> CreateConstructorExpression()
128		{
129			var argTypes = Settings.ConstructorArgTypes;
130			var constructor = typeof(T).GetConstructor(BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance, Type.DefaultBinder, argTypes, null);
131			if (constructor == null)
132				throw new MockException("Constructor with the following parameter types was not found: " + ", ".Join(argTypes));
133			if (!constructor.IsPublic && !constructor.IsFamily && !constructor.IsFamilyOrAssembly)
134				throw new MockException("Constructor is not accessible by derived types.");
135
136			var implType = this.ImplementationType;
137			if (implType.IsProxy())
138			{
139				constructor = implType.GetConstructors()
140					.Single(ctor => ctor.GetParameters()
141						.Select(p => p.ParameterType)
142						.SkipWhile(pt => pt != typeof(IInterceptor[]))
143						.Skip(1)
144						.SequenceEqual(argTypes));
145			}
146
147			var inject = typeof(IConstructorArgumentSyntax).GetMethod("Inject");
148			var x = Expression.Parameter(typeof(IConstructorArgumentSyntax), "x");
149			var expr = Expression.New(constructor,
150				constructor.GetParameters().Select(p => Expression.Call(x, inject.MakeGenericMethod(p.ParameterType))).ToArray());
151
152			return (Expression<Func<IConstructorArgumentSyntax, T>>)Expression.Lambda(typeof(Func<IConstructorArgumentSyntax, T>), expr, x);
153		}
154
155		/// <summary>
156		/// Resolves the instance of the underlying type with all dependencies injected.
157		/// </summary>
158		public T Instance
159		{
160			get
161			{
162				return ProfilerInterceptor.GuardInternal(() =>
163					{
164						if (resolvedInstance == null)
165						{
166							resolvedInstance = this.Get<T>();
167						}
168						return resolvedInstance;
169					});
170			}
171		}
172
173		/// <summary>
174		/// Entry-point for setting expectations.
175		/// </summary>
176		/// <typeparam name="TInterface">Mocking interface</typeparam>
177		/// <param name="expression">Target expression</param>
178		/// <returns>
179		/// Reference to <see cref="FuncExpectation{TResult}"/> to setup the mock.
180		/// </returns>
181		public FuncExpectation<object> Arrange<TInterface>(Expression<Func<TInterface, object>> expression)
182		{
183			return ProfilerInterceptor.GuardInternal(() => this.Get<TInterface>().Arrange(expression));
184		}
185
186		/// <summary>
187		/// Entry-point for setting expectations.
188		/// </summary>
189		/// <typeparam name="TInterface">
190		/// Mocking interface
191		/// </typeparam>
192		/// <param name="expression">Target expression</param>
193		/// <returns>
194		/// Reference to <see cref="ActionExpectation"/> to setup the mock.
195		/// </returns>
196		public ActionExpectation Arrange<TInterface>(Expression<Action<TInterface>> expression)
197		{
198			return ProfilerInterceptor.GuardInternal(() => this.Get<TInterface>().Arrange(expression));
199		}
200
201		/// <summary>
202		/// Entry-point for setting expectations.
203		/// </summary>
204		/// <typeparam name="TInterface">
205		/// Mocking interface
206		/// </typeparam>
207		/// <param name="action">Target action</param>
208		/// <returns>
209		/// Reference to <see cref="ActionExpectation"/> to setup the mock.
210		/// </returns>
211		public ActionExpectation ArrangeSet<TInterface>(Action<TInterface> action)
212		{
213			return ProfilerInterceptor.GuardInternal(() => this.Get<TInterface>().ArrangeSet(action));
214		}
215
216		/// <summary>
217		/// Asserts all expected setups.
218		/// </summary>
219		/// <param name="message">A message to display if the assertion fails.</param>
220		public void AssertAll(string message = null)
221		{
222			ProfilerInterceptor.GuardInternal(() => this.mockResolver.ForEachMock(mock => mock.AssertAll(message)));
223		}
224
225		/// <summary>
226		/// Asserts all expected calls that are marked as must or
227		/// to be occurred a certain number of times.
228		/// </summary>
229		/// <param name="message">A message to display if the assertion fails.</param>
230		public void Assert(string message = null)
231		{
232			ProfilerInterceptor.GuardInternal(() => this.mockResolver.ForEachMock(mock => mock.Assert(message)));
233		}
234
235		/// <summary>
236		/// Asserts the specific call
237		/// </summary>
238		/// <typeparam name="TService">Service type.</typeparam>
239		/// <param name="expression">Target expression.</param>
240		/// <param name="message">A message to display if the assertion fails.</param>
241		public void Assert<TService>(Expression<Action<TService>> expression, string message = null)
242		{
243			ProfilerInterceptor.GuardInternal(() => this.Get<TService>().Assert(expression, message));
244		}
245
246		/// <summary>
247		/// Asserts the specific call
248		/// </summary>
249		/// <typeparam name="TService">Service type.</typeparam>
250		/// <param name="expression">Target expression</param>
251		/// <param name="message">A message to display if the assertion fails.</param>
252		public void Assert<TService>(Expression<Func<TService, object>> expression, string message = null)
253		{
254			ProfilerInterceptor.GuardInternal(() => this.Get<TService>().Assert(expression, message));
255		}
256
257		/// <summary>
258		/// Asserts a specific dependency
259		/// </summary>
260		/// <typeparam name="TService">Service type.</typeparam>
261		public void Assert<TService>()
262		{
263			ProfilerInterceptor.GuardInternal(() => this.Get<TService>().Assert());
264		}
265
266		/// <summary>
267		/// Asserts a specific dependency
268		/// </summary>
269		/// <param name="bindingName">Name.</param>
270		/// <param name="message">A message to display if the assertion fails.</param>
271		/// <typeparam name="TService">Service Type.</typeparam>
272		public void Assert<TService>(string bindingName, string message = null)
273		{
274			ProfilerInterceptor.GuardInternal(() => this.Get<TService>(bindingName).Assert(message));
275		}
276
277		/// <summary>
278		/// Asserts the specific call
279		/// </summary>
280		/// <typeparam name="TService">Service Type.</typeparam>
281		/// <param name="expression">Target expression.</param>
282		/// <param name="occurs">Specifies the number of times a mock call should occur.</param>
283		/// <param name="message">A message to display if the assertion fails.</param>
284		public void Assert<TService>(Expression<Func<TService, object>> expression, Occurs occurs, string message = null)
285		{
286			ProfilerInterceptor.GuardInternal(() => this.Get<TService>().Assert(expression, occurs, message));
287		}
288
289		/// <summary>
290		/// Asserts the specific call
291		/// </summary>
292		/// <typeparam name="TService">Service Type.</typeparam>
293		/// <param name="expression">Target expression</param>
294		/// <param name="occurs">Specifies the number of times a mock call should occur.</param>
295		/// <param name="message">A message to display if the assertion fails.</param>
296		public void Assert<TService>(Expression<Action<TService>> expression, Occurs occurs, string message = null)
297		{
298			ProfilerInterceptor.GuardInternal(() => this.Get<TService>().Assert(expression, occurs, message));
299		}
300
301		/// <summary>
302		/// Asserts the specific call
303		/// </summary>
304		/// <typeparam name="TService">Service Type.</typeparam>
305		/// <param name="bindingName">Name.</param>
306		/// <param name="expression">Target expression.</param>
307		/// <param name="message">A message to display if the assertion fails.</param>
308		public void Assert<TService>(string bindingName, Expression<Func<TService, object>> expression, string message = null)
309		{
310			ProfilerInterceptor.GuardInternal(() => this.Get<TService>(bindingName).Assert(expression, message));
311		}
312
313		/// <summary>
314		/// Asserts the specific call
315		/// </summary>
316		/// <typeparam name="TService">Service Type.</typeparam>
317		/// <param name="bindingName">Name.</param>
318		/// <param name="expression">Target expression.</param>
319		/// <param name="message">A message to display if the assertion fails.</param>
320		public void Assert<TService>(string bindingName, Expression<Action<TService>> expression, string message = null)
321		{
322			ProfilerInterceptor.GuardInternal(() => this.Get<TService>(bindingName).Assert(expression, message));
323		}
324
325		/// <summary>
326		/// Asserts the specific call
327		/// </summary>
328		/// <typeparam name="TService">Service Type.</typeparam>
329		/// <param name="bindingName">Name.</param>
330		/// <param name="expression">Target expression.</param>
331		/// <param name="occurs">Specifies the number of times a mock call should occur.</param>
332		/// <param name="message">A message to display if the assertion fails.</param>
333		public void Assert<TService>(string bindingName, Expression<Func<TService, object>> expression, Occurs occurs, string message = null)
334		{
335			ProfilerInterceptor.GuardInternal(() => this.Get<TService>(bindingName).Assert(expression, occurs, message));
336		}
337
338		/// <summary>
339		/// Asserts the specific call
340		/// </summary>
341		/// <typeparam name="TService">Service Type.</typeparam>
342		/// <param name="bindingName">Name.</param>
343		/// <param name="expression">Target expression.</param>
344		/// <param name="occurs">Specifies the number of times a mock call should occur.</param>
345		/// <param name="message">A message to display if the assertion fails.</param>
346		public void Assert<TService>(string bindingName, Expression<Action<TService>> expression, Occurs occurs, string message = null)
347		{
348			ProfilerInterceptor.GuardInternal(() => this.Get<TService>(bindingName).Assert(expression, occurs, message));
349		}
350
351		/// <summary>
352		/// Asserts the specific call
353		/// </summary>
354		/// <typeparam name="TService">Service type.</typeparam>
355		/// <param name="action">Target action.</param>
356		/// <param name="message">A message to display if the assertion fails.</param>
357		public void AssertSet<TService>(Action<TService> action, string message = null)
358		{
359			ProfilerInterceptor.GuardInternal(() => this.Get<TService>().AssertSet(action, message));
360		}
361
362		/// <summary>
363		/// Asserts the specific call
364		/// </summary>
365		/// <typeparam name="TService">Service type.</typeparam>
366		/// <param name="action">Target action.</param>
367		/// <param name="occurs">Specifies the number of times a mock call should occur.</param>
368		/// <param name="message">A message to display if the assertion fails.</param>
369		public void AssertSet<TService>(Action<TService> action, Occurs occurs, string message = null)
370		{
371			ProfilerInterceptor.GuardInternal(() => this.Get<TService>().AssertSet(action, occurs, message));
372		}
373	}
374}
375
Full Screen

Accelerate Your Automation Test Cycles With LambdaTest

Leverage LambdaTest’s cloud-based platform to execute your automation tests in parallel and trim down your test execution time significantly. Your first 100 automation testing minutes are on us.

Try LambdaTest

Most used methods in StandardKernel

Run Selenium Automation Tests on LambdaTest Cloud Grid

Trigger Selenium automation tests on a cloud-based Grid of 3000+ real browsers and operating systems.

Test now for Free
LambdaTestX

We use cookies to give you the best experience. Cookies help to provide a more personalized experience and relevant advertising for you, and web analytics for us. Learn More in our Cookies policy, Privacy & Terms of service

Allow Cookie
Sarah

I hope you find the best code examples for your project.

If you want to accelerate automated browser testing, try LambdaTest. Your first 100 automation testing minutes are FREE.

Sarah Elson (Product & Growth Lead)