web

Differentiate by section class in Selenium

Differentiate by section class in Selenium Question: Im facing a problem in Python selenium, I would like to print on my code the following data, an email address: [email protected] I just need a hint, that’s all… HTML: <section tabindex="-1" class="pv-profile-section pv-contact-info artdeco-container-card"> <!—-> <h2 class="text-body-large-open mb4"> Información de contacto </h2> <div class="pv-profile-section__section-info section-info" tabindex="-1"> <section …

Total answers: 2

How to get Category from Product? Django

How to get Category from Product? Django Question: I’m trying to create a search bar where user can choose Category and write product name. So I can display all products in that category where the name of product matches with what he wrote in text input. So I have Category -> Subcategory -> Product. Is …

Total answers: 1

Empty results in dynamical form in Django

Empty results in dynamical form in Django Question: My views.py: from django.shortcuts import render from django.shortcuts import HttpResponse from .models import * from .forms import TestForm from django import forms def TestView(request,id): test = Tests.objects.get(id=id) queshions = Queshions.objects.filter(test=test) form = TestForm(queshions=queshions) if request.method == ‘POST’: print(request.POST) form = TestForm(data=request.POST, queshions=queshions) print(form) print(form.is_valid()) else: context = …

Total answers: 1

Selenium find_element broke for loop

Selenium find_element broke for loop Question: I find elements with find_elements and after getting child elements with find_element, but the iteration doesn’t work further after find_element and the loop stops (although there are several elements found with find_elements) import os from selenium import webdriver from selenium.webdriver.chrome.service import Service from selenium.webdriver.common.by import By from selenium.webdriver.support.wait import …

Total answers: 1

Web Search Automation with Python/Selenium

Web Search Automation with Python/Selenium Question: I’m trying to access a search box on a website and I keep getting a ‘not JSON serializable’ error. Not quite sure what I am doing wrong should be pretty simple, can anyone spot the issue, is it because I haven’t set a specific file path for ‘webdriver.Chrome()’ or …

Total answers: 1

admin panel in Django creating for to change Product media and text from webpage

admin panel in Django creating for to change Product media and text from webpage Question: I have created a website in Django that contains product details and captions. Now, I want to create a dynamic admin panel that performs the following tasks without using code (because the client has no idea about coding): Add or …

Total answers: 2

For Django project (using VS Code), dynamic images not loading. Possible issue with baseURL

For Django project (using VS Code), dynamic images not loading. Possible issue with baseURL Question: I’ve started a Django project based off of a (Telusko/Travello) tutorial but using my own files. There’s data defined on Views.py for title, description, images for courses. It should populate containers in a row on homepage. Everything is getting populated …

Total answers: 1

reverse accessor model clashing Django Web App

reverse accessor model clashing Django Web App Question: from django.db import models from django.contrib.auth.models import AbstractUser class Customer(AbstractUser): address_line = models.CharField(max_length=255) city = models.CharField(max_length=255) postal_code = models.CharField(max_length=10) phone_number = models.CharField(max_length=20) origin_country = models.CharField(max_length=255) profile_picture = models.ImageField(upload_to=’customer_profile_pics’, null=True, blank=True) class Chef(AbstractUser): address_line = models.CharField(max_length=255) city = models.CharField(max_length=255) postal_code = models.CharField(max_length=10) phone_number = models.CharField(max_length=20) origin_country = models.CharField(max_length=255) …

Total answers: 1

requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')), Python

requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')), Python Question: I made a telegram bot and deployed it on Render. All works fine for like 3 hours then the bot gets down and throws this error: `raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: (‘Connection aborted.’, ConnectionResetError(104, ‘Connection reset by peer’))` Worth mentioning that the server keeps being Live …

Total answers: 1

how to click on link text selenium python

how to click on link text selenium python Question: i tried to click on link text but no work. Unable to locate element: {"method":"link text","selector":"Bán chạy"} please help me. My code: driver.find_element_by_link_text(‘Bán chạy’).click() https://shopee.vn/search?keyword=iphone Asked By: Luận Đặng Văn || Source Answers: driver.find_elements_by_xpath("//*[contains(text(), ‘Bán chạy”)]").click() Answered By: msurwillo You can do it by below way …

Total answers: 3