I want to click on "create post" button of this element:
<div class="l61y9joe j8otv06s a1itoznt qwtvmjv2 kiex77na lgsfgr3h mcogi7i5 ih1xi9zn ippphs35 a53abz89" data-hover="tooltip" data-tooltip-display="overflow" id="js_2f">Create Post</div>
But this id (id="js_2f") has a random value:
I did it this way but didn't work !
wait = WebDriverWait(self.browser, 20)
wait.until(EC.element_to_be_clickable((By.XPATH, "//*[text()='Create Post' and contains(@id, 'js_')]"))).click()
How can i click on it Using Xpath method ?