Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
7220112
Added error handling in browser shutdown method
IvanRadnevQA Dec 10, 2024
cd15743
Rearrange final and static keywords
IvanRadnevQA Dec 11, 2024
5ab9053
Revert "Added error handling in browser shutdown method"
IvanRadnevQA Dec 11, 2024
239a4a9
update selenium version to latest
i5kov Dec 12, 2024
2c6196b
change usage of URI object
i5kov Dec 12, 2024
9954e94
Fix create instance for no args constructor in InstanceFactory
i5kov Dec 19, 2024
f8fc544
replace --headless=old with --headless=new for executing tests in hea…
i5kov Jan 29, 2025
9ed7926
Add method for mocking response for specific url
i5kov Jan 29, 2025
b11a0e6
Revert "Add method for mocking response for specific url"
i5kov Jan 29, 2025
17abb53
Refactor inline and fix warning
i5kov Jan 29, 2025
89e42ca
Add method for mock specific request by URL
i5kov Jan 29, 2025
fd60b67
Adding new device name with specific screen resolution
borisb83 Feb 20, 2025
aba847b
commit
hhristovQASportal Apr 8, 2025
fa6f06e
add --proxy-bypass-list=* to Chrome and headless options
hhristovQASportal Oct 21, 2025
68582e1
remove 'proxy-bypass-list' argument from browser configuration
hhristovQASportal Oct 22, 2025
c223e2a
add bypass proxy in browser configuration to avoid WebSocket handshak…
hhristovQASportal Oct 23, 2025
818afd6
add bypass proxy in browser configuration to avoid WebSocket handshak…
hhristovQASportal Oct 24, 2025
6cb61e3
visual test maintenance - breakpoints updated, removing default style…
in6411s Nov 12, 2025
5321725
add shadowRoot for CMS tests
hhristovQASportal Mar 4, 2026
8fd89c7
add shadow root method for CMS
hhristovQASportal Mar 4, 2026
87eda23
update cmsShadowHost()
hhristovQASportal Mar 5, 2026
6cee063
update cmsShadowHost()
hhristovQASportal Mar 5, 2026
a043a63
add shadowHosType and use getShadowRoot from bellatrix
hhristovQASportal Mar 6, 2026
614226f
add scrollToShellWindowBottom in bellatrix framework
hhristovQASportal Mar 11, 2026
70843f5
change the location from WebComponent to BrowserService class
hhristovQASportal Mar 11, 2026
a038779
add cms tng to shadow host
hhristovQASportal Apr 17, 2026
f1910a2
Update CMS micro-app locator after Shadow DOM removal
IvanRadnevQA Aug 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bellatrix.core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<version>1.0</version>

<properties>
<selenium.version>4.11.0</selenium.version>
<selenium.version>4.27.0</selenium.version>
<appium.version>8.3.0</appium.version>
<testng.version>7.7.0</testng.version>
<junit.version>5.9.2</junit.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,27 @@

package solutions.bellatrix.core.utilities;

import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.ParameterizedType;
import java.util.Arrays;
import java.util.Optional;

