getting "browser.getTabIds" is not a function in webdriverio while calling browser.getTabIds() - webdriver-io

getting error "browser.getTabIds" is not a function in webdriverio version-6, while calling browser.getTabIds()

There is no such command, I guess https://webdriver.io/docs/api/webdriver.html#getwindowhandles is what you trying to achieve.

Related

WebdriverIO - .waitForExist is not a function

I am using WebDriverIO - Javascript for automation. Page object model is used.
When I run the script I get below exception
.waitForExist is not a function
try like this details
$(selector).waitForExist({ timeout, reverse, timeoutMsg, interval })

TypeError: userAgent.toLowerCase is not a function

While running Angular-unit test, using chrome browser, ended up with the error as
TypeError: userAgent.toLowerCase is not a function
at _isAndroid (http://localhost:9876/_karma_webpack_/webpack:/node_modules/#angular/forms/fesm2015/forms.mjs:176:43)
at new DefaultValueAccessor (http://localhost:9876/_karma_webpack_/webpack:/node_modules/#angular/forms/fesm2015/forms.mjs:227:38)
at NodeInjectorFactory.factory (http://localhost:9876/_karma_webpack_/webpack:/node_modules/#angular/forms/fesm2015/forms.mjs:254:1)
at getNodeInjectable (http://localhost:9876/_karma_webpack_/webpack:/node_modules/#angular/core/fesm2015/core.mjs:3565:44)
at instantiateAllDirectives (http://localhost:9876/_karma_webpack_/webpack:/node_modules/#angular/core/fesm2015/core.mjs:10318:27)
at createDirectivesInstances (http://localhost:9876/_karma_webpack_/webpack:/node_modules/#angular/core/fesm2015/core.mjs:9647:5)
at ɵɵelementStart (http://localhost:9876/_karma_webpack_/webpack:/node_modules/#angular/core/fesm2015/core.mjs:14561:9)
at templateFn (ng:///TodaysMarketMoversComponent.js:397:66)
at executeTemplate (http://localhost:9876/_karma_webpack_/webpack:/node_modules/#angular/core/fesm2015/core.mjs:9618:9)
at renderView (http://localhost:9876/_karma_webpack_/webpack:/node_modules/#angular/core/fesm2015/core.mjs:9421:13)
Most wondering/confusing part to me- toLowerCase function has never been used through out the component/spec file.
It looks like the userAgent is being checked by the #angular/forms lib and has been deleted or not provided at all for some reason.
If it's not your code that's changing the userAgent then it's probably some third-party script.
If I were you I'd start with the latest additions in terms of libraries and dependencies and peel them back until I get a unit test running. That will give the clue.

Cannot find module 'casper' with 1.1 beta

This command was working:
/usr/local/Cellar/casperjs/1.0.2/libexec/bin/casperjs myfile.coffee
Now I want to use 1.1 like so:
/usr/local/Cellar/casperjs/1.1-beta3/libexec/bin/casperjs myfile.coffee
But now I get this error:
Error: Cannot find module 'casper'
phantomjs://bootstrap.js:289
phantomjs://bootstrap.js:254 in require
People reporting this error are trying to invoke casper by running phantomjs, but as you see I am running casperjs directly. What gives?
UPDATE
In case it provides a clue, when I call require = patchRequire(require) on the first line of my script, I get this error:
TypeError: 'undefined' is not an object (evaluating 'require.patched')
/usr/local/Cellar/casperjs/1.1-beta3/libexec/bin/bootstrap.js:197 in patchRequire

Append database record in HTML5 builder fatal error

I have some code in my application:
$dmMain->tblOrgList->append();
This code written with auto-completion, so everything is correct.
But, when I trying to execute this code, I have error:
Fatal error: Call to a member function append() on a non-object in
C:\Users\ASAP\Documents\HTML5 Builder\Projects\VitoOrgList\index.php
on line 18
Can somebody advice, where I can find a trouble?
Thanks
I found the solution.
Really, I have no big PHP experience :-]
I just added before calling $dmMain methods in function body:
global $dmMain;

Selenium IDE: this.browserbot.getUserWindow().typeList.filter returns error on IE8

I have faced with following trouble during working with Selenium.
I need to verify that some value exists in list and I use the following code:
assertEval
this.browserbot.getUserWindow().typeList.filter(function(v) { return v[0] === 'Type_${r_suffix}'; })[0][0];
Type_${r_suffix}
This works file on Firefox, but on IE 8 returns error: Object doesn't support this property or method.
Could someone have an idea where is a problem?
As the MDN docs say, the filter() method is available only for IE9 and above.
Your're just using a too new technology. Filter it manually using a for loop or insert the code for Array.prototype.filter (from the MDN) to have access to it.