A Web element of an Angular JS Web Application in a DOM looks like
<input id="tagName" class="form-control ng-touched " type="text" _ngcontent-c29="" name="tagName" pattern="^(?!\s*$)[^\/]+" required=""/>
When I try to submit the form through selenium WebDriver containing the above element in a web application we are getting the below error-
java.lang.AssertionError: unknown error: a.tagName.toUpperCase is not a function
We are facing the same issue even in Selenium2.53 with Firefox and Selenium3.4 with Chrome combinations.
We tried clicking the elements with JavaScript executor also but did not work.
We have tried feeding the element with the below snippets of code.
WebElement we = driver.findElement(By.id("tagName"));
JavascriptExecutor jse= (JavascriptExecutor) driver; jse.executeScript("arguments[0].value='Hello';", we);
We can see the value is getting entered into the field but the application is not recognizing that the value is entered.It is showing the error as "value is required". When we interpret the automation using breakpoint and enter text manually in the element no error comes.
There is also similar open issue in the below link.https://bugs.chromium.org/p/chromedriver/issues/detail?id=767
Please let us know whether there is any method to get rid of the error without changing the id value of the element in the DOM.
@Thivya
Isnt Protractor meant to be a JavaScript binding ? I believe the OP is trying to work with Java and not JavaScript.
Thanks & Regards
Krishnan Mahadevan
"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/1cc27e78-1262-4e3c-abe4-4b5e8cd97d0d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/1cc27e78-1262-4e3c-abe4-4b5e8cd97d0d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/selenium-users/7rlDgxRQXcU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/8DE721E1-53E6-4FEE-9ED7-0A8EEC3CE2B1%40gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/1cc27e78-1262-4e3c-abe4-4b5e8cd97d0d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/selenium-users/7rlDgxRQXcU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.