@@ -25,18 +25,18 @@ namespace OpenQA.Selenium.BiDi.Modules.Script;
25
25
26
26
public sealed class ScriptModule ( Broker broker ) : Module ( broker )
27
27
{
28
- public async Task < EvaluateResult . Success > EvaluateAsync ( string expression , bool awaitPromise , Target target , EvaluateOptions ? options = null )
28
+ public async Task < EvaluateResultSuccess > EvaluateAsync ( string expression , bool awaitPromise , Target target , EvaluateOptions ? options = null )
29
29
{
30
30
var @params = new EvaluateCommandParameters ( expression , target , awaitPromise , options ? . ResultOwnership , options ? . SerializationOptions , options ? . UserActivation ) ;
31
31
32
32
var result = await Broker . ExecuteCommandAsync < EvaluateCommand , EvaluateResult > ( new EvaluateCommand ( @params ) , options ) . ConfigureAwait ( false ) ;
33
33
34
- if ( result is EvaluateResult . Exception exp )
34
+ if ( result is EvaluateResultException exp )
35
35
{
36
36
throw new ScriptEvaluateException ( exp ) ;
37
37
}
38
38
39
- return ( EvaluateResult . Success ) result ;
39
+ return ( EvaluateResultSuccess ) result ;
40
40
}
41
41
42
42
public async Task < TResult ? > EvaluateAsync < TResult > ( string expression , bool awaitPromise , Target target , EvaluateOptions ? options = null )
@@ -46,18 +46,18 @@ public sealed class ScriptModule(Broker broker) : Module(broker)
46
46
return result . Result . ConvertTo < TResult > ( ) ;
47
47
}
48
48
49
- public async Task < EvaluateResult . Success > CallFunctionAsync ( string functionDeclaration , bool awaitPromise , Target target , CallFunctionOptions ? options = null )
49
+ public async Task < EvaluateResultSuccess > CallFunctionAsync ( string functionDeclaration , bool awaitPromise , Target target , CallFunctionOptions ? options = null )
50
50
{
51
51
var @params = new CallFunctionCommandParameters ( functionDeclaration , awaitPromise , target , options ? . Arguments , options ? . ResultOwnership , options ? . SerializationOptions , options ? . This , options ? . UserActivation ) ;
52
52
53
53
var result = await Broker . ExecuteCommandAsync < CallFunctionCommand , EvaluateResult > ( new CallFunctionCommand ( @params ) , options ) . ConfigureAwait ( false ) ;
54
54
55
- if ( result is EvaluateResult . Exception exp )
55
+ if ( result is EvaluateResultException exp )
56
56
{
57
57
throw new ScriptEvaluateException ( exp ) ;
58
58
}
59
59
60
- return ( EvaluateResult . Success ) result ;
60
+ return ( EvaluateResultSuccess ) result ;
61
61
}
62
62
63
63
public async Task < TResult ? > CallFunctionAsync < TResult > ( string functionDeclaration , bool awaitPromise , Target target , CallFunctionOptions ? options = null )
0 commit comments