Generate the Autonomous Automation Functional automation test script design automation script for Amazon website and log in with valid credentials  and search for a product, add it to cart using java selenium.