Changelog #007

Changelog 7

Hey y’all! This week's update brings an exciting new Files API for Sessions, along with several improvements to the Steel browser experience and important bugfixes to enhance stability.

⭐ New

Files API for Sessions πŸ“‚

The new Files API enables seamless file management within active browser sessions. You can now upload files from your local machine, use them in your automation workflows, and download files back when needed - perfect for testing file uploads or working with documents in your browser automation.

Typescript
main.ts
1
// Upload a file to your session
2
const file = new File(["Hello World!"], "hello.txt", { type: "text/plain" });
3
const uploadedFile = await client.sessions.files.upload(session.id, { file });
4
5
// Create a CDP session to pass in some custom controls
6
const cdpSession = await currentContext.newCDPSession(page);
7
const document = await cdpSession.send("DOM.getDocument");
8
9
// We need to find the input element using the selector
10
const inputNode = await cdpSession.send("DOM.querySelector", {
11
nodeId: document.root.nodeId,
12
selector: "#load-file",
13
});
14
15
// Set the CSV file as input on the page.
16
await cdpSession.send("DOM.setFileInputFiles", {
17
files: [uploadedFile.path],
18
nodeId: inputNode.nodeId,
19
});
20
21
// Download a file from your session
22
const response = await client.sessions.files.download(session.id, file.id);
23
const downloadedFile = await response.blob();

Documentation Link | Steel Cookbook

πŸ”§ Bugfixes/Improvements

  • Improved rendering of the session viewer for a slight speed bump in UI updates
  • Enhanced logging system for better coverage and debugging capabilities
  • Upgraded the session viewer UI on steel-browser for improved usability
  • Fixed proxy usage metrics that were incorrectly over-reporting usage
  • Improved the UI docker image to accept dynamic API URLs, enabling more flexible custom deployments
  • +10 other small bug fixes

As always, thanks for testing out the Steel beta. We really look forward to more of your feedback and continuing to build with this awesome, curious, and supportive community.

Got questions or want to chat? Join us on Discord or reach out on Twitter/X.