setStepTimeout()
at the bottom of https://smashtest.io/language/code-referenceDo initializations {
setStepTimeout(100);
}
Open Chrome // this step and anything after it will timeout after 100 secs
Hi,
I'm trying to run a test where I need to hit a site that's got a self-signed or untrusted cert.
I'm trying the following:
Open Chrome
Set custom capabilities {
g('browser capabilities', {
// This is the Capabilities object. Capabilities go here.
// See withCapabilities()
'acceptInsecureCerts': true
});
}
Navigate to 'https://self-signed.badssl.com/'
Verify '#content > h1:nth-child(1)' is visible
Navigate to 'https://google.com'
Type 'hello world[enter]' into 'textbox'
But that's not really working. The google.com branch passes but the bad self-signed branch fails.
Are you able to help? Am I setting the capabilities correct?
@MrGlox
Hi ! How can I test a file download in smashtest ? The interaction is just a click but is there a way to listen to a download process ?
Seeing that smashtest is a wrapper of selenium testing file downloads is not a recommended practice.
Here is the link for what they have to say about this.
https://www.selenium.dev/documentation/en/worst_practices/file_downloads/
Good luck.
I'm newbie learn smashtest. I want take screenshot, but show error ``
Error: The function
Take screenshot` cannot be found.
Trace:
Open Chrome helloworld.smash:2 --> browser.smash:19
Use browser browser.smash:22 --> browser.smash:58
Navigate to 'http://10.124.57.80:8080/' helloworld.smash:4 --> browser.smash:121
Take screenshot helloworld.smash:7
```
Set user to type Admin
Set user to type Read-Only
Verify user can login
Verify user can open an article
// a bunch of other checks
In the case above, can I limit parallelism so that Set user to type Admin
and Set user to type Read-Only
are never run in parallel?
I know I can do:
Start tests !
Set user to type Admin
Set user to type Read-Only
Verify user can login
Verify user can open an article
// a bunch of other checks
But that would remove all parallelism. I would like to still take advantage of some parallelism by first setting the user to Admin and running all the Verify steps in parallel AND THEN setting the user to Read-Only and running all the Verify steps in parallel again.
@Regenbogenkii I think you would want to define a prop that has an element finder that describes the element with the active class you can then verify this prop after you have made the element active
* On todomvc page {
props({
'updateButton': `.update`,
'updateButtonActive': `.update.active`
});
}
* When Update button is clicked
Click 'updateButton'
* Then Update button is active
Verify 'updateButtonActive'
You can then use the above functions something like:
Given I am at todomvc
When Update button is clicked
Then Update button is active
Open Chrome
Set custom capabilities {
g('browser capabilities', {
"browserName": "chrome",
"platformName": "linux",
"screenResolution": "1920x1080",
"resolution": "1920x1080",
"se:options": {
"timeZone": "US/Pacific",
"screenResolution": "1920x1080"
}
});
}
Should I be able to use Smashtest against an internally-hosted Moon server? The instructions my company gives for standard javascript connection are as follows:
var webdriverio = require('webdriverio');
var options = {
host: 'https://moon.myCompany.com/wd/hub',
desiredCapabilities: {
browserName: 'chrome',
version: '86.0',
enableVNC: false,
enableVideo: false
}
};
var client = webdriverio.remote(options);
And I was launching Smashtest with cls; smashtest --test-server=https://moon.myCompany.com/wd/hub
against this test:
Set custom capabilities {
g('browser capabilities', {
'browserName': 'Firefox',
'version': '87',
'enableVNC': false,
'enableVideo': false
});
}
Open Firefox
Navigate to 'google.com'
Type 'hello world[enter]' into 'textbox'
Type 'hello universe[enter]' into 'textbox'
But I receive UNABLE_TO_VERIFY_LEAF_SIGNATURE unable to verify the first certificate
for each Navigate step.