@SuppressWarnings("unchecked")
public final class InstanceFactory {
public static <T> T create(Class<T> classOf) {
T obj = null;
try {
obj = (T)classOf.getConstructors()[0].newInstance();
Optional<Constructor<?>> constructor = Arrays.stream(classOf.getConstructors())
.filter(c -> c.getParameterCount() == 0)
.findFirst();
if (constructor.isPresent()) {
obj = (T)constructor.get().newInstance();
} else {
throw new RuntimeException("No parameterless constructor found for type %s.".formatted(classOf.getName()));
}
} catch (InstantiationException | IllegalAccessException | InvocationTargetException e) {
e.printStackTrace();
throw new RuntimeException("Failed to create an instance of type %s".formatted(classOf.getName()), e);
}
return obj;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
import solutions.bellatrix.web.components.contracts.*;

public class Anchor extends WebComponent implements ComponentHtml, ComponentText, ComponentHref, ComponentTarget, ComponentRel {
public final static EventListener<ComponentActionEventArgs> CLICKING = new EventListener<>();
public final static EventListener<ComponentActionEventArgs> CLICKED = new EventListener<>();
public static final EventListener<ComponentActionEventArgs> CLICKING = new EventListener<>();
public static final EventListener<ComponentActionEventArgs> CLICKED = new EventListener<>();
//commit

public void click() {
defaultClick(CLICKING, CLICKED);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ public enum DeviceName {
MOBILE_S("MOBILE_S", 300, 873, false, 1),
MOBILE_M("MOBILE_M", 320, 873, false, 1),
MOBILE_L("MOBILE_L", 393, 873, false, 1),
TABLET("TABLET", 768, 873, false, 1),
TABLET_SMALL("TABLET_SMALL", 651, 873, false, 1),
TABLET("TABLET", 771, 873, false, 1),
SURFACE_PRO_7_L("Surface Pro 7 L",915,844,false,1),
SURFACE_PRO_7_M("Surface Pro 7 M",445,844,false,1),
IPHONE_13_PRO_MOBILE("iPhone 13 Pro", 375, 667, true, 2, "Mozilla/5.0 (iPhone; CPU iPhone OS 8_0_2 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12A366 Safari/600.1.4"),
IPHONE_12_PRO_MOBILE("iPhone 12 Pro", 390, 844, true, 2, "Mozilla/5.0 (iPhone; CPU iPhone OS 8_0_2 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12A366 Safari/600.1.4"),
IPHONE_SE_MOBILE("iPhone SE", 375, 667, true, 2, "Mozilla/5.0 (iPhone; CPU iPhone OS 8_0_2 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12A366 Safari/600.1.4"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ private static WebDriver initializeDriverRegularMode() {
var chromeOptions = new ChromeOptions();
addDriverOptions(chromeOptions);
addDriverCapabilities(chromeOptions);
chromeOptions.addArguments("--proxy-bypass-list=news-tracker-sockets.api.staging.sportal365.com");

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Project-specific urls cannot be merged into the framework - maybe you should keep them in the fork.

chromeOptions.addArguments("--log-level=3","--remote-allow-origins=*", "--disable-search-engine-choice-screen");
chromeOptions.setAcceptInsecureCerts(true);
chromeOptions.setCapability(CapabilityType.UNHANDLED_PROMPT_BEHAVIOUR, UnexpectedAlertBehaviour.ACCEPT);
Expand All @@ -266,9 +267,10 @@ private static WebDriver initializeDriverRegularMode() {
var chromeHeadlessOptions = new ChromeOptions();
addDriverOptions(chromeHeadlessOptions);
chromeHeadlessOptions.setAcceptInsecureCerts(true);
chromeHeadlessOptions.addArguments("--proxy-bypass-list=news-tracker-sockets.api.staging.sportal365.com");

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

chromeHeadlessOptions.addArguments("--log-level=3","--remote-allow-origins=*", "--disable-search-engine-choice-screen");
chromeHeadlessOptions.setCapability(CapabilityType.UNHANDLED_PROMPT_BEHAVIOUR, UnexpectedAlertBehaviour.ACCEPT);
chromeHeadlessOptions.addArguments("--headless=old");
chromeHeadlessOptions.addArguments("--headless=new");
System.setProperty("webdriver.chrome.silentOutput", "true");
if (shouldCaptureHttpTraffic) chromeHeadlessOptions.setProxy(proxyConfig);

Expand All @@ -278,6 +280,7 @@ private static WebDriver initializeDriverRegularMode() {
var chromeHeadlessOptions = new ChromeOptions();
addDriverOptions(chromeHeadlessOptions);
chromeHeadlessOptions.setAcceptInsecureCerts(true);
chromeHeadlessOptions.addArguments("--proxy-bypass-list=news-tracker-sockets.api.staging.sportal365.com");
chromeHeadlessOptions.addArguments("--log-level=3","--remote-allow-origins=*", "--disable-search-engine-choice-screen");
chromeHeadlessOptions.setCapability(CapabilityType.UNHANDLED_PROMPT_BEHAVIOUR, UnexpectedAlertBehaviour.ACCEPT);

Expand All @@ -300,25 +303,29 @@ private static WebDriver initializeDriverRegularMode() {
var firefoxOptions = new FirefoxOptions();
addDriverOptions(firefoxOptions);
firefoxOptions.setAcceptInsecureCerts(true);
firefoxOptions.addPreference("network.proxy.no_proxies_on", "news-tracker-sockets.api.staging.sportal365.com");
if (shouldCaptureHttpTraffic) firefoxOptions.setProxy(proxyConfig);
driver = new FirefoxDriver(firefoxOptions);
}
case FIREFOX_HEADLESS -> {
var firefoxHeadlessOptions = new FirefoxOptions();
addDriverOptions(firefoxHeadlessOptions);
firefoxHeadlessOptions.setAcceptInsecureCerts(true);
firefoxHeadlessOptions.addPreference("network.proxy.no_proxies_on", "news-tracker-sockets.api.staging.sportal365.com");
firefoxHeadlessOptions.addArguments("--headless");
if (shouldCaptureHttpTraffic) firefoxHeadlessOptions.setProxy(proxyConfig);
driver = new FirefoxDriver(firefoxHeadlessOptions);
}
case EDGE -> {
var edgeOptions = new EdgeOptions();
edgeOptions.addArguments("--proxy-bypass-list=news-tracker-sockets.api.staging.sportal365.com");
addDriverOptions(edgeOptions);
if (shouldCaptureHttpTraffic) edgeOptions.setProxy(proxyConfig);
driver = new EdgeDriver(edgeOptions);
}
case EDGE_HEADLESS -> {
var edgeOptions = new EdgeOptions();
edgeOptions.addArguments("--proxy-bypass-list=news-tracker-sockets.api.staging.sportal365.com");
edgeOptions.addArguments("--headless");
edgeOptions.addArguments("--disable-gpu");
addDriverOptions(edgeOptions);
Expand Down
Loading