Reputation: 3
I have developed a Selenium script using Python that interacts with a website. The script runs successfully on my local Windows PC. However, when I try to run the same script in an AWS Batch environment with identical configurations, the script behaves differently. It seems like some components are getting changed in the AWS Batch environment.
Details:
I'm using Selenium with Python to automate interactions with a website. The script runs successfully on my local Windows PC. I have set up an AWS Batch environment with the same configurations as my local PC. When I run the script in the AWS Batch environment, I encounter unexpected behavior. I have checked the versions of Python, Selenium, and other relevant dependencies in both environments, and they match. I have also verified that the browser versions and configurations are consistent between the environments. The AWS Batch environment is set up to execute the script in headless mode, similar to my local PC. Despite these efforts, the script still behaves differently in the AWS Batch environment. Specific issues observed in the AWS Batch environment:
I am facing this issue with the calender date picker element.
Code snippet:
# create a new Chrome session
options = webdriver.ChromeOptions()
options.add_argument('--incognito')
# options.add_argument('--headless')
options.add_argument("--window-size=1920,1080")
options.add_argument('--disable-gpu')
options.add_argument('--no-sandbox')
options.add_argument('--disable-dev-shm-usage')
driver = webdriver.Chrome(options=options)
driver.maximize_window()
# Navigate to the application home page
url = "https://www.websiteurl.com/sessions/new"
driver.get(url)
Any suggestions on what could be causing this discrepancy and how to troubleshoot it would be greatly appreciated.
Thank you.
Upvotes: 0
Views: 25