How to use the robotframework.models.Webcase.objects.all function in robotframework

To help you get started, we’ve selected a few robotframework examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Wesly-Yu / AutoZone / robotframework / webviews.py View on Github external
def add_web_casename(request):
    username = request.session.get('user', '')
    webcases = Webcase.objects.all()
    if request.method == "POST":
        webmodelname = request.POST.get("webmodelname", )
        webcasename = request.POST.get("webcasename", )
        webcharger = request.POST.get("webcharger", )
        webaddcasedesc = request.POST.get("webaddcasedesc", )
        Webcase.objects.get_or_create(webcase_models=webmodelname,webcasename=webcasename,webcase_charger=webcharger,webcasedesc=webaddcasedesc)
        return render(request, "Web_test_robotframework.html", {"user": username, "webcases":webcases})
github Wesly-Yu / AutoZone / robotframework / webviews.py View on Github external
def del_web_casename(request):
    username = request.session.get('user', '')
    webcases = Webcase.objects.all()
    if request.method == "POST":
        webcaseID = request.POST.get("id", )
        Webcase.objects.filter(id=webcaseID).delete()
        return render(request, "Web_test_robotframework.html", {"user": username, "webcases":webcases})