我加入了一个字符串加载来制作一个超级字符串,但如果一个为空,我需要忽略一个参数.目前我无法想到如何做到这一点,除了在单独的if语句中包含所有参数.帮助请:
这里的代码
public void LinkBuilder(string baselink, string sharedkey, string service, string period, string bulletintype,
string includeresults, string includemap, string username, string password)
{
sharedkey = "&" + sharedkey;
service = "&" + service;
period = "&" + period;
bulletintype = "&" + bulletintype;
includeresults = "&" + includeresults;
includemap = "&" + includemap;
username= "&" + username;
password = "&" + password;
string completeLink = sharedkey + service + period + bulletintype + includeresults + includemap + username +
password; …Run Code Online (Sandbox Code Playgroud) 您能否解释一下Byelement和IWebElements 之间的区别。
另外,为什么硒不使用其中之一?
[FindsBy(How = How.XPath, Using = "//div[@class='example']/h3")]
private IWebElement _heading;
Run Code Online (Sandbox Code Playgroud)
和
var byElement = By.XPath("//div[@class='example']/h3")
Run Code Online (Sandbox Code Playgroud)