-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using .url() on page object results in "expression is not callable, Type 'String' has no call signatures." typescript error #3903
Comments
I will give this a try |
Hi @AutomatedTester ! I would love to take up this task. Can you please assign it to me? I would love to start my opensource journey here. |
@NithinSravan Sure go ahead. |
Hey, will assign once we have a PR up for this. That way we prevent issues being blocked
…On 11 Oct 2023 at 09:15 +0100, Ravi Sawlani ***@***.***>, wrote:
@NithinSravan Sure go ahead.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
To reproduce this issue, clone https://github.com/garg3133/nightwatch-typescript-boilerplate repository ( |
Working on it @garg3133 |
Sure @Min2who, you can start with investigating this issue and suggest a potential solution. |
Hello @garg3133, I have been working on this issue since yesterday, I tried to reproduce the issue as you mentioned above
I fixed the issue by upgrading the Chromedriver to the latest version using Following your instructions, I added |
clone the |
Hey @garg3133
changing the type of URL in in page-object.d.ts will solve this problem
should i proceed with making a pr for this |
I am now able to reproduce the issue. Thanks @Min2who for providing the fix. |
Could you please assign this issue to me, @garg3133? |
Using .url() on page object results in "expression is not callable, Type 'String' has no call signatures." typescript error nightwatchjs#3903. github- harshit-7373
Description of the bug/issue
When I use myPageObject.url() I expect the string generated/returned by the url function in my page object to be returned, but instead I receive a TypeScript error "expression is not callable, Type 'String' has no call signatures." though it does return the string.
I think the types need to be updated to reflect that .url can be a string or a function type. I think calling .url should work for when the url property in the page object is a string and .url() should return the result of the url parameter when it is defined as a function.
Steps to reproduce
Sample test
Command to run
Verbose Output
Nightwatch Configuration
Nightwatch.js Version
3.1.3
Node Version
18.5
Browser
Chrome 115
Operating System
Windows 11
Additional Information
No response
The text was updated successfully, but these errors were encountered: