mirror of
https://github.com/MontFerret/ferret.git
synced 2024-12-16 11:37:36 +02:00
7ce6797e9c
* Implemented XPath for CDP driver * Added XPATH function * Added e2e tests for CDP * Fixed linting issues * Added support of XPath to HTTP driver * Fixed linting issues
17 lines
343 B
Go
17 lines
343 B
Go
package templates
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/MontFerret/ferret/pkg/drivers/cdp/eval"
|
|
|
|
"github.com/MontFerret/ferret/pkg/runtime/values"
|
|
)
|
|
|
|
func AttributeRead(name values.String) string {
|
|
n := name.String()
|
|
return fmt.Sprintf(`
|
|
el.attributes[%s] != null ? el.attributes[%s].value : null
|
|
`, eval.ParamString(n), eval.ParamString(n))
|
|
}
|