Skip to content

Instantly share code, notes, and snippets.

View sandeepthukral's full-sized avatar

Sandeep Thukral sandeepthukral

View GitHub Profile
@sandeepthukral
sandeepthukral / cypress-tips-and-tricks.txt
Created September 28, 2020 14:23
Tips and Tricks for Cypress.io
Checking if a checkbox is checked
cy.get('input').then( $input => {
if ( $input.is(':checked') ) {
}
});
@sandeepthukral
sandeepthukral / README.md
Created January 31, 2021 20:18
Extract Udemy course details

How to use

  • Open any udemy course page
  • Expacd all sections manually. To make life easy, start from the lowermost one. This will take maybe 30 seconds. Now that I think of it, this can also be automated
  • Paste the scrit in the console and execute. You will get the course section heads and details.
@sandeepthukral
sandeepthukral / add-data-test-to-angular.md
Created January 25, 2022 09:11
Adding test attributes to angular HTML code

For adding data-test atributes to regular HTML tags

If the data is hard coded <th data-test="foo">

If the value has code <th [attr.data-test]="'foo-' + data.bar" Here data is an object available to the code (as props) from which you extract the value of the key bar and add it to the static text foo-