update find content element (#10)

- Updated the getContentElement function to utilize the Race method for improved efficiency in finding content elements.
- Added error handling for cases where no elements are found, ensuring better logging and debugging capabilities.
This commit is contained in:
zy
2025-08-13 02:34:50 +08:00
committed by GitHub
parent 2312b76293
commit 86224dcaa3
2 changed files with 93 additions and 5 deletions

View File

@@ -24,9 +24,9 @@ func TestPublish(t *testing.T) {
require.NoError(t, err)
err = action.Publish(context.Background(), PublishImageContent{
Title: "Claude移动端重大更新随时随地高效办公",
Content: "Claude移动端重大更新随时随地高效办公",
ImagePaths: []string{"1948784311265894447"},
Title: "Hello World",
Content: "Hello World",
ImagePaths: []string{"/tmp/1.jpg"},
})
assert.NoError(t, err)
}