New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
set address visibility field per setting #79
Conversation
How about instead of adding a new configuration option use something like this? #############################
# set contact street
#############################
if ad_cfg["contact"]["street"]:
try:
self.webdriver.find_element(By.ID, "addressVisibility").click()
pause(2000)
except NoSuchElementException:
# ignore
pass
self.web_input(By.ID, "pstad-street", ad_cfg["contact"]["street"]) |
You mean make it implicit, if a street is configured to check the adressVisibility? Would that allow the user to configure that on a per ad basis if there is a street in the default configuration? |
If they explicitly set the street to an empty value yes |
Alright. Now I just need to figure out how I can update a pull request. 😄 |
Used and tested your code, worked well and I could publish an ad. Learned a lot with my first contribution to a public repository and python, thanks. |
Can you try if it works like this too? if ad_cfg["contact"]["street"]:
try:
if not self.webdriver.find_element(By.ID, "pstad-street").is_enabled():
self.webdriver.find_element(By.ID, "addressVisibility").click()
pause(2000)
except NoSuchElementException:
# ignore
pass
self.web_input(By.ID, "pstad-street", ad_cfg["contact"]["street"]) |
pushed before testing… 🙄 need to fix something first |
Fixed and tested it. Stumbled over another unrelated issues though
went away on the second attempt. |
I think now I screwed up trying to resolve the merge conflict. :-/ Can you remove the last commit from your main branch? |
Like so? |
Issue #, if available:
#74 #75
Description of changes:
added a setting for address visibility and set the checkmark accordingly to enable the street input field
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.