This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private IWebDriver GetRemoteDriver() | |
{ | |
//1. Getting the path to my extension | |
var outPutDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); | |
ChromeOptions options = new ChromeOptions(); | |
options.AddExtension(outPutDirectory + @"\3.1.3_0.crx"); | |
//2. Adding the appropriate capabilities | |
//---- >>>> Don't do this - Setting the browser name is redundant | |
//options.AddAdditionalCapability(CapabilityType.BrowserName, "chrome", true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Problem: Test order dependency | |
@FixMethodOrder(MethodSorters.NAME_ASCENDING) // This ensures the test methods are executed in lexicographical order by their names | |
public class TestOrderDependency { | |
private static WebDriver driver; | |
@BeforeClass | |
public static void setUpClass() throws Exception { | |
DesiredCapabilities caps = new DesiredCapabilities(); | |
caps.setCapability("browserName", "chrome"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM gitpod/workspace-full-vnc:latest | |
USER gitpod | |
RUN bash -c ". /home/gitpod/.sdkman/bin/sdkman-init.sh && \ | |
sdk install java 17.0.3-ms && \ | |
sdk default java 17.0.3-ms" | |
# Install dependencies. | |
RUN sudo apt-get update \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.saucelabs.saucebindings.junit4.examples; | |
public class ConditionTester { | |
private boolean actionDone; | |
public boolean option1(boolean conditionA, boolean conditionB) { | |
if (!conditionA) { | |
actionDone = true; // Represents "Another action" | |
return actionDone; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Clafication on default parameters | |
public static void Sum(int aNumber, double dNum = 5.5) | |
{ | |
number += aNumber; | |
dNumber += dNum; | |
} | |
//CLARIFICATION |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trigger: | |
- main | |
pool: | |
vmImage: ubuntu-latest | |
steps: | |
- task: NodeTool@0 | |
inputs: | |
versionSpec: '14.x' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface UserData { | |
username: string; | |
password: string; | |
} | |
interface AddressData { | |
street: string; | |
city: string; | |
zipCode: string; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//usage | |
const actualQuantity = | |
await locationInventoryPage.getQuantityColumnValueUsing(adjustment.receiptData.lotNumber); | |
const actualQuantity = | |
await locationInventoryPage.getInventoryQuantityUsing(adjustment.receiptData.lotNumber); | |
async getQuantityColumnValue(item: string): Promise<string> { | |
return this.getInventoryQuantityCellFromRowUsingOtherLabelSelector(item).innerText(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Go here "https://the-internet.herokuapp.com/dropdown" | |
* Select option 1 from the dropdown | |
* Assert that option 1 is selected | |
* Assert taht option 2 is NOT selected | |
* */ | |
/* | |
* Go to "https://the-internet.herokuapp.com/hovers" | |
* Hover over the first image |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Solution to 1 | |
import org.junit.Test; | |
import static org.junit.Assert.assertEquals; | |
public class AdditionTest { | |
@Test | |
public void testSum() { | |
int sum = 3 + 4; | |
int expectedSum = 7; |
NewerOlder