mirror of
https://github.com/MontFerret/ferret.git
synced 2025-07-03 00:46:51 +02:00
Feature/new selector type (#657)
* Added remote type reference resolver * Added support of XPath query selector * Added CDP e2e testss covering XPath integration * Added additional CDP e2e tests covering XPath integration * Added type check to QuerySelector casting function * Fixed XPath e2e tests * Fixed vuln issue * Added support of XPath selectors to http driver * Added e2e tests for XPAth
This commit is contained in:
@ -44,13 +44,6 @@ func waitAttributeWhen(ctx context.Context, args []core.Value, when drivers.Wait
|
||||
return values.None, err
|
||||
}
|
||||
|
||||
// selector or attr name
|
||||
err = core.ValidateType(args[1], types.String)
|
||||
|
||||
if err != nil {
|
||||
return values.None, err
|
||||
}
|
||||
|
||||
timeout := values.NewInt(drivers.DefaultWaitTimeout)
|
||||
|
||||
// if a document is passed
|
||||
@ -76,7 +69,12 @@ func waitAttributeWhen(ctx context.Context, args []core.Value, when drivers.Wait
|
||||
return values.None, err
|
||||
}
|
||||
|
||||
selector := args[1].(values.String)
|
||||
selector, err := drivers.ToQuerySelector(args[1])
|
||||
|
||||
if err != nil {
|
||||
return values.None, err
|
||||
}
|
||||
|
||||
name := args[2].(values.String)
|
||||
value := values.ToString(args[3])
|
||||
|
||||
|
Reference in New Issue
Block a user