Prescript syntax
See original GitHub issueHey,
I was wondering if the syntax of the prescript in the documentation is still correct. When I follow the guidelines at seleniumhq it looks very different.
I am using the following code:
module.exports = {
run(context) {
return context.runWithDriver((driver) => {
return driver.get('https://********')
.then(() => {
var webdriver = context.webdriver,
By = webdriver.By,
until = webdriver.until;
var driver = new webdriver.Builder()
.forBrowser('chrome')
.build();
var form = driver.findElement(By.name('******'));
driver.findElement(By.id('username')).sendKeys('*****');
driver.findElement(By.id('password')).sendKeys('*****');
form.submit();
driver.wait(until.elementIsVisible(driver.findElement(By.name('**********'))), 5000);
var iklForm = driver.findElement(By.name('*********'));
driver.findElement(By.name('**********')).sendKeys('11269483');
iklForm.submit();
driver.wait(until.elementIsVisible(driver.findElement(By.id('************'))));
driver.findElement(By.linkText('**********')).click();
return true;
})
})
}
}
I am constantly getting:
TypeError: Cannot read property ‘elementIsVisible’ of undefined at driver.get.then (/sitespeed.io/prescript.js:15:30)
But as I can see, webdriver should be defined…
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Linguistic prescription - Wikipedia
Linguistic prescription, or prescriptive grammar, is the establishment of rules defining preferred usage of language. ... These rules may address such linguistic ...
Read more >Writing pre-request scripts - Postman Learning Center
You can use pre-request scripts in Postman to execute JavaScript before a request runs. By including code in the Pre-request Script tab for ......
Read more >Common Prescription Abbreviations and Meanings
Doctors use prescription shorthand to communicate with the pharmacist who will fill your order. But, unless you know Latin well enough to understand...
Read more >`.gitlab-ci.yml` keyword reference - GitLab Docs
Documentation for GitLab Community Edition, GitLab Enterprise Edition, Omnibus GitLab, and GitLab Runner.
Read more >ZBNF-Main Description - vishia
syntax -prescript is a String-sequence, which defines any syntax in ZBNF. A syntax-prescript is the right part of a syntax-definition after the ::=...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Let me spend some time tonight and make the documentation easier to understand and add more examples.
Thank you for the fast and clear response. The script is working now.