Need help with this!
Strategy

Need help with this!


Need help with this!

What do you call the lines that in a "surprise!" or "tadaa!" like situation would be radiating from the object or the person thats's doing the "tadaa" or the "surprise"?

I'm talking about lines like these …but SHORTER.

https://preview.redd.it/v8yfebnbyab51.jpg?width=1300&format=pjpg&auto=webp&s=8590aaf16902a830e37f6ab3d48fc09286322e89

submitted by /u/GermanSmartass
[comments]



Source link

Alt Text
Strategy

Backdrop Filter effect with CSS


Yesterday i came upon a really cool looking effect on a website and tried to reproduce the effect for a new web app i was developing. It had a transparent container create a filter backdrop on the background image behind it and it was really neat.

Here’s the effect:
Alt Text

I tried the usual css property filter: blur(10px) but that only blurred the container itself and not the background behind the element. After some research i found a super simple one line css property to do just that. Since then i’ve been using it in every app or design i created (where appropriate).

here it is:

.container {
    backdrop-filter: blur(10px);
}

I had no idea that CSS property existed!

Now add a background image behind your container and watch the magic. Pretty cool right?

Note: Some browsers may not support the property. But the major ones like chrome, firefox and edge do.

Try it out and let me know what you think. Till next time!



Source link

r/webdev - Is it possible to duplicate the path autocomplete functionality of Brackets and Dreamweaver in Atom or VS Code, where you can type in the middle of an existing URL and it understands what you
Strategy

Is it possible to duplicate the path autocomplete functional…


I’ve been trying to switch from Brackets to either Atom or VS Code for my primary code editor. Unfortunately, in both cases there’s one thing preventing me from making the leap: the autocomplete functionality in Brackets (and Dreamweaver) is far superior to anything I’ve found in other editors.

I’ve tried numerous mods/packages/extensions of course. There are some very good ones that autocomplete URLs as you’re typing new code, but none are very good at editing existing URLs, which is a significant part of what I need to do in my job.

The Brackets and Dreamweaver autocomplete is just too good for me to do without. I type a letter or two, make a couple clicks, and the entire URL has been replaced. I don’t need to delete anything or retype the tag or copy/paste.

Does anyone know how to duplicate this functionality in either Atom (my first choice) or VS Code?

Thanks!

PS: My main reasons for wanting to leave Brackets are that the UI (especially menus) is a mess, and the mod community seems kinda dead – most of the extensions I find haven’t been updated in years.

r/webdev - Is it possible to duplicate the path autocomplete functionality of Brackets and Dreamweaver in Atom or VS Code, where you can type in the middle of an existing URL and it understands what you're doing?



Source link

Alert modal on website
Strategy

How to Handle Alerts and Popups in Protractor With Selenium?


There are times in the life-cycle of various web applications where you need to interrupt a message to the user. These may be warnings, alerts, or information. Browsers have native dialog boxes, one that you can show to alert users to these important messages using JavaScript.

Suppose you fill in an application form and accidentally miss out on a couple of details. How do you know this unless there is a notification alert or a pop-up window? Or If we test a web application using Selenium JavaScript and try logging in to a web site, but do not add an email ID or password to the required fields, the program sends an alert. This is precisely what I will be talking about today. I will be performing Selenium test automation using Protractor to handle alerts and pop-ups. 

What Is Protractor?

Protractor is an open-source JavaScript testing framework, which is widely used for end to end testing of Angular and non angular web applications. It also helps in integrating our test suite to automation tools, such as Selenium WebDriver or BDD frameworks, such as Cucumber, Jasmine etc.

Protractor is based on the Node.js framework. To run the Selenium Protractor framework, you need to have node.js preinstalled. The Protractor package can be successfully downloaded from npm. Make sure you check the version of the Protractor and its compatibility with Node.js by running the command:

node --version

Protractor uses the Jasmine framework for Selenium test automation as a default interface. You will further need a pre-installed Java Development Kit (JDK). This can help you to run the standalone selenium server. This can be verified by running this command line:

java -version

To install Protractor using npm along with web driver –manager use the command:

npm install -g protractor

Why Do You Need to Test Alerts And Popups in Selenium Protractor?

Alerts and pop-up in Selenium Protractor are widely used to issue warnings to the user or asking permission from them. They allow us to take the user’s permission for certain actions on the web page. 

