Question

We have a website that allows 3 kinds of users. a. Users b. Admins c. Partners...

  1. We have a website that allows 3 kinds of users.

a. Users

b. Admins

c. Partners

Usernames for those 3 test roles are on a text file. Assume that we don’t need passwords to get in to this website.

User: user1

Admin:admin1

Partner:partern1

URL for the login is

www.example.com/login/{username}

Write a script or pseudo code to automate this scenario.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Let us consider the usernames are unique. No two users irrespective of their type will have same username .

The pseudocode is be as below

Enter your username
Store the value in variable usr
Open the text file containing usernames (users.txt)
Loop: Read first line of the username text file users.txt
store that in a variable line
split the line by the delimeter ':'
store the first part in variable 'type' and second in 'usrname'

  
check this 'usrname' value with the variable usr
if they matches exactly:
read the 'type' and load corresponding Dashboard of 'type'
break from the loop.
else
read next line
Loop Ends

Now write the code with your favourite scripting language .

Hope this will help.
If you need annymore detail let me know.

Add a comment
Know the answer?
Add Answer to:
We have a website that allows 3 kinds of users. a. Users b. Admins c. Partners...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Create a folder named "TrainerApp". In that folder create the following files. Create a PHP file,...

    Create a folder named "TrainerApp". In that folder create the following files. Create a PHP file, "insert-user-form.php", with a form that has the following fields: - First Name (text) - Last Name (text) - Email (text) - Password (text) - Submit button Create another PHP file, "insert-exercise-form.php" with a form that has the following fields: - Exercise Name (text) - Description (text) - Demonstration Image (file) - Submit button Create another PHP file, "login-user-form.php" with a form that has the...

  • I need help ASAP on this, this is due at midnight PST. This is the current...

    I need help ASAP on this, this is due at midnight PST. This is the current code I have. How can I allow the user to quit. My counting while loop works fine, but I would like it to not keep outputting username if a file was successfully opened. This is what is required. Prompt You have assumed the role of managing the technology infrastructure at a zoo. You will develop a working program (either an authentication system or a...

  • The first script is validate.sh. This is a simple form validation script that will be used...

    The first script is validate.sh. This is a simple form validation script that will be used to verify the inputs given. Normally, this would be done to validate input from a website or another program before entry into a database or other record storage. In this case, we will keep it simple and only focus on the input validation step. In particular, the script should prompt the user for four values: first name, last name, zip code, and email address....

  • Using C++ emulate a sign in procedure. At this stage we do not have a file...

    Using C++ emulate a sign in procedure. At this stage we do not have a file yet that contains those username and password records. You'll hard code a user name and password, and using selection and some string manipulation or comparison you'll go through the sign in process with your user. Some things to consider are: Let us know where we're signing in. Other interactions return to you a black screen with little other than a cursor. How is your...

  • Written in Java I have an error in the accountFormCheck block can i get help to...

    Written in Java I have an error in the accountFormCheck block can i get help to fix it please. Java code is below. I keep getting an exception error when debugging it as well Collector.java package userCreation; import java.io.IOException; import java.net.URL; import java.util.ResourceBundle; import java.util.regex.Matcher; import java.util.regex.Pattern; import javafx.event.ActionEvent; import javafx.fxml.*; import javafx.scene.*; import javafx.scene.control.*; import javafx.scene.text.Text; import javafx.stage.*; public class Controller implements Initializable{ @FXML private PasswordField Password_text; @FXML private PasswordField Confirm_text; @FXML private TextField FirstName_text; @FXML private TextField LastName_text;...

  • Question 1 ​ A URL is a ____-part addressing scheme a. ​two b. ​four c. ​three...

    Question 1 ​ A URL is a ____-part addressing scheme a. ​two b. ​four c. ​three d. ​one Question 2 ​ A text file that contains HTML tags is called a(n) ____. a. ​server b. ​HTML document c. ​browser d. ​IP address Question 3 ​ A(n) ____ comes into existence as soon as a work is placed into a tangible form. a. ​open-source project b. ​copyright c. ​reproduction notice d. ​lien Question 4 ​ A(n) ____ is a small file...

  • You need not run Python programs on a computer in solving the following problems. Place your...

    You need not run Python programs on a computer in solving the following problems. Place your answers into separate "text" files using the names indicated on each problem. Please create your text files using the same text editor that you use for your .py files. Answer submitted in another file format such as .doc, .pages, .rtf, or.pdf will lose least one point per problem! [1] 3 points Use file math.txt What is the precise output from the following code? bar...

  • How can we assess whether a project is a success or a failure? This case presents...

    How can we assess whether a project is a success or a failure? This case presents two phases of a large business transformation project involving the implementation of an ERP system with the aim of creating an integrated company. The case illustrates some of the challenges associated with integration. It also presents the obstacles facing companies that undertake projects involving large information technology projects. Bombardier and Its Environment Joseph-Armand Bombardier was 15 years old when he built his first snowmobile...

  • The ACME Manufacturing Company has hired you to help automate their production assembly line. Cameras have...

    The ACME Manufacturing Company has hired you to help automate their production assembly line. Cameras have been placed above a conveyer belt to enables parts on the belt to be photographed and analyzed. You are to augment the system that has been put in place by writing C code to detect the number of parts on the belt, and the positions of each object. The process by which you will do this is called Connected Component Labeling (CCL). These positions...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT