Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: insert value to specific line in CSV file
Post: insert value to specific line in CSV file

Hello, I have a CSV.file that looks something like this: Carrot Cake Other,Values test1,test Abc,test,test1 MyStringThe CSV values might change. In case, IF "MyString" is in the CSV file, I want to...
asheru93 General Coding Help 1 1,740 Oct-21-2019, 10:59 AM
    Thread: spread same class into separate files in python
Post: RE: spread same class into separate files in pytho...

I solved it like this with a basic class extend from TestSteps1 import Tests class Steps(Tests): ....However i had to also the way tests are executed because of how it was build it the past...in...
asheru93 General Coding Help 3 5,400 Jun-19-2019, 02:03 PM
    Thread: spread same class into separate files in python
Post: spread same class into separate files in python

I have some automated test written in python. There is file named TestSteps.py that holds all the test methods. The file is getting too big holding too many methods. It looks like this #TestSteps.py ...
asheru93 General Coding Help 3 5,400 Jun-19-2019, 01:16 PM
    Thread: if cond1 or cond2 or ...condN is not True
Post: RE: if cond1 or cond2 or ...condN is not True

Thanks for your answers. I will try to change the approach a bit and I will comeback with an answer.
asheru93 General Coding Help 4 2,477 Jun-03-2019, 02:10 PM
    Thread: if cond1 or cond2 or ...condN is not True
Post: if cond1 or cond2 or ...condN is not True

Hello, Here is the code and the question: t1 = addProduct1() t2 = addProduct2() ... t25 = addProduct25() if t1 or t2 or ... t25 is not True: assert False How can I write the if condition in ...
asheru93 General Coding Help 4 2,477 Jun-03-2019, 01:41 PM
    Thread: copy paste file and re-name it
Post: copy paste file and re-name it

Hello, I am building some automated tests including install/uninstall of an app. I need to build a small back-up file system for a file. I have a file called User.gdh inside this folder: - C:\Pr...
asheru93 General Coding Help 1 2,342 Mar-13-2019, 10:04 AM
    Thread: Delete directories in folder is not working after folder is updated
Post: RE: Delete directories in folder is not working af...

I guess everything else is related to the automation framework itself. The problem I guess the program sits in that directory and after the folder is updated it does not know anymore to execute delete...
asheru93 General Coding Help 2 2,601 Feb-13-2019, 12:37 PM
    Thread: Delete directories in folder is not working after folder is updated
Post: Delete directories in folder is not working after ...

So I'm having an automated test that is deleting all the projects inside Projects folder. folder = myPath\Projects\Project1 Project2 The test exec...
asheru93 General Coding Help 2 2,601 Feb-13-2019, 11:59 AM
    Thread: How to ignore - ERROR: The system was unable to find the specified registry key or va
Post: RE: How to ignore - ERROR: The system was unable t...

APP_REGISTRY_KEY - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths lookupRegistryKey = theNameOfTheApplication @ichabod801 - there is but in this case my condition( if len(cons...
asheru93 General Coding Help 9 6,550 Feb-04-2019, 06:35 AM
    Thread: run setup.exe from python script with special parameters
Post: run setup.exe from python script with special para...

So I have an setup.exe that I want to execute from a python script. If i run it outside a python script so directly in the command line it works as expected now i want to run in from a python script. ...
asheru93 General Coding Help 0 2,287 Feb-01-2019, 03:11 PM
    Thread: How to ignore - ERROR: The system was unable to find the specified registry key or va
Post: RE: How to ignore - ERROR: The system was unable t...

This is the error shown in the command line: ERROR: The system was unable to find the specified registry key or value.
asheru93 General Coding Help 9 6,550 Feb-01-2019, 12:09 PM
    Thread: How to ignore - ERROR: The system was unable to find the specified registry key or va
Post: RE: How to ignore - ERROR: The system was unable t...

def isAlreadyInstalled(lookupRegistryKey): try: consoleLines = os.popen('reg query "' + APP_REGISTRY_KEY + "\\" + VERSION_SYSTEM_NAME + '"').readlines() if len(cons...
asheru93 General Coding Help 9 6,550 Feb-01-2019, 10:37 AM
    Thread: How to ignore - ERROR: The system was unable to find the specified registry key or va
Post: RE: How to ignore - ERROR: The system was unable t...

No, my script is working ok. But this just pops there and i don't want to see it. I'm looping for 5 minutes, call this method evrey second to check if a program is installed or not. I want to ignore ...
asheru93 General Coding Help 9 6,550 Feb-01-2019, 10:07 AM
    Thread: How to ignore - ERROR: The system was unable to find the specified registry key or va
Post: How to ignore - ERROR: The system was unable to fi...

def isAlreadyInstalled(lookupRegistryKey): consoleLines = os.popen('reg query "' + APP_REGISTRY_KEY + "\\" + VERSION_SYSTEM_NAME + '"').readlines() if len(consoleLines) == 0: return Fa...
asheru93 General Coding Help 9 6,550 Feb-01-2019, 10:04 AM
    Thread: Case sensitive path
Post: RE: Case sensitive path

Thank you for your responses.
asheru93 General Coding Help 6 5,873 Jan-28-2019, 01:52 PM
    Thread: Case sensitive path
Post: RE: Case sensitive path

Sorry for missing some important information. So i want to install an specific app from a python script using this: os.system('path_to_setup.exe') This script will be executed on different machine...
asheru93 General Coding Help 6 5,873 Jan-28-2019, 12:03 PM
    Thread: Case sensitive path
Post: Case sensitive path

Hello, I want to open and setup.exe from python but sometimes it might be with uppercase like Setup.exe. How can I handle it properly? I have: myAppLowercase = path\setup.exe myAppUppercase = path...
asheru93 General Coding Help 6 5,873 Jan-28-2019, 08:30 AM
    Thread: Python unittest - running multiple tests from CSV file
Post: Python unittest - running multiple tests from CSV ...

class TestSuites(unittest.TestCase): def completeTest(self): pathCSV = r'pathToCSV\testCSV.csv' with open(pathCSV, 'rb') as csvfile: reader = csv.reader(csvfile) ...
asheru93 General Coding Help 0 4,153 Jan-21-2019, 08:26 AM
    Thread: Call and execute methods from a list
Post: RE: Call and execute methods from a list

Also if i run it like this: func_to_run = globals()[argumentsList[0],argumentsList[1]], i have no error but nothing happens so the methods are not called. Does anyone have an idea about this? Or a s...
asheru93 General Coding Help 2 2,276 Jan-17-2019, 08:31 AM
    Thread: Call and execute methods from a list
Post: RE: Call and execute methods from a list

I have almost reached a solution. class TestSuites(unittest.TestCase): def firstHagerTest(self): argumentsList = [] #creates empty list for i in sys.argv: #iterates trough argume...
asheru93 General Coding Help 2 2,276 Jan-16-2019, 02:32 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020