Let’s take a scenario to make things simple. You want to log in to a website, but if you enter the wrong email or password to the required fields, you’ll get an alert stating the wrong email or password. Alerts and popups help in establishing user flow in web application and notify them in case something goes wrong, this is you should be handling alerts and popups in Selenium

There can be several instances that cause an alert to popup in protractors when browsing web pages. However, the most commonly observed classification of alerts is observed during execution of actions such as:

  • To show a message or important alert to the user.

  • To notify the user about an update.

  • To show error and notify the user in case of  incorrect data entry.

  • To show a message on saving of certain information.

Handling Alerts in Selenium Protractor

The purpose of alerts on a webpage is to drive the attention of the user. If an alert is present on a webpage the user may have to input operation in order to address such alerts. 

The formation of Alerts on a web page is done utilizing the JavaScript framework. The characteristics of alerts often block the source page and force the intended user to read the alert before they can access the web page. 

  • The Alerts in the protractor framework are not part of a window therefore they cannot be handled by utilization of JavaScript Executor. 

  • In Alerts one cannot write Xpaths and the same cannot be identified through inspecting tools. 

  • The characteristic of Alerts block the operation webpage and does not allow the performance of any task on the web page unless the alert is handled on a priority basis. 

  • If a user attempts to proceed on the webpage without prior handling of the Alert popup then they may receive “Unhandled Alert Error”. 

Alerts can be classified into the following types:

  • Prompt

  • Alerts

  • Confirmation Dialogue

These alerts are further explained in detail in this Selenium Protractor tutorial below:

Prompt 

The prompt alert is utilized to derive value from the user in a text format. It contains a text bar in which the user can input their values. This alert type is not commonly used in webpage alerts. 

Alert modal on website

Alert

This type of alert() method ideally displays a message box with an “OK” button integrated with the dialogue box. This method is utilized with the intent to inform the target user of any specific operational details or changes therewith. Examples of alerts can be: Successfully Loaded webpage or any other database information alerts. 

The presence of the alert command is solely to inform the user of existing information. The command can be created by utilizing alert(“message”) in JavaScript. The Alert Pop-up can be handled clicking on the “X” or “OK” command.  

Alert popup on web page

Confirmation Dialogue

The confirmation alert is based on the incidence of the dialogue box information being true or false. This alert type is embedded with two commands “OK” or “Cancel”. This is a choice based command box in which the user determines the correctness of the information by clicking on “OK” or “Cancel”. 

Handling Alerts in Selenium Protractor Using Alert Class 

In Alert Class, the user is presented with four methods in handling alerts in Selenium Protractor. The user may dismiss, accept, retrieve details or send key values with intent to handle the alerts on a web page. 

 Alert Class Methods:

  • dismiss()

  • accept()

  • sendKeys()

  • getText()

First, we have to create the object in the Alert Class for handling alerts in Selenium. The same can be executed by entering the command:

Once the object command is executed we need to direct the command to the webpage in which the operation is required to be performed for handling alerts and popups in Selenium. This is because the object command merely contains the memory address.

Next, we will direct the browser object to the Alert class, so that it identifies the browser (Chrome, Firefox) on which it has to create its operation.  

dismiss() Alert Class Methods in Selenium Protractor

The dismiss() alert class method is used to close the alert for handling alerts in Selenium. It operates by clicking on the “X” button in the prompt. This method is functional for all alert types: prompt, alert and confirmation dialogue box.  The protractor web driver uses a void dismiss() command to cancel the alert. 

The following command is executed for handling alert in Selenium Protractor with dismiss() alert class method:  

accept() Alert Class Methods in Selenium Protractor

The accept() alert class method is used to accept an alert and continue with the webpage operation. The accept alert can be utilized for all JavaScript alert types. 

An alert command can be executed by using the ale variable for handling alerts in Selenium: 

The following command is executed for handling alerts and popups in Selenium using accept():  

sendKeys() Alert Class Methods in Selenium Protractor

The sendKeys() command can help the user to set certain values to the prompt. The nature of the sendKeys() command is to input value-based responses. It can handle all the JavaScript-based alerts. 

The following command is executed to launch handle sendKeys() Alert Class Methods in Protractor:

Handling Popups in Selenium Protractor

