In selenium,if element id=“tagName”,then unknown error: a.tagName.toUpperCase is not a function

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

In selenium,if element id=“tagName”,then unknown error: a.tagName.toUpperCase is not a function

SAI VINAY

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.

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/68bf215b-5f95-4e14-b529-898c4a8ae009%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: In selenium,if element id=“tagName”,then unknown error: a.tagName.toUpperCase is not a function

thivyae
Hi,

Is there any reason why you are using Selenium instead of Protractor for angularJS apps?Selenium is not fully compatible to work with Angular elements..

Its little unclear of what you are trying to do..Are you entering a text to the element and then asserting the value of the text?What is the action your trying to do?


On Thursday, June 1, 2017 at 10:06:56 AM UTC+5:30, SAI VINAY wrote:

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.<a href="https://bugs.chromium.org/p/chromedriver/issues/detail?id=767" rel="nofollow" style="font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;color:rgb(0,89,153)" target="_blank" onmousedown="this.href=&#39;https://bugs.chromium.org/p/chromedriver/issues/detail?id\x3d767&#39;;return true;" onclick="this.href=&#39;https://bugs.chromium.org/p/chromedriver/issues/detail?id\x3d767&#39;;return true;">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.

--
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 [hidden email].
To post to this group, send email to [hidden email].
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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: In selenium,if element id=“tagName”,then unknown error: a.tagName.toUpperCase is not a function

⇜Krishnan Mahadevan⇝

@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/

 

From: <[hidden email]> on behalf of <[hidden email]>
Reply-To: <[hidden email]>
Date: Monday, June 5, 2017 at 12:00 PM
To: Selenium Users <[hidden email]>
Subject: [selenium-users] Re: In selenium,if element id=“tagName”,then unknown error: a.tagName.toUpperCase is not a function

 

Hi,

 

Is there any reason why you are using Selenium instead of Protractor for angularJS apps?Selenium is not fully compatible to work with Angular elements..

 

Its little unclear of what you are trying to do..Are you entering a text to the element and then asserting the value of the text?What is the action your trying to do?



On Thursday, June 1, 2017 at 10:06:56 AM UTC+5:30, SAI VINAY wrote:

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.

--
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 [hidden email].
To post to this group, send email to [hidden email].
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 the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/8DE721E1-53E6-4FEE-9ED7-0A8EEC3CE2B1%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: In selenium,if element id=“tagName”,then unknown error: a.tagName.toUpperCase is not a function

thivyae
Protractor is primarily for AngularJS applications..
I'm not able to understand the action being performed.Java/Javascript is fine with me.

Thivyalakshimi Easwarasekaran
Quality Analyst
Email[hidden email]
Telephone<a href="tel:+91+9789805026" style="color:rgb(239,91,161);text-decoration:none" target="_blank">+91 9789805026
ThoughtWorks

On Mon, Jun 5, 2017 at 12:09 PM, Krishnan Mahadevan <[hidden email]> wrote:

@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/

 

From: <[hidden email]> on behalf of <[hidden email]>
Reply-To: <[hidden email]>
Date: Monday, June 5, 2017 at 12:00 PM
To: Selenium Users <[hidden email]>
Subject: [selenium-users] Re: In selenium,if element id=“tagName”,then unknown error: a.tagName.toUpperCase is not a function

 

Hi,

 

Is there any reason why you are using Selenium instead of Protractor for angularJS apps?Selenium is not fully compatible to work with Angular elements..

 

Its little unclear of what you are trying to do..Are you entering a text to the element and then asserting the value of the text?What is the action your trying to do?



On Thursday, June 1, 2017 at 10:06:56 AM UTC+5:30, SAI VINAY wrote:

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.

--
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 [hidden email].
To post to this group, send email to [hidden email].
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/8DE721E1-53E6-4FEE-9ED7-0A8EEC3CE2B1%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CALsJkgX5HOXu6B7YX%2BjqQGX7JdU_s%3DPuRUvw4duhUZUJ%3DCag8Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Loading...