This file contains hidden or 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.devtools; | |
import org.openqa.selenium.chrome.ChromeDriver; | |
import org.openqa.selenium.devtools.DevTools; | |
import java.util.HashMap; | |
import java.util.Map; | |
public class SetDeviceMode { | |
final static String PROJECT_PATH = System.getProperty("user.dir"); |
This file contains hidden or 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.devtools; | |
import org.openqa.selenium.chrome.ChromeDriver; | |
import org.openqa.selenium.devtools.DevTools; | |
import org.openqa.selenium.devtools.log.Log; | |
public class CaptureConsoleLogs { | |
private static ChromeDriver driver; | |
private static DevTools chromeDevTools; |
This file contains hidden or 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
import org.openqa.selenium.WindowType; | |
import org.openqa.selenium.chrome.ChromeDriver; | |
import java.io.IOException; | |
import java.util.Iterator; | |
import java.util.Set; | |
/* | |
This is an example to demonstarte the usage of newWindow() method in Selenium 4 | |
New window or tabbed windows can be created and used in the single session and switch between them with | |
switchTo().window() method |
This file contains hidden or 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
import os | |
import random | |
import multiprocessing | |
def createChildProcess(sec): | |
q = multiprocessing.Queue() | |
n = os.fork() | |
for i in range(1, sec): | |
if n==0: |
This file contains hidden or 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
Morning | |
- ajwain water - soak it over night and next day boil n drink | |
- 1 fruit | |
- Workout | |
- Tea | |
- Breakfast is oats chilla | |
Afternoon | |
- Lunch - a raita - a chapati - 1 chapati - salad | |
- A snack (fruit) |
This file contains hidden or 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
def FibonacciSeries(n): | |
if n<=0: | |
print("Incorrect input") | |
elif n==1: | |
return 0 | |
elif n==2: | |
return 1 | |
else: | |
return FibonacciSeries(n-1)+FibonacciSeries(n-2) | |
This file contains hidden or 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
java -jar selenium-server-4.0.0-alpha-6.jar event-bus |
This file contains hidden or 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
java -jar selenium-server-4.0.0-alpha-1.jar router --sessions http://localhost:5556 --distributor http://localhost:5553 |
This file contains hidden or 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
java -jar selenium-server-4.0.0-alpha-7.jar distributor --sessions http://localhost:5556 |
This file contains hidden or 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
java -jar selenium-server-4.0.0-alpha-7.jar sessions |
NewerOlder