Created
October 17, 2016 17:37
-
-
Save suvroc/931b15878a332520feff477f3e4ed8ab to your computer and use it in GitHub Desktop.
Page object generated by Chrome extension
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using OpenQA.Selenium; | |
using OpenQA.Selenium.Support.PageObjects; | |
using OpenQA.Selenium.Support.UI; | |
using System; | |
using System.Collections.Generic; | |
public class GoogleTranslatePageObject | |
{ | |
private Dictionary<string, string> data; | |
private IWebDriver driver; | |
private int timeout = 15; | |
[FindsBy(How = How.Id, Using = "K48")] | |
[CacheLookup] | |
private IWebElement 0; | |
[FindsBy(How = How.Id, Using = "K49")] | |
[CacheLookup] | |
private IWebElement 1; | |
[FindsBy(How = How.Id, Using = "K190")] | |
[CacheLookup] | |
private IWebElement 1; | |
[FindsBy(How = How.Id, Using = "K32")] | |
[CacheLookup] | |
private IWebElement 2; | |
[FindsBy(How = How.Id, Using = "K50")] | |
[CacheLookup] | |
private IWebElement 2; | |
[FindsBy(How = How.Id, Using = "K51")] | |
[CacheLookup] | |
private IWebElement 3; | |
[FindsBy(How = How.Id, Using = "K52")] | |
[CacheLookup] | |
private IWebElement 4; | |
[FindsBy(How = How.Id, Using = "K53")] | |
[CacheLookup] | |
private IWebElement 5; | |
[FindsBy(How = How.Id, Using = "K54")] | |
[CacheLookup] | |
private IWebElement 6; | |
[FindsBy(How = How.Id, Using = "K55")] | |
[CacheLookup] | |
private IWebElement 7; | |
[FindsBy(How = How.Id, Using = "K56")] | |
[CacheLookup] | |
private IWebElement 8; | |
[FindsBy(How = How.Id, Using = "K57")] | |
[CacheLookup] | |
private IWebElement 9; | |
[FindsBy(How = How.Id, Using = "K65")] | |
[CacheLookup] | |
private IWebElement a; | |
[FindsBy(How = How.CssSelector, Using = "a[href='/?tr=t&hl=pl']")] | |
[CacheLookup] | |
private IWebElement anuluj; | |
[FindsBy(How = How.Id, Using = "K66")] | |
[CacheLookup] | |
private IWebElement b; | |
[FindsBy(How = How.Id, Using = "gb30")] | |
[CacheLookup] | |
private IWebElement blogger; | |
[FindsBy(How = How.Id, Using = "K67")] | |
[CacheLookup] | |
private IWebElement c; | |
[FindsBy(How = How.Id, Using = "K273")] | |
[CacheLookup] | |
private IWebElement ctrlAlt1; | |
[FindsBy(How = How.Id, Using = "K273")] | |
[CacheLookup] | |
private IWebElement ctrlAlt2; | |
[FindsBy(How = How.Id, Using = "K68")] | |
[CacheLookup] | |
private IWebElement d; | |
[FindsBy(How = How.CssSelector, Using = "a[href='/community?source=t-user-edit']")] | |
[CacheLookup] | |
private IWebElement dalejPoprawiajJakoTumaczedzikujemy; | |
[FindsBy(How = How.CssSelector, Using = "a[href='/community?source=t-new-user']")] | |
[CacheLookup] | |
private IWebElement doczDoSpoecznociTumaczaGoogle; | |
[FindsBy(How = How.Id, Using = "gb25")] | |
[CacheLookup] | |
private IWebElement dokumenty; | |
[FindsBy(How = How.Id, Using = "gb49")] | |
[CacheLookup] | |
private IWebElement dysk; | |
[FindsBy(How = How.Id, Using = "K69")] | |
[CacheLookup] | |
private IWebElement e; | |
[FindsBy(How = How.Id, Using = "K70")] | |
[CacheLookup] | |
private IWebElement f; | |
[FindsBy(How = How.Id, Using = "K71")] | |
[CacheLookup] | |
private IWebElement g; | |
[FindsBy(How = How.Id, Using = "gb23")] | |
[CacheLookup] | |
private IWebElement gmail; | |
[FindsBy(How = How.Id, Using = "gb119")] | |
[CacheLookup] | |
private IWebElement google; | |
[FindsBy(How = How.Id, Using = "K72")] | |
[CacheLookup] | |
private IWebElement h; | |
[FindsBy(How = How.Id, Using = "gb300")] | |
[CacheLookup] | |
private IWebElement hangouts; | |
[FindsBy(How = How.Id, Using = "K73")] | |
[CacheLookup] | |
private IWebElement i; | |
[FindsBy(How = How.Id, Using = "K74")] | |
[CacheLookup] | |
private IWebElement j; | |
[FindsBy(How = How.CssSelector, Using = "a.gb_la.gb_Ce")] | |
[CacheLookup] | |
private IWebElement jeszczeWicejOdGoogle; | |
[FindsBy(How = How.Id, Using = "K75")] | |
[CacheLookup] | |
private IWebElement k; | |
[FindsBy(How = How.Id, Using = "gb24")] | |
[CacheLookup] | |
private IWebElement kalendarz; | |
[FindsBy(How = How.Id, Using = "gb53")] | |
[CacheLookup] | |
private IWebElement kontakty; | |
[FindsBy(How = How.Id, Using = "gb10")] | |
[CacheLookup] | |
private IWebElement ksiki; | |
[FindsBy(How = How.Id, Using = "K76")] | |
[CacheLookup] | |
private IWebElement l; | |
[FindsBy(How = How.Id, Using = "K77")] | |
[CacheLookup] | |
private IWebElement m; | |
[FindsBy(How = How.Id, Using = "gb8")] | |
[CacheLookup] | |
private IWebElement mapy; | |
[FindsBy(How = How.Id, Using = "gb192")] | |
[CacheLookup] | |
private IWebElement mojeKonto; | |
[FindsBy(How = How.Id, Using = "K78")] | |
[CacheLookup] | |
private IWebElement n; | |
[FindsBy(How = How.CssSelector, Using = "a[href='http://www.google.com/url?rs=rssf&q=http://www.google.com/mobile/translate/']")] | |
[CacheLookup] | |
private IWebElement naKomrk; | |
[FindsBy(How = How.CssSelector, Using = "a[href='http://www.google.com/url?rs=rsmf&q=http://translate.google.com/toolkit%3Fhl%3Dpl']")] | |
[CacheLookup] | |
private IWebElement narzdziaDlaTumaczy; | |
[FindsBy(How = How.CssSelector, Using = "a[href='http://www.google.com/url?rs=rsmf&q=http://translate.google.com/globalmarketfinder/%3Flocale%3Dpl']")] | |
[CacheLookup] | |
private IWebElement narzdzieAnalizyRynkw; | |
[FindsBy(How = How.Id, Using = "K79")] | |
[CacheLookup] | |
private IWebElement o; | |
[FindsBy(How = How.Id, Using = "K80")] | |
[CacheLookup] | |
private IWebElement p; | |
private readonly string pageLoadedText = ""; | |
private readonly string pageUrl = "/"; | |
[FindsBy(How = How.Id, Using = "gb78")] | |
[CacheLookup] | |
private IWebElement play; | |
[FindsBy(How = How.CssSelector, Using = "a[href='http://www.google.com/url?rs=rssf&q=https://www.google.com/support/translate/%3Fhl%3Dpl']")] | |
[CacheLookup] | |
private IWebElement pomoc; | |
[FindsBy(How = How.Id, Using = "gb212")] | |
[CacheLookup] | |
private IWebElement portfel; | |
[FindsBy(How = How.CssSelector, Using = "a[href='http://www.google.com/url?rs=rssf&q=http://www.google.com/intl/pl/policies/']")] | |
[CacheLookup] | |
private IWebElement prywatnoIWarunki; | |
[FindsBy(How = How.Id, Using = "gt-feedback")] | |
[CacheLookup] | |
private IWebElement przelijOpini; | |
[FindsBy(How = How.Id, Using = "gt-submit")] | |
[CacheLookup] | |
private IWebElement przetumacz; | |
[FindsBy(How = How.CssSelector, Using = "a[href='/?tr=f&hl=pl']")] | |
[CacheLookup] | |
private IWebElement przetumaczDokument; | |
[FindsBy(How = How.Id, Using = "source")] | |
[CacheLookup] | |
private IWebElement przetumaczTekstLubStronInternetow1; | |
[FindsBy(How = How.Id, Using = "source-is")] | |
[CacheLookup] | |
private IWebElement przetumaczTekstLubStronInternetow2; | |
[FindsBy(How = How.Id, Using = "file")] | |
[CacheLookup] | |
private IWebElement przetumaczTekstLubStronInternetow3; | |
[FindsBy(How = How.Id, Using = "history_state0")] | |
[CacheLookup] | |
private IWebElement przetumaczTekstLubStronInternetow4; | |
[FindsBy(How = How.Id, Using = "K81")] | |
[CacheLookup] | |
private IWebElement q; | |
[FindsBy(How = How.Id, Using = "K82")] | |
[CacheLookup] | |
private IWebElement r; | |
[FindsBy(How = How.Id, Using = "K83")] | |
[CacheLookup] | |
private IWebElement s; | |
[FindsBy(How = How.CssSelector, Using = "a[href='http://www.google.com/url?rs=rssf&q=//translate.google.com/community']")] | |
[CacheLookup] | |
private IWebElement spoeczno; | |
[FindsBy(How = How.Id, Using = "K84")] | |
[CacheLookup] | |
private IWebElement t; | |
[FindsBy(How = How.Id, Using = "gb51")] | |
[CacheLookup] | |
private IWebElement tumacz1; | |
[FindsBy(How = How.Id, Using = "gt-appname")] | |
[CacheLookup] | |
private IWebElement tumacz2; | |
[FindsBy(How = How.CssSelector, Using = "a[href='http://www.google.com/url?rs=rssf&q=http://translate.google.com/about/intl/pl_ALL/']")] | |
[CacheLookup] | |
private IWebElement tumaczGoogleInformacje; | |
[FindsBy(How = How.CssSelector, Using = "a[href='http://www.google.com/url?rs=rsmf&q=http://translate.google.com/manager/website/%3Fhl%3Dpl']")] | |
[CacheLookup] | |
private IWebElement tumaczStron; | |
[FindsBy(How = How.Id, Using = "K85")] | |
[CacheLookup] | |
private IWebElement u; | |
[FindsBy(How = How.Id, Using = "K86")] | |
[CacheLookup] | |
private IWebElement v; | |
[FindsBy(How = How.Id, Using = "K87")] | |
[CacheLookup] | |
private IWebElement w; | |
[FindsBy(How = How.Id, Using = "gb5")] | |
[CacheLookup] | |
private IWebElement wiadomoci; | |
[FindsBy(How = How.CssSelector, Using = "a.gb_ka.gb_Ie")] | |
[CacheLookup] | |
private IWebElement wicej; | |
[FindsBy(How = How.CssSelector, Using = "a[href='http://www.google.com/url?rs=rssf&q=//www.google.com/about']")] | |
[CacheLookup] | |
private IWebElement wszystkoOGoogle; | |
[FindsBy(How = How.Id, Using = "gt-otf-switch")] | |
[CacheLookup] | |
private IWebElement wyczSzybkieTumaczenie; | |
[FindsBy(How = How.CssSelector, Using = "a.vt-link-text")] | |
[CacheLookup] | |
private IWebElement wyprbuj; | |
[FindsBy(How = How.Id, Using = "gb1")] | |
[CacheLookup] | |
private IWebElement wyszukiwarka; | |
[FindsBy(How = How.Id, Using = "K88")] | |
[CacheLookup] | |
private IWebElement x; | |
[FindsBy(How = How.Id, Using = "K89")] | |
[CacheLookup] | |
private IWebElement y; | |
[FindsBy(How = How.Id, Using = "gb36")] | |
[CacheLookup] | |
private IWebElement youtube; | |
[FindsBy(How = How.Id, Using = "K90")] | |
[CacheLookup] | |
private IWebElement z; | |
[FindsBy(How = How.Id, Using = "gb_70")] | |
[CacheLookup] | |
private IWebElement zalogujSi; | |
[FindsBy(How = How.Id, Using = "gt-bbar-dm")] | |
[CacheLookup] | |
private IWebElement zamknij; | |
[FindsBy(How = How.Id, Using = "contribute-target")] | |
[CacheLookup] | |
private IWebElement zaproponujZmianwywietlOryginalneTumaczenie; | |
[FindsBy(How = How.Id, Using = "gb31")] | |
[CacheLookup] | |
private IWebElement zdjcia; | |
public GoogleTranslatePageObject() | |
: this(default(IWebDriver), new Dictionary<string, string>(), 15) | |
{ | |
} | |
public GoogleTranslatePageObject(IWebDriver driver) | |
: this(driver, new Dictionary<string, string>(), 15) | |
{ | |
} | |
public GoogleTranslatePageObject(IWebDriver driver, Dictionary<string, string> data) | |
: this(driver, data, 15) | |
{ | |
} | |
public GoogleTranslatePageObject(IWebDriver driver, Dictionary<string, string> data, int timeout) | |
{ | |
this.driver = driver; | |
this.data = data; | |
this.timeout = timeout; | |
} | |
/// <summary> | |
/// Click on . Button. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject Click1Button() | |
{ | |
1.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on . Button. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject Click2Button() | |
{ | |
2.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on A Button. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickAButton() | |
{ | |
a.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on Anuluj Link. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickAnulujLink() | |
{ | |
anuluj.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on B Button. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickBButton() | |
{ | |
b.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on Blogger Link. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickBloggerLink() | |
{ | |
blogger.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on 0 Button. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickButton0() | |
{ | |
0.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on 1 Button. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickButton1() | |
{ | |
1.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on 2 Button. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickButton2() | |
{ | |
2.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on 3 Button. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickButton3() | |
{ | |
3.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on 4 Button. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickButton4() | |
{ | |
4.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on 5 Button. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickButton5() | |
{ | |
5.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on 6 Button. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickButton6() | |
{ | |
6.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on 7 Button. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickButton7() | |
{ | |
7.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on 8 Button. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickButton8() | |
{ | |
8.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on 9 Button. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickButton9() | |
{ | |
9.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on C Button. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickCButton() | |
{ | |
c.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on Ctrl Alt Button. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickCtrlAlt1Button() | |
{ | |
ctrlAlt1.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on Ctrl Alt Button. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickCtrlAlt2Button() | |
{ | |
ctrlAlt2.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on D Button. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickDButton() | |
{ | |
d.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on Dalej Poprawiaj Jako Tumaczedzikujemy Link. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickDalejPoprawiajJakoTumaczedzikujemyLink() | |
{ | |
dalejPoprawiajJakoTumaczedzikujemy.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on Docz Do Spoecznoci Tumacza Google Link. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickDoczDoSpoecznociTumaczaGoogleLink() | |
{ | |
doczDoSpoecznociTumaczaGoogle.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on Dokumenty Link. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickDokumentyLink() | |
{ | |
dokumenty.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on Dysk Link. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickDyskLink() | |
{ | |
dysk.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on E Button. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickEButton() | |
{ | |
e.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on F Button. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickFButton() | |
{ | |
f.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on G Button. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickGButton() | |
{ | |
g.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on Gmail Link. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickGmailLink() | |
{ | |
gmail.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on Google Link. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickGoogleLink() | |
{ | |
google.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on H Button. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickHButton() | |
{ | |
h.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on Hangouts Link. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickHangoutsLink() | |
{ | |
hangouts.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on I Button. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickIButton() | |
{ | |
i.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on J Button. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickJButton() | |
{ | |
j.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on Jeszcze Wicej Od Google Link. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickJeszczeWicejOdGoogleLink() | |
{ | |
jeszczeWicejOdGoogle.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on K Button. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickKButton() | |
{ | |
k.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on Kalendarz Link. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickKalendarzLink() | |
{ | |
kalendarz.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on Kontakty Link. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickKontaktyLink() | |
{ | |
kontakty.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on Ksiki Link. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickKsikiLink() | |
{ | |
ksiki.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on L Button. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickLButton() | |
{ | |
l.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on M Button. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickMButton() | |
{ | |
m.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on Mapy Link. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickMapyLink() | |
{ | |
mapy.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on Moje Konto Link. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickMojeKontoLink() | |
{ | |
mojeKonto.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on N Button. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickNButton() | |
{ | |
n.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on Na Komrk Link. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickNaKomrkLink() | |
{ | |
naKomrk.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on Narzdzia Dla Tumaczy Link. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickNarzdziaDlaTumaczyLink() | |
{ | |
narzdziaDlaTumaczy.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on Narzdzie Analizy Rynkw Link. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickNarzdzieAnalizyRynkwLink() | |
{ | |
narzdzieAnalizyRynkw.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on O Button. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickOButton() | |
{ | |
o.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on P Button. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickPButton() | |
{ | |
p.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on Play Link. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickPlayLink() | |
{ | |
play.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on Pomoc Link. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickPomocLink() | |
{ | |
pomoc.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on Portfel Link. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickPortfelLink() | |
{ | |
portfel.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on Prywatno I Warunki Link. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickPrywatnoIWarunkiLink() | |
{ | |
prywatnoIWarunki.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on Przelij Opini Link. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickPrzelijOpiniLink() | |
{ | |
przelijOpini.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on Przetumacz Button. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickPrzetumaczButton() | |
{ | |
przetumacz.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on Przetumacz Dokument. Link. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickPrzetumaczDokumentLink() | |
{ | |
przetumaczDokument.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on Q Button. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickQButton() | |
{ | |
q.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on R Button. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickRButton() | |
{ | |
r.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on S Button. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickSButton() | |
{ | |
s.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on Spoeczno Link. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickSpoecznoLink() | |
{ | |
spoeczno.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on T Button. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickTButton() | |
{ | |
t.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on Tumacz Link. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickTumacz1Link() | |
{ | |
tumacz1.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on Tumacz Link. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickTumacz2Link() | |
{ | |
tumacz2.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on Tumacz Google Informacje Link. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickTumaczGoogleInformacjeLink() | |
{ | |
tumaczGoogleInformacje.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on Tumacz Stron Link. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickTumaczStronLink() | |
{ | |
tumaczStron.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on U Button. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickUButton() | |
{ | |
u.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on V Button. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickVButton() | |
{ | |
v.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on W Button. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickWButton() | |
{ | |
w.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on Wiadomoci Link. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickWiadomociLink() | |
{ | |
wiadomoci.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on Wicej Link. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickWicejLink() | |
{ | |
wicej.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on Wszystko O Google Link. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickWszystkoOGoogleLink() | |
{ | |
wszystkoOGoogle.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on Wycz Szybkie Tumaczenie Link. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickWyczSzybkieTumaczenieLink() | |
{ | |
wyczSzybkieTumaczenie.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on Wyprbuj Link. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickWyprbujLink() | |
{ | |
wyprbuj.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on Wyszukiwarka Link. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickWyszukiwarkaLink() | |
{ | |
wyszukiwarka.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on X Button. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickXButton() | |
{ | |
x.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on Y Button. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickYButton() | |
{ | |
y.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on Youtube Link. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickYoutubeLink() | |
{ | |
youtube.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on Z Button. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickZButton() | |
{ | |
z.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on Zaloguj Si Link. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickZalogujSiLink() | |
{ | |
zalogujSi.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on Zamknij Link. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickZamknijLink() | |
{ | |
zamknij.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Click on Zdjcia Link. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject ClickZdjciaLink() | |
{ | |
zdjcia.Click(); | |
return this; | |
} | |
/// <summary> | |
/// Fill every fields in the page. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject Fill() | |
{ | |
SetPrzetumaczTekstLubStronInternetow1TextareaField(); | |
SetPrzetumaczTekstLubStronInternetow2TextareaField(); | |
SetZaproponujZmianwywietlOryginalneTumaczenieTextareaField(); | |
SetPrzetumaczTekstLubStronInternetow4TextField(); | |
return this; | |
} | |
/// <summary> | |
/// Fill every fields in the page and submit it to target page. | |
/// </summary> | |
/// <returns>The TranslatedWordPageObject class instance.</returns> | |
public TranslatedWordPageObject FillAndSubmit() | |
{ | |
Fill(); | |
return Submit(); | |
} | |
/// <summary> | |
/// Set default value to Przetumacz Tekst Lub Stron Internetow Textarea field. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject SetPrzetumaczTekstLubStronInternetow1TextareaField() | |
{ | |
return SetPrzetumaczTekstLubStronInternetow1TextareaField(data["PRZETUMACZ_TEKST_LUB_STRON_INTERNETOW_1"]); | |
} | |
/// <summary> | |
/// Set value to Przetumacz Tekst Lub Stron Internetow Textarea field. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject SetPrzetumaczTekstLubStronInternetow1TextareaField(string przetumaczTekstLubStronInternetow1Value) | |
{ | |
przetumaczTekstLubStronInternetow1.SendKeys(przetumaczTekstLubStronInternetow1Value); | |
return this; | |
} | |
/// <summary> | |
/// Set default value to Przetumacz Tekst Lub Stron Internetow Textarea field. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject SetPrzetumaczTekstLubStronInternetow2TextareaField() | |
{ | |
return SetPrzetumaczTekstLubStronInternetow2TextareaField(data["PRZETUMACZ_TEKST_LUB_STRON_INTERNETOW_2"]); | |
} | |
/// <summary> | |
/// Set value to Przetumacz Tekst Lub Stron Internetow Textarea field. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject SetPrzetumaczTekstLubStronInternetow2TextareaField(string przetumaczTekstLubStronInternetow2Value) | |
{ | |
przetumaczTekstLubStronInternetow2.SendKeys(przetumaczTekstLubStronInternetow2Value); | |
return this; | |
} | |
/// <summary> | |
/// Set Przetumacz Tekst Lub Stron Internetow File field. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject SetPrzetumaczTekstLubStronInternetow3FileField() | |
{ | |
return this; | |
} | |
/// <summary> | |
/// Set default value to Przetumacz Tekst Lub Stron Internetow Text field. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject SetPrzetumaczTekstLubStronInternetow4TextField() | |
{ | |
return SetPrzetumaczTekstLubStronInternetow4TextField(data["PRZETUMACZ_TEKST_LUB_STRON_INTERNETOW_4"]); | |
} | |
/// <summary> | |
/// Set value to Przetumacz Tekst Lub Stron Internetow Text field. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject SetPrzetumaczTekstLubStronInternetow4TextField(string przetumaczTekstLubStronInternetow4Value) | |
{ | |
przetumaczTekstLubStronInternetow4.SendKeys(przetumaczTekstLubStronInternetow4Value); | |
return this; | |
} | |
/// <summary> | |
/// Set default value to Zaproponuj Zmianwywietl Oryginalne Tumaczenie Textarea field. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject SetZaproponujZmianwywietlOryginalneTumaczenieTextareaField() | |
{ | |
return SetZaproponujZmianwywietlOryginalneTumaczenieTextareaField(data["ZAPROPONUJ_ZMIANWYWIETL_ORYGINALNE_TUMACZENIE"]); | |
} | |
/// <summary> | |
/// Set value to Zaproponuj Zmianwywietl Oryginalne Tumaczenie Textarea field. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject SetZaproponujZmianwywietlOryginalneTumaczenieTextareaField(string zaproponujZmianwywietlOryginalneTumaczenieValue) | |
{ | |
zaproponujZmianwywietlOryginalneTumaczenie.SendKeys(zaproponujZmianwywietlOryginalneTumaczenieValue); | |
return this; | |
} | |
/// <summary> | |
/// Submit the form to target page. | |
/// </summary> | |
/// <returns>The TranslatedWordPageObject class instance.</returns> | |
public TranslatedWordPageObject Submit() | |
{ | |
ClickPrzetumaczButton(); | |
TranslatedWordPageObject target = new TranslatedWordPageObject(driver, data, timeout); | |
PageFactory.InitElements(driver, target); | |
return target; | |
} | |
/// <summary> | |
/// Verify that the page loaded completely. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject VerifyPageLoaded() | |
{ | |
new WebDriverWait(driver, TimeSpan.FromSeconds(timeout)).Until<bool>((d) => | |
{ | |
return d.PageSource.Contains(pageLoadedText); | |
}); | |
return this; | |
} | |
/// <summary> | |
/// Verify that current page URL matches the expected URL. | |
/// </summary> | |
/// <returns>The GoogleTranslatePageObject class instance.</returns> | |
public GoogleTranslatePageObject VerifyPageUrl() | |
{ | |
new WebDriverWait(driver, TimeSpan.FromSeconds(timeout)).Until<bool>((d) => | |
{ | |
return d.Url.Contains(pageUrl); | |
}); | |
return this; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment