1. In a 10- to 12-inch frying pan over medium-high heat, melt butter. Add onion and stir often until tinged with brown, 3 to 5 minutes. Add mushrooms. Stir often until mushrooms are lightly browned, 5 to 8 minutes.
2. Meanwhile, in a 4- to 5-quart covered pan, bring 3 quarts water to a boil over high heat. Add beans and cook, uncovered, until tender-crisp when pierced, 6 to 12 minutes, depending on variety. Drain beans and put in a shallow serving dish.
3. Blend cornstarch with 1/3 cup water, dry sherry, and 2 teaspoons soy. Add to mushroom mixture and stir over high heat until boiling. Add sesame oil.
4. Pour sauce over beans. Add soy sauce to taste.