Comments (3)
@alan-morey This seems like a reasonable feature request, and the UTAM team will take it under advisement for implementation in a future release. In the meantime, you can use your existing UtamLoader
instance to set the length of the explicit wait timeout at runtime. Something like the following (N.B., code written from memory, and without the benefit of an IDE, so may not work exactly correctly, or even compile if copy-pasted directly into your project):
public class MyTests {
private UtamLoader loader;
@BeforeAll
public void setup() {
// Call your loader setup method, with a valid WebDriver instance.
// Creation of WebDriver instance is omitted for brevity.
loader = setupUtamLoader(driver);
}
@Test
public void myTest() {
// Load the root PO, which we will assume has the waitFor you'd like to configure
MyPageObject pageObjectInstance = loader.load(MyPageObject.class);
// Dynamically set the explicit timeout of the loader config
loader.getConfig().setExplicitTimeout(Duration.ofSeconds(5));
loader.resetContext();
// Call the waitFor method on the appropriate element
pageObjectInstance.getMyElement().waitFor(...);
// Reset the loader config to the larger timeout setting
loader.getConfig().setExplicitTimeout(Duration.ofSeconds(90));
loader.resetContext();
}
}
from utam-java.
@alan-morey Sorry for late response, feature was implemented in version 1.6.0
Docs https://utam.dev/grammar/explicit-waits
from utam-java.
@lizaiv77 Did you mean v1.1.6, I don't see v1.6.0 in github tags or a release under https://mvnrepository.com/artifact/com.salesforce.utam/utam-core
Correct me if I'm wrong but I don't think the feature I was requesting here was actually implemented based on the current dev branch.
While I can see a new signature was added to UtamBase
to support a custom message argument:
It's still missing the signature to support a custom timeout duration, e.g.:
<T> T waitFor(Supplier<T> condition, String errorMessage, Duration timeout);
It's the timeout duration I'm most interested in here not a custom message.
from utam-java.
Related Issues (7)
- [Feat Request] Anything similar for Python HOT 1
- Scroll to any element not just Actionable HOT 3
- [Bug] Invalid Java function signature output HOT 6
- [Bug]Not able to identify the Components using UTAM page Object for salesforce HOT 4
- [Bug] npm install utam fails with errno -4048 Error: EPERM: operation not permitted, mkdir 'C:\' HOT 1
- Documentation or User Guide for UTAM-Java HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from utam-java.