I have one issue this the xpath “//*[@id="descriptionTextArea"]
” where I will submit my proposal but it showing on both type of project , although where freelance also not showing me any textbox to submit the proposal and it not display this box for many reason such as verified my account first or NDA sign etc but when i search this xpath in inspect element so it show me this xpath as well where i cant bid but i want to filterter if it display me the text box so my automation submit Enter on that area otherwise it do driver.back() , but this xpath is available in both type of project , so what I do now?
I am giving you the full xpath of both projects and telling which is actually showing me option to submit the proposal and which one is not showing the option to submit the proposal but xpath is available there too , i am giving you xpath of both type and complete Html element as you find the way , How i filter this
Here is the xpath and element which showing me the option to enter my proposal
” /html/body/app-root/app-logged-in-shell/div/fl-container/div/div/app-project-view/app-project-view-logged-in/app-project-view-details/fl-page-layout/main/fl-container/fl-page-layout-single/fl-grid/fl-col[1]/app-project-details-freelancer/app-bid-form/fl-card/div/div[2]/fl-bit[1]/fl-textarea/textarea
”
“<textarea _ngcontent-webapp-c175="" flcontrolvalueaccessor="" class="TextArea ng-tns-c175-175 ng-trigger ng-trigger-shakeAnimation ng-untouched ng-pristine ng-invalid" aria-errormessage="textarea-undefined-errorId-iq12" aria-invalid="false" data-auto-grow="true" data-font-color="dark" data-size="xsmall" data-weight="normal" id="descriptionTextArea" data-borderless="false" placeholder="What makes you the best candidate for this project?" data-resize="vertical" data-hide-scrollbar="false" rows="4" autocomplete="off" spellcheck="false" style="overflow: auto; height: 110px;"></textarea>
“
and here is is the xpath and element which not showing me the option to enter my proposal but I dont know why xapth is still there in it inspect element
“/html/body/app-root/app-logged-in-shell/div/fl-container/div/div/app-project-view/app-project-view-logged-in/app-project-view-details/fl-page-layout/main/fl-container/fl-page-layout-single/fl-grid/fl-col[1]/app-project-details-freelancer/app-bid-form/fl-card/div/div[2]/fl-bit[1]/fl-textarea/textarea
”
“<textarea _ngcontent-webapp-c195="" flcontrolvalueaccessor="" class="TextArea ng-tns-c195-93 ng-trigger ng-trigger-shakeAnimation ng-untouched ng-pristine ng-invalid" aria-errormessage="textarea-undefined-errorId-o7jr" aria-invalid="false" data-auto-grow="true" data-font-color="dark" data-size="xsmall" data-weight="normal" id="descriptionTextArea" data-borderless="false" placeholder="What makes you the best candidate for this project?" data-resize="vertical" data-hide-scrollbar="false" rows="4" autocomplete="off"></textarea>
“
Additional Info , all this already import in my python code
`import re
import time
import requests
from bs4 import BeautifulSoup
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.chrome.options import Options
from selenium.common.exceptions import TimeoutException
from selenium.webdriver.support.ui import WebDriverWait
from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver.support import expected_conditions as EC
from selenium.common.exceptions import ElementClickInterceptedException`
Here is my code snippet that relate to this issue
`def process_project(driver):
text_box_xpath = "//*[@id='descriptionTextArea']"
projectdetail_xpath = "//fl-bit/fl-interactive-text/fl-text/span"
chatgptURL = "https://chatgpt.com/"
gptSearchbox_xpath = "//*[@id='prompt-textarea']"
try:
# Check if text box xpath is found
text_box_element = driver.find_element(By.XPATH, text_box_xpath)
print("Text box found.")`