The quantity of water is very important. Pour water just till the level of beans, or even less than that! You can add hot water later if the beans is not fully cooked.
Cook without a lid, as the steam accumulates and add more water into the beans making it soggy.
If the beans get cooked and there is still water in the pan, separate the beans to the sides with the water in the center and cook on high till the water evaporates. It may cause the beans to get slightly overcooked but still would taste great!