1
0
mirror of https://github.com/MontFerret/ferret.git synced 2025-02-13 13:58:32 +02:00

Fixed dead lock

This commit is contained in:
Tim Voronov 2018-09-25 18:06:45 -04:00
parent ea6007b99e
commit 81d70fc1f8
4 changed files with 3 additions and 8 deletions

View File

@ -5,7 +5,5 @@ CLICK(btn)
WAIT_NAVIGATION(doc)
WAIT_ELEMENT(doc, '.IconNav')
LOG("FOUND ELEMENT")
FOR el IN ELEMENTS(doc, '.IconNav a')
RETURN TRIM(el.innerText)

View File

@ -169,8 +169,6 @@ func NewHtmlDocument(
doc.Lock()
defer doc.Unlock()
fmt.Println("NAVIGATED")
updated, err := getRootElement(client)
if err != nil {

View File

@ -165,7 +165,7 @@ func (broker *EventBroker) Close() error {
defer broker.Unlock()
if broker.cancel != nil {
broker.Stop()
broker.cancel()
}
for _, event := range broker.events {

View File

@ -21,13 +21,12 @@ func Trim(_ context.Context, args ...core.Value) (core.Value, error) {
}
text := args[0].String()
chars := " "
if len(args) > 1 {
chars = args[1].String()
return values.NewString(strings.Trim(text, args[1].String())), nil
}
return values.NewString(strings.Trim(text, chars)), nil
return values.NewString(strings.TrimSpace(text)), nil
}
/*