This is the button I am trying to click
add =driver.find_element_by_xpath('//*[@id="root"]/div/main/div/section[4]/section/section[2]/section[2]/div[2]/div[1]/div/div/div[2]/div/div[2]/div')
add.click()
print("hey")
This is the code, add.click() does not generate any error and hey is printed but the button is not clicked..
Initially the add button is not in the viewport but when the code executes it automatically comes in the view port but nothing happens.
I have tried doing everything like scroll to element, and brought the element in the viewpoet but still nothing happens..
This is from where I got the xpath
<div class="sc-1usozeh-8 kTTqJP">
<span class="sc-1usozeh-6 fTsfFl">Add</span>
<i class="rbbb40-1 MxLSp sc-1usozeh-4 TZpZK" size="14" color="#ED5A6B">.
<svg xmlns="http://www.w3.org/2000/svg" fill="#ED5A6B" width="14"
height="14" viewBox="0 0 20 20" aria-labelledby="icon-svg-title-
icon-svg-desc-" role="img" class="rbbb40-0 hoSSCx">
<title>plus</title>
<path d="M15.5 9.42h-4.5v-4.5c0-0.56-0.44-1-1-1s-1 0.44-1 1v4.5h-
4.5c-0.56 0-1 0.44-1 1s0.44 1 1 1h4.5v4.5c0 0.54 0.44 1 1 1s1-0.46
1-1v-4.5h4.5c0.56 0 1-0.46 1-1s-0.44-1-1-1z"></path>
</svg>
</i>
</div>