Popups are windows that pop up on your screen when you perform a certain action on the web application. These can be when you download a file, or when you enter a password protected website, there are several such cases and i’ll share them with you in the next section of this Selenium Protractor tutorial.

While performing Selenium test automation on a web page, a tester may needs to be handling  popups in Selenium of different types, these are:

  • Download popups.

  • Authentication popups.

  • Confirmation popups.

  • Alert popups.

  • Hidden Division popups.

  • Upload popups.

  • Calendar popups. 

Next, I’ll go into handling popups in Selenium, here are some of the popups you should know how to handle:

Hidden Division Popups

Hidden division popup is the newer version of protractor alert that has gained preference with new developers. This alert is an HTML code that stays hidden at the beginning of the loading of a webpage. The execution of the hidden division pop-up is activated by clicking on a pre-set trigger tab. popups such as contact forms; error messages are the most common form of hidden division pop ups. 

A hidden division popup can be identified by the following characteristics: 

  • It is not a form of JavaScript pop-up

  • It can integrate another division of pop-up with the initial alert dialogue. 

  • It can be customized to contain a scroll bar for extended content.

  • Hidden division pop ups are customizable and resizable

  • These pop ups are locked in a single space and cannot be moved by the user. 

  • These pop ups can be inspected

  • These pop ups do not allow the user to operate further until the alert is handled.

  • Non-handling the popup triggers selenium to throws ElementNotClickableError 

The complete command for hidden division pop-ups that are executed for handling popups in Selenium :

Authentication Popups

The key usage of authentication popups is to authenticate the user access. These popups are generally observed in password-protected pages and consist of a username and password dialogue boxes. 

An authentication popup can be identified by the following characteristics:

  • The elements of the authentication pop-up overlay cannot be inspected by the user.

  • This pop-up is displayed on the occurrence of the loading of the web-page. 

  • The page can only be accessed through the input of valid credentials.  

  • The pop-up may or may not be movable as per the browser configuration. 

  • The UI of the pop-up is highly customizable. 

The solution to handle this type of alert in selenium is to enter valid credentials along with the URL. The syntax for password and username in authentication pop-ups are:

The complete command for Authentication popups for handling popups in Selenium is:

On successful login, through entering of valid credentials the webpage can be accessed and the alert can be handled for Selenium test automation.

Upload Popups 

The upload pop-up is an alert type that is triggered when the user needs to upload a certain file to the web-page. This pop-up is customized to initially ask permission for local storage access to browse files that need to be uploaded. The upload command box consists of the “browse/choose” tab. clicking on the tab triggers a system based operation in which the local storage of the user is opened. 

Once the trigger command opens the local storage the user needs to select the file that needs to be uploaded and click on the “ok” confirmation button. This action will successfully upload the target file to the webpage. The user will further need to click on the “upload file” button in order to send the file to the storage database of the webpage. 

To execute this command the sendkeys() method can be efficiently utilized . The detailed code to execute the sendkey() command for handling popups in Selenium for dialogue box is: 

Integrating With Cloud Selenium Grid And Other Tools

We constantly look for ways to help us increase our test coverage and enhance our test case while running our Selenium test automation scripts. To support this, there are several tools to scale our testing efforts. The Protractor is capable of integrating with many other popular tools and platforms such as Github, Jenkins, Selenium Grid etc. It’s best that we utilize this capability of Protractor to scale your testing efforts.

By providing substantial added value, these tools make our Protractor test script more efficient and reliable. Whether a novice or a professional with Protractor, one of the best tools to get started is to deploy the application on Online Selenium Grid like LambdaTest and quickly monitor our testing very easily. Integrating Selenium Grid in our Protractor scripts allows us to improve our test coverage and ensure that we’ve covered our browser matrix.

By utilizing a cloud Selenium Grid, you can run test scripts on several real browsers and their different versions, which helps us to adequately construct the test case and maximize our test coverage. You can further use a Selenium Grid for handling alerts and popups in Selenium over different browsers and OS combinations.

Integrating Protractor with a cloud Selenium Grid is easy, you just have to make changes to specification files as only a config file is required, which will have all the connection information, the hub and the access key needed to connect to the LambdaTest network. Therefore, when combined with the internal capabilities of Protractor, it gives greater flexibility to handle our tests and run parallel tests, which will exponentially improve our test run speed.

