-
Notifications
You must be signed in to change notification settings - Fork 86
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
getting this error "org.openqa.selenium.JavascriptException: javascript error: angular is not defined" #117
Comments
I have already raised this issue here but no response. Please go through this document for complete information. |
i am getting the same error, after trying in firefox, chrome v102 & chrome v104. |
Make a Github repo with one Java class and a pom.xml that gives me a reproduction and I'll take a look |
Hi Paul, |
Hi Paul, If you need any further information please let me know. It would be helpful if you could help me with this issue, or suggest any work around. Thanks. |
I wrote a simple angular app shown in the link https://angular-tour-of-heroes-1a2a8.web.app/ |
You'll have to make me the JAVA test repo that uses nGWebDriver too. A reproducible thing. Something that uses https://angular-tour-of-heroes-1a2a8.web.app/ and has the least lines of code necessary for me to see what the problem is. |
Hi Paul, |
|
I added the tests in |
This works for me --->
I didn't understand the findElement(..) the way you were trying to do it. I've fixed it - see above. |
I am trying to access a web element in angular app using model, i can acheive the same using id but i was very well looking forward to using binding or model in angular app. Even after acheiving to send keys using id, i am unable to synchronize my automation suite(testing angular) as i see even the below code which i found online is not doing the needed, i.e waiting for the particular angular element to be rendered/loaded before subsequent test steps are executed.
I need to automate testing of my company's website soon. Nevetheless thank you for your help. |
Possibly a shadow-dom thing that I'm unfamiliar with - sorry |
I have used the below code at which i am getting the error. I am running using java, selenium and testng framework.
WebElement stateSelect = driver.findElement(ByAngular.withRootSelector(""app-create-customers"").model("state"))
Please find the error in the below logs.
Issue Logs.txt;
I have chosen the right root selector and also the model.
My Html doc in angular app looks like so.
On inspecting the web element the html code looks something like this, which seems that i have chosen the right root selector.
I have very little knowledge in angular and started automating a website for the first time in selenium.
The text was updated successfully, but these errors were encountered: