今日已更新 214 条资讯 | 累计 24500 条内容
关于我们

今日精选

HOT

最新资讯

共 24500 篇
第 323/1225 页
AI 资讯 Dev.to

Stop Using Raw WebDriver in Robot Framework

A lot of Robot Framework projects still look like plain Selenium scripts with .robot file extensions. Someone imports webdriver , creates driver = webdriver.Chrome() , then calls find_element and send_keys in Python helpers. Robot Framework runs the suite, but readable keywords, shared libraries, and consistent waits never show up in the tests. If you already use Robot Framework with SeleniumLibrary , you do not need the raw WebDriver API. SeleniumLibrary gives you high-level keywords. The Page Object Model gives you structure. Together they keep tests short and UI changes localized. We published a small MIT template that shows the layout: rf-seleniumlibrary-pageobject-template . It targets Sauce Demo — clone it, run four tests, fork the folder structure. What breaks when you mix in raw WebDriver driver = webdriver . Chrome () driver . find_element ( By . ID , " user-name " ). send_keys ( " standard_user " ) driver . find_element ( By . ID , " password " ). send_keys ( " secret_sauce " ) driver . find_element ( By . ID , " login-button " ). click () Fine for a script. Painful in a growing suite. Locators spread across helpers and test files. Waits become time.sleep(2) in one place and missing in another. You end up maintaining SeleniumLibrary and a parallel WebDriver stack. CI fails on a Tuesday night and you are not sure which path opened the browser. Before and after Before After driver.find_element(...).send_keys(...) Login With Valid Credentials ${VALID_USER} ${VALID_PASSWORD} Locators in every file LoginLocators.USERNAME in one module Ad-hoc sleeps wait_until_element_is_visible in BasePage.click() Two browser stacks One SeleniumLibrary instance per suite Four layers Layer Job Example Locators Selectors per screen login_locators.py BasePage Shared waits and actions click() , enter_text() Page library Screen keywords LoginPage.login() Robot test Scenario only Inventory Should Be Visible Folder layout in the repo: resources/locators/ → selectors pages/ → Python pa

Weiwen Weng 2026-07-10 02:14 8 原文
AI 资讯 Dev.to

Palette quantization notes: reducing colors without making an image muddy

I’ve been thinking about a small image-processing problem lately: how to reduce an image to a limited palette without making it look muddy. This comes up in a lot of places: pixel art tools printable pattern generators low-color previews LED matrix displays icons and small thumbnails craft or grid-based workflows The easy version is: pick the nearest color for every pixel. The hard version is: keep the important shapes readable after the palette gets much smaller. Nearest color is only the baseline A simple nearest-color pass usually works like this: Take each pixel. Compare it with every color in the target palette. Pick the closest one. Replace the pixel. That gives you a valid output, but not always a good one. The problem is that closest is local. It does not know whether the whole image still reads well. A face can lose warm midtones. A shadow can turn into a flat dark blob. A small highlight can disappear. Skin, fur, fabric, and background colors can collapse into the same bucket. So palette reduction is not just a color problem. It is also a structure problem. RGB distance can be misleading A common first attempt is Euclidean distance in RGB: function rgbDistance(a, b) { return Math.sqrt( (a.r - b.r) ** 2 + (a.g - b.g) ** 2 + (a.b - b.b) ** 2 ); } This is easy to implement, but it does not match human perception very well. Two colors can be numerically close in RGB and still feel different. Other colors can be farther apart numerically but visually acceptable. A better approach is to compare colors in a more perceptual color space, such as Lab or OKLab. You still have to be careful, but the distance metric starts closer to what the eye notices. Dithering helps, but it changes the style Error diffusion, like Floyd-Steinberg dithering, can preserve gradients and perceived detail with fewer colors. That is useful when the output is meant to look like a low-color image. But dithering is not always desirable. In grid-based outputs, it can create scattered single-p

qingwancong 2026-07-10 02:10 8 原文
AI 资讯 Dev.to

The Assembly Problem

The Smartest AI Workflow I Have Ever Seen Ran on Three Pages of Prompt Project managers are quietly building their own AI chief of staff. The duct tape is the interesting part. A few weeks ago I was talking with a project manager who runs large industrial projects. Real ones, with safety officers and subcontractors and go-live dates that cost serious money when they slip. Somewhere in the conversation he mentioned, almost apologetically, a side project of his. Every week, he feeds an AI model his project charter, the project plan, the risk register, the action tracker, and the last six weeks of status reports. Then he adds the current week's meeting notes and any relevant emails. On top of all that sits a prompt he has iterated on for months. It covers three A4 pages in font size 10. Out the other end comes a list of specific open topics he needs to chase down before writing his end-of-week status report. He has a second prompt that helps him prepare sharp questions for the weekly team meeting. A third one, about 200 lines, assembles everything and drafts the status report itself. He even runs scenario checks: the safety officer found discrepancies during vehicle inspections, the subcontractor says compliance takes two extra weeks, does this move the critical path and the go-live date? He called it manual and clunky. I think it is one of the most sophisticated AI workflows I have ever seen a working professional build, in any field. And I have been building software for a long time. But he was right about the clunky part. And the reason it is clunky tells you almost everything about where AI in project work is actually stuck. The analysis was never the hard part Here is the thing he said that stuck with me, close to verbatim: The AI is good at analysing lots of text sources. The challenge is to obtain all the information, and the effort to write it down comprehensively. Read that again. The intelligence is not the bottleneck. The bottleneck is assembly. Every single

Ryan Kramer 2026-07-10 02:07 7 原文
AI 资讯 HackerNews

Show HN: Pylon Sync, an agent-first full-stack realtime framework

I created Pylon to make it easier to move from hobby projects to full production apps. When I work on hobby projects, I usually use React or Next.js because they are quick to set up and easy to deploy on Vercel. For production apps, I separate the frontend and backend, then deploy the backend on AWS. But setting up a full backend on AWS can be complex and costly, especially for simple apps. Pylon is a full-stack, real-time framework that includes server-rendered React, TypeScript functions, enti

ericc59 2026-07-10 01:38 3 原文
AI 资讯 Product Hunt

Kastra

Runtime authorization for Claude, Cursor, Codex and OpenClaw Discussion | Link

2026-07-10 01:36 2 原文
AI 资讯 HackerNews

Show HN: I built a web tool to see and edit what an AI thinks before it answers

I run a small AI lab and playground and got super excited about Anthropics paper "Verbalizable Representations Form a Global Workspace in Language Models" ( https://transformer-circuits.pub/2026/workspace/index.html ) It talks about how they use a tool they call a Jacobian Lens to view inside the middle layers of LLM while it's working before it commits to a word (token). I wanted to see if I could get a version of this running on the open models and to my surprise it worked! I ran some experime

ada1981 2026-07-10 01:36 3 原文
开发者 The Verge AI

Google’s Nest Thermostat has hit its best price of the year

If you’re looking for a relatively affordable way to cut down on cooling costs, Google’s Nest Thermostat can help. It’s packed with smart controls and energy-saving features, and right now it’s on sale in white for $79 ($50 off), which is its best price of the year, at Amazon. The smart thermostat is quick to […]

Sheena Vasani 2026-07-10 01:33 9 原文