Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» how to connect DB in selenium webriver
Fri Oct 06, 2017 4:09 pm by anbarasi

» How find any text in browser screen and click on it?
Thu Oct 05, 2017 2:02 pm by sandeepkommineni

» Selenium Webdriver
Tue Oct 03, 2017 1:35 pm by PiyushBiswas

» GRID setup tutorial.
Wed Sep 27, 2017 4:29 pm by johnyapp

» Drag & Drop Between Windows Using Selenium Driver
Wed Sep 27, 2017 2:10 pm by 26rondel

» Check if window is closed / verify input
Sat Sep 23, 2017 10:21 pm by brainstir

» How to work on pages with AJAX in selenium?
Mon Sep 18, 2017 6:08 pm by azharuddin

» pause test until user press a key like F2
Wed Aug 09, 2017 11:10 pm by djnforce

» Selecting the input for auto populating element
Sat Jul 29, 2017 7:53 pm by kdabbara

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

C# Anti-Forgery error!?

View previous topic View next topic Go down

C# Anti-Forgery error!?

Post by l3l00 on Mon Feb 23, 2015 10:56 pm

Wrote a test case that goes to a Microsoft Sharepoint site, it goes into the iFrame box.
In the iFrame there is a table and a search functionality. I grab the SSN number of the first entry and paste it into the search box, then I have selenium Click the search button.

After that, I get an anti-forgery error!? I have a method that checks for a YSOD (Yellow Screen of Death):
Assert.AreEqual("Server Error in '/' Application.", driver.FindElement(By.CssSelector("h1")).Text);
Since it is just checking for "Server Error in '/' Application.", this is how anti-forgery starts. So my exported results came back as saying there is a YSOD here, when you manually do the steps you do not get an anti-fogery. Now my boss is pissed and thinks my automation scripts are not valuable at all.

Why on earth am I getting an anti-forgery error!? How do I prevent selenium from getting one?

l3l00
Active particpant
Active particpant

Posts : 11
Join date : 2015-01-06

Back to top Go down

Re: C# Anti-Forgery error!?

Post by AgoBalan on Tue Feb 24, 2015 4:07 pm

Are you sure ,whether error is related to selenium.. else browser or site functionality related error?

R u sure By.CssSelector("h1").. focusing to the right target u focus,try highlighting the element with find button in IDE..

AgoBalan
Amateur
Amateur

Posts : 36
Join date : 2015-02-23

Back to top Go down

Re: C# Anti-Forgery error!?

Post by l3l00 on Wed Feb 25, 2015 4:56 am

The assert I added is when a YSOD or an anti-forgery appeared.

I know I have the right element because I have other test cases that use that input search box in the sharepoint iFrame.
It searches by name, by date, by batch number. Then it does the SSN (this is just a search table nothing more and it is grabbing text out of the table and pasting it in the input).

l3l00
Active particpant
Active particpant

Posts : 11
Join date : 2015-01-06

Back to top Go down

Re: C# Anti-Forgery error!?

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum