Extension methods for Custom methods (Advanced) -- Part11 (Selenium with C#)

preview_player
Показать описание
In this part we will start our discussion with Extension methods in C#, one of the powerful concept of C# and then we will start to use the same in our custom methods.
Рекомендации по теме
Комментарии
Автор

please dont stop doing your videos they are so good

kaysi
Автор

Extension methods you made it so simple to understand which I could not get since long time.

sahasra
Автор

Great tutorials, very easy to follow. Thank you Karthik!

hasnainrehman
Автор

Just in case people get error as below:
: Could not find element by: By.Name: Initial
To fix it, in 6:37
We also need to replace element.Click(); with element.Submit();

qianzhou
Автор

Thanks a lot for the videos.
After creating POM i cant select the drop down list and also in the video you did not select drop down after creating POM.
how can i select drop down using POM.
Please Karthik reply with the solution.

sparklingsta
Автор

You forgot how to handle Dropdownlist, i cannot apply the same to it

chocobros
Автор

After completing part 11 and running the application I receive the following erorr: "OpenQA.Selenium, NoSuchElementException:could not find elementby:By.Name: Initial" Are you able to resolve this issue?,

Oliver

oliverferguson
Автор

hi, this extension method looks good but it seems like a lot of setup beforehand, and if we have multiple pages with several elements to be tested, setting up POM objects itself is a huge task. do these methods prove useful then?

vadapallichaitu
Автор

Hi Karthik, much appreciate your effort to make things easy for us.
It would be great if i can get this project to understand it better on my own machine.
please let me know if it can be downloaded from somewhere.

SavvyShobhit
Автор

Hi Karthik, do we have any way that we can use a customized method instead of '.sendkeys( )' in selenium with java

rajasekharmaddigalla
Автор

Great videos. I really really enjoyed it and learned a lot.
I just have a question how would you decorate a List of IwebElement in Page Object Model? something in line of :[FindsBy(How = How.Xpath, Using = "MatterId_listbox")]
private MattersList { get; set; }

that does work. So how would you decorate that? Sometimes I might need to retrieve a list of elements, then loop through it.

Thanks

PatTheKing
Автор

Do I need to create PageObject class for each page?

RakeshSharma-wwpr
Автор

I was also experiencing the same issue as others, however from what I have found, the Click() method should work. I traced the issue to the fact that both the Form, and the submit button both have the name attribute set to "Login". Ie, there are multiple elements with name="Login" in the HTML.

Because of this, btnLogin is actually being set to the Form, and not the Login button. So, Submit() still works on a form, but Click() does not.

If the button is selected by another means, such as xpath, ie.


Then btnLogin.Click() works fine.

elimiller
Автор

Thanks for the video. What I am struggling to understand is, why would you create EnterText and Click extension methods when IWebElements already have methods for those functionalities? I don't see the difference between EnterText and SendKeys.
Maybe this is just a simple example, which can be applied for more complex operations?

Thanks!

Adam-hjhc
Автор

how to retrieve radio button values using Extension methods ? please reply.

rifatjahan
Автор

Based on this structure pattern, How can I implement WaitElementToBeVisibile?

rodrigueslds
Автор

For some reason the ".Clicks();" operation doesn't show up for me

ManikMiner
Автор

I am getting the below error in my login page :
System.NullReferenceException : Object reference not set to an instance of an object

not sure where I am lacking. Can anyone pls help me.

MultiMonalisha
Автор

I'm getting this err : Could not find element by: By.Id: TitleId] because I included the on EAPageObject & I used btnLogin.Clicks() the output is it stops just on the login page. To fix this, instead of using Clicks() or Click(), I used Submit() and it all works.

ticeepy
Автор

very useful videos.
any one knows how to select element with <li> <a </li>. I have tried cssselector, link text and tag name. nothing is working. Anyone can help please? thanks

shabnam
join shbcf.ru