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
List<WebElement> someElements = new ArrayList<>(); | |
someElements = new ChromeDriver().findElements(By.xpath("//footer[contains(@id, 'contact')]//li[@class]/a")); | |
for(WebElement indivElement : someElements){ | |
indivElement.click(); | |
//back | |
} |
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
public boolean isDisplayedNoSuchElementExcp(MobileElement mobileElement){ //having this workflow done without throwing this exception will significantly increase speed of program | |
boolean isElementDisplayed; | |
try{ | |
if(mobileElement == null){ | |
isElementDisplayed = false; | |
} else { | |
isElementDisplayed = mobileElement.isDisplayed(); | |
} | |
System.out.println(isElementDisplayed); | |
} catch (NoSuchElementException e){ |
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 coraJava.three; | |
class Solution { | |
public String sortString(String s) { | |
StringBuilder sortedString = new StringBuilder(); | |
StringBuilder originalString = new StringBuilder(s); | |
while(sortedString.length() != s.length()){ | |
StringBuilder[] modifiedStringsLeastTrue = returnModifiedStringUnique(true, originalString); | |
originalString = modifiedStringsLeastTrue[0]; |
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
public void addOrUseExistingCard(String creditCardNumber, String expiryMonth, String expiryYear, String cvv){ | |
validatePageIsOpen(); | |
actionExecutor.scrollToElement(driver, addNewCardButton, exceptionHandling); | |
if(exceptionHandling.combinedStaleAndIsElementDisplayedHandling(driver, existingCardRadioButtonXPath, 1) == null) { | |
addNewCardButton.click(); | |
actionExecutor.scrollToElement(driver, cardNumberField, exceptionHandling); | |
actions | |
.click(cardNumberField) | |
.sendKeys(creditCardNumber) |
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
String state; | |
try{ | |
state = registrationJSON.get("address").getAsJsonObject().get("state").getAsString().split("-")[1]; | |
} catch (NullPointerException e) { | |
extentReportGenerator.addWarningMessage(currentTest, "No state field exists for registering accounts for the country: " + transactionCountryThreeLetter + ", setting state field as blank."); | |
state = ""; | |
} |
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
os ~ $ ps -e|grep node | |
3166 ?? 0:04.58 /opt/homebrew/Cellar/node/15.8.0/bin/node /Users/sagolGoru20/.npm-packages/lib/node_modules/appium/build/lib/main.js --port 28959 --address 0.0.0.0 --session-override | |
4890 ?? 0:00.51 /opt/homebrew/Cellar/node/15.8.0/bin/node /Users/sagolGoru20/.npm-packages/lib/node_modules/appium/build/lib/main.js --port 28709 --address 0.0.0.0 --session-override | |
5323 ttys002 0:00.01 grep node | |
os ~ $ killall node | |
os ~ $ killall node | |
No matching processes belonging to you were found | |
os ~ $ ps -e|grep node | |
5336 ttys002 0:00.00 grep node | |
os ~ $ ps -e|grep node |
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
Last login: Wed Feb 17 14:35:28 on ttys000 | |
os ~ $ appium | |
[Appium] Welcome to Appium v1.20.2 | |
[Appium] Appium REST http interface listener started on 0.0.0.0:4723 | |
[debug] [HTTP] Request idempotency key: 80e4a464-5259-47a0-ab94-87825e4b797c | |
[HTTP] --> POST /wd/hub/session | |
[HTTP] {"desiredCapabilities":{"app":"//Users/sagolGoru20/Programming/JavaProjects/MavenProjects/MobileAutomationProjects/firstAppiumProject/src/main/resources/testApp.app.zip","noReset":true,"showXcodeLog":true,"platformVersion":"14.4","automationName":"XCuiTest","useNewWDA":true,"platformName":"IOS","udid":"4C8E1FF0-BCFB-44BB-86A1-5095D5F6C05A","deviceName":"SE_SecondGenPractice"},"capabilities":{"firstMatch":[{"appium:app":"//Users/sagolGoru20/Programming/JavaProjects/MavenProjects/MobileAutomationProjects/firstAppiumProject/src/main/resources/testApp.app.zip","appium:automationName":"XCuiTest","appium:deviceName":"SE_SecondGenPractice","appium:noReset":true,"platformName":"ios","appium:platformVersion":"14.4","appium:showXcodeLog":true,"app |
This file has been truncated, but you can view the full file.
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
2021-02-17 18:57:49:597 [Appium] Welcome to Appium v1.20.2 | |
2021-02-17 18:57:49:597 [Appium] Non-default server args: | |
2021-02-17 18:57:49:598 [Appium] port: 40243 | |
2021-02-17 18:57:49:598 [Appium] sessionOverride: true | |
2021-02-17 18:57:49:598 [Appium] logFile: /Users/sagolGoru20/Programming/JavaProjects/MavenProjects/MobileAutomationProjects/firstAppiumProject/appiumLog.txt | |
2021-02-17 18:57:49:607 [Appium] Appium REST http interface listener started on 0.0.0.0:40243 | |
2021-02-17 18:57:49:802 [HTTP] --> GET /wd/hub/status | |
2021-02-17 18:57:49:802 [HTTP] {} | |
2021-02-17 18:57:49:803 [GENERIC] Calling AppiumDriver.getStatus() with args: [] | |
2021-02-17 18:57:49:804 [GENERIC] Responding to client with driver.getStatus() result: {"build":{"version":"1.20.2"}} |
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 firstProject; | |
import io.appium.java_client.AppiumDriver; | |
import io.appium.java_client.MobileElement; | |
import io.appium.java_client.ios.IOSDriver; | |
import io.appium.java_client.remote.AutomationName; | |
import io.appium.java_client.remote.MobileCapabilityType; | |
import io.appium.java_client.service.local.AppiumDriverLocalService; | |
import io.appium.java_client.service.local.AppiumServiceBuilder; | |
import io.appium.java_client.service.local.flags.GeneralServerFlag; |
This file has been truncated, but you can view the full file.
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
2021-02-17 03:39:44:612 [Appium] Welcome to Appium v1.20.2 | |
2021-02-17 03:39:44:613 [Appium] Non-default server args: | |
2021-02-17 03:39:44:613 [Appium] port: 39456 | |
2021-02-17 03:39:44:613 [Appium] sessionOverride: true | |
2021-02-17 03:39:44:613 [Appium] logFile: /Users/sagolGoru20/Programming/JavaProjects/MavenProjects/MobileAutomationProjects/firstAppiumProject/appiumLog.txt | |
2021-02-17 03:39:44:623 [Appium] Appium REST http interface listener started on 0.0.0.0:39456 | |
2021-02-17 03:39:44:652 [HTTP] --> GET /wd/hub/status | |
2021-02-17 03:39:44:652 [HTTP] {} | |
2021-02-17 03:39:44:652 [GENERIC] Calling AppiumDriver.getStatus() with args: [] | |
2021-02-17 03:39:44:653 [GENERIC] Responding to client with driver.getStatus() result: {"build":{"version":"1.20.2"}} |