Below is our updated script for this Selenium Protractor tutorial on handling alerts and popups with the required changes.

Wrapping It Up!

Now, this takes us to the conclusion of this Selenium Protractor tutorial on handling alerts and popups in Selenium protractor. There are several options for notifying users with critical information about the web application flow and it should be kept in mind while writing scripts for automated browser testing. I explored how browsers have native alert dialogs that can be used to give prompts using JavaScript and also create our own custom alerts and popups. But you need to keep in mind that the ability to show messages to the user is not overused as this may annoy the user and ruin their experience. 



Source link

r/webdev - Simple Website Design Agreement Template (doc & pdf)
Strategy

Simple Website Design Agreement Template (doc & pdf) : webde…


A website contract (aka a website development contract), is a formal agreement between you and your client outlining the terms and conditions of your web services. Such services include things like designing web pages, turning designs into a functional website, offering web hosting, and website maintenance.

r/webdev - Simple Website Design Agreement Template (doc & pdf)

Simple Website Design Agreement (image)

Here is a simple website design agreement template for outlining the terms and conditions of your web services: Simple Website Design Agreement Template (doc & pdf)
The template has been reviewed by legal experts and covers the following key items:



Source link

r/webdev - [Cybersecurity Lesson] Auto-complete scams. What are they? How to detect them?
Strategy

[Cybersecurity Lesson] Auto-complete scams. What are they? H…


r/webdev - [Cybersecurity Lesson] Auto-complete scams. What are they? How to detect them?

TL:DR some hackers will have billing, address HTML forms hidden so that you will provide them without explicit consent. This is a live demo built by u/anttiviljami

To avoid this phishing-risk, you can turn off the autofill settings in your browser.The bug’s been known since forever but I only learned how the auto-fill works. It’s basically a guessing game based on important name tags in HTML.

However, some mischievous hackers would have off-center, or block hidden or set as none; to grab sensitive data. E.g. Phone# containers that are off center using HTML

<p style=”margin-left:-1000px”> <label for cc, phone number etc….> </p>

You can instantiate it as hidden or you can even add one in-line CSS styling that throws it out of the scope of browser. To test, style=”margin-left:-1000px” to any element/ on this page and see what happens.

Now HTML / css can be modified by javascript to hide and show elements or even instantiate them hidden

document.getElementById("okButton")
        .addEventListener("click", function() {
  document.getElementById("name").hidden = true;
  document.getElementById("address").hidden = false;
}, false);

Notice how the address will be hidden on the click of ok Agree?

<div id="cc" class="panel">
  <h1>Welcome to change.bs!</h1>
  <p>By clicking "OK" you agree to sign a petition!</p>
  <button class="button" id="okButton">OK</button>
  <p>  <label for="name">Name</label><br>  <input id="name" name="name" type="text" placeholder="Your Name"></p>
  <p style="display:none;">  <label for="address">Name</label><br>  <input id="address" name="address" type="text"></p>
</div>

In essence, it’s a Tom&Jerry. How well can hackers hide important fields using code obfuscation? You can do it with JQuery, or probably any other framework because the more layer, will mean harder detection, but this is just my speculation.

The official to autocomplete words suggested by HTML. However, each browser is a different implementation since I believe Firefox is NOT susceptible because the autocomplete mechanism is per field, not for everything.

Now question for more experienced users.

r/webdev - [Cybersecurity Lesson] Auto-complete scams. What are they? How to detect them?

I can give a Pastebin of the entire DOM-tree once I remove IID/PID?

I have had a test-proctoring website ask me for CC information in autocomplete when all they displayed were first and last name fields? Is there something more, or is that an honest mistake from sites? Because I couldn’t find anything “incriminating”, but I’m still a noob…



Source link

r/web_design - Website Design Proposal Template (Word and PDF)
Strategy

Website Design Proposal Template (Word and PDF) : web_design


Website design proposals are used to pitch web desing services to prospective clients. It captures details about a webmaster approach, services, and payment terms, and shows clients that you take your work seriously and are thorough in your approach. A website proposal gives you more credibility and ultimately increases your chance of securing a job.
Website Proposal Template – Elements & Template here is a simple three-page website proposal template with its key elements explained.

r/web_design - Website Design Proposal Template (Word and PDF)

Website Proposal Template (image)



Source link