Posts by Bergo de Almeida • 181 points
17 posts
-
0
votes0
answers303
viewsQ: Set value in form field (or string input)
I have a form field that contains a built-in Javascript, which works dynamically. <input type="text" id="txtPreferencia" title="Tecla de atalho: Alt+R" name="txtPreferencia" class="infraText…
-
1
votes1
answer29
viewsQ: How to set a variable in the first call to a function, and keep this value in the second call on
I have a function that arrow a variable after going through an extensive list, which takes a certain amount of time. The program calls this function other times because it is responsible for filling…
-
1
votes1
answer567
viewsA: A question about python Pyautogui?
Pyautogui does not actually know what is appearing on the screen, what it does is automate the operation of the mouse and keyboard. If you intend to click a specific browser (including headless) I…
-
1
votes1
answer1460
viewsA: Scroll (Scroll Screen) with Selenium in Python: Error
Discovered another one (scrollBy): try: browser.execute_script('window.scrollBy(0, 15)') except: None I did it this way to get around the error, which I still don’t understand why it occurs. But it…
-
1
votes1
answer1460
viewsQ: Scroll (Scroll Screen) with Selenium in Python: Error
I have a list of items on the screen, in which I need to click one by one to parse data. It turns out that at some point, Selenium can’t click anymore, because when it tries, the following error…
-
0
votes1
answer133
viewsA: Define function result return or method
I added a return distribuicaoPara in each subsequent function, providing all the possibilities of setting the variable, and the value was finally returned! Thank you all. I also changed the loop. It…
-
1
votes1
answer133
viewsQ: Define function result return or method
Editing: A previous function generates a list like this: ['Responsável atual', 'Número do processo', 'Foro de tramitação', 'Data da intimação 05/10/2017', 'Data da ação 15/08/2011'] This is the…
-
1
votes1
answer6433
viewsQ: Python local and global variables
I have a software that treats dates, written as follows: def EscolheDataInicio(): controle1 = None controle2 = None if controle1 == None: teste = easygui.ccbox(msg="Escolher data início?",…
-
0
votes1
answer382
viewsA: Python: select checkbox in an orderly way
Solution found: def DistribuiProcesso(): try: log = open('c:\\E-Proc\\Distribuicao ' + str(hoje) + '.txt', 'w+') #Cria log de controle. except FileNotFoundError: log = open('c:\\E-Proc\\Distribuicao…
-
0
votes1
answer110
viewsA: Error: "Selenium.common.exceptions.Webdriverexception: Message: Unknown error: Element is not clickable at point"
I found the solution by putting a line like this: processosAlvo[y][1].send_keys('\ue007') It arrow with "Enter" before, and then click.
-
2
votes1
answer110
viewsQ: Error: "Selenium.common.exceptions.Webdriverexception: Message: Unknown error: Element is not clickable at point"
I’m setting a series of "checkboxes" in a variable lista. Then I run the variable through a loop so that only a few of them are clicked. But when the checkbox is not visible on the screen, Selenium…
-
1
votes1
answer382
viewsQ: Python: select checkbox in an orderly way
I have a list containing hundreds of data in the format [ '5008489', 'Órgão: MPF', 'PROCEDIMENTO DO JUIZADO ESPECIAL', 'CPF', <selenium.webdriver.remote.webelement.WebElement…
-
0
votes1
answer407
viewsQ: Filter data from a string with regular expression
I have a variable that contains the full company name and CNPJ. I am using verificaCnpj = re.search("\d{2}.\d{3}.\d{3}/\d{4}-\d{2}", variavel) to locate the CNPJ (because there are other variables…
-
1
votes2
answers88
viewsQ: Organize string data flow by default
Friends, I am working on a scraping project. At some point, I capture a table on the screen in the shape of a giant string, more or less like this: list = ('0004434-48.2010 n EU n (30 working days)…
-
1
votes1
answer2076
viewsQ: Select an option from the Selenium Python drop down menu
I have a menu that presents several options, I want to select only the one that is active. When I give 'variable'. find_element_by_id('key') Selenium returns me ALL options. The active option has a…
-
1
votes2
answers572
viewsQ: Manipulating strings in Python
I have a list with n strings. Example: lista = ['0004434-48.2010', 'UNIÃO, '(30 dias úteis) 03/07/2017', '13/07/2017', '0008767-77.2013', 'UNIÃO, '(10 dias úteis) 03/07/2017', '13/07/2017'] My…
pythonasked Bergo de Almeida 181 -
4
votes1
answer1266
viewsQ: Web Scraping Selenium + Python on JS-generated website = difficulty mapping elements
Good afternoon. I am developing a script that: accesses a system; within the environment, you will find certain information; generates a kind of report; creates a spreadsheet with the data. My…