Change footer text color. Background Change? - text

I am having trouble changing the text color of my footer. I have it arranged like I want, but it's not changing color like I want it to. I've tried many ways to change it, and finally just decided to ask someone. Also if someone could tell me how to add a background similar to the page of my website. I would be much appreciative. But I mainly need to change the text color. Here is a link to the current theme of the website I am changing.
http://www.bbcardmore.com/
The new theme has a gray background which makes the text of the footer barely read-able. So please help me. :)
Edit: I have since fixed the issue with my text by doing something simple. I now have my text looking as I want. But if anyone could help me with creating a background for my footer. I'd be grateful.
Scroll down to see the updated HTML.
CSS
/* =Footer
-------------------------------------------------------------- */
.left{
text-align:left;float:left;margin-left:17px;
color:#191e26;
}
.right{
float:right;text-align:right;
color:#191e26;
}
.centered{
float:left;margin-left:160px;text-align:center;
color:#191e26;
}
Old HTML
<html>
<body>
<head>
</style>
<head>
<div id="footer">
<div class="left">
<h3><p style="padding-top: 10pt; " class="paragraph_style"><font size="5" color="red">About Us</font><br /></p></h3>
<p class="paragraph_style_1"><a title="BBC History" href="http://www.bbcardmore.com/bbc-history-3/">BBC History</a> <br /></p>
<p class="paragraph_style_1"><a title="BBC Statement Of Faith" href="http://www.bbcardmore.com/statement-of- faith/">BBC Statement Of Faith</a><br /></p>
<p class="paragraph_style_1"><a title="BBC Ministries" href="http://www.bbcardmore.com/bbc-ministries/">BBC Ministries</a><br /></p>
<p class="paragraph_style_1"><a title="BBC Pastor" href="http://www.bbcardmore.com/our-pastor/">BBC Pastor</a><br /> </p>
<p style="padding-bottom: 0pt; " class="paragraph_style_1"><a title="BBC Map" href="http://www.bbcardmore.com/map/">BBC Map</a></p>
</div>
<div class="centered">
<h3><p style="padding-top: 10pt; " class="paragraph_style"><a title="Service Times" href="http://www.bbcardmore.com/service-times/"><font size="5" color="red">Service Times</font><br /></p></h3>
<p class="paragraph_style_1"><a title="Service Times" href="http://www.bbcardmore.com/service-times/"> Sunday School~ 10:00 AM</a><br /></p>
<p class="paragraph_style_1"><a title="Service Times" href="http://www.bbcardmore.com/service-times/"> Sunday Morning Service~ 11:00 AM</a><br /></p>
<p class="paragraph_style_1"><a title="Service Times" href="http://www.bbcardmore.com/service-times/"> Sunday Evening Service~ 7:00 PM</a><br /></p>
<p class="paragraph_style_1"><a title="Service Times" href="http://www.bbcardmore.com/service-times/"> Wednesday Evening Bible Study~ 7:00 PM</a><br /></p>
<p class="paragraph_style_1"><a title="Service Times" href="http://www.bbcardmore.com/service-times/"> Transportation and child-care available for all services.</a><br /></p>
</div>
<div class="right">
<h3><p style="padding-top: 10pt; " class="paragraph_style"><a title="Contact Us" href="http://www.bbcardmore.com/contact-us/"><font size="5" color="red">Contact Us:</font><br /></p></h3>
<p class="paragraph_style_2"><a title="Map" href="http://www.bbcardmore.com/map/"><font size="3" color="red">Physical Address:</font><br /></p>
<p class="paragraph_style_1"><a title="Map" href="http://www.bbcardmore.com/map/">1515 Easley Drive<br /></p>
<p class="paragraph_style_1"><a title="Map" href="http://www.bbcardmore.com/map/">Ardmore, OK 73401<br /></p>
<p class="paragraph_style_3"><span class="style"><a title="" href="mailto:bbcardmore#aol.com"><font size="3" color="red">Email:</font></span> bbcardmore#aol.com<br /></p>
<p class="paragraph_style_3"><span class="style"><a title="Contact Us" href="http://www.bbcardmore.com/contact-us/"><font size="3" color="red">Phone:</font></span> (580) 223-6629<br /></p>
</div>
<div>
</body>
</html>
​
New HTML
<body>
<head>
</style>
<head>
<div id="footer">
<div class="left">
<h3><p style="padding-top: 10pt; " class="paragraph_style"><font size="5" color="#b42a1e">About Us</font><br /></p></h3>
<p class="paragraph_style_1"><a title="BBC History" href="http://www.bbcardmore.com/bbc-history-3/"><font color="#191e26">BBC History</font></a> <br /></p>
<p class="paragraph_style_1"><a title="BBC Statement Of Faith" href="http://www.bbcardmore.com/statement-of- faith/"><font color="#191e26">BBC Statement Of Faith</a><br /></p>
<p class="paragraph_style_1"><a title="BBC Ministries" href="http://www.bbcardmore.com/bbc-ministries/"><font color="#191e26">BBC Ministries</font></a><br /></p>
<p class="paragraph_style_1"><a title="BBC Pastor" href="http://www.bbcardmore.com/our-pastor/"><font color="#191e26">BBC Pastor</font></a><br /> </p>
<p style="padding-bottom: 0pt; " class="paragraph_style_1"><a title="BBC Map" href="http://www.bbcardmore.com/map/"><font color="#191e26">BBC Map</font></a></p>
</div>
<div class="centered">
<h3><p style="padding-top: 10pt; " class="paragraph_style"><a title="Service Times" href="http://www.bbcardmore.com/service-times/"><font size="5" color="#b42a1e">Service Times</font><br /></p></h3>
<p class="paragraph_style_1"><a title="Service Times" href="http://www.bbcardmore.com/service-times/"><font color="#191e26"> Sunday School~ 10:00 AM</font></a><br /></p>
<p class="paragraph_style_1"><a title="Service Times" href="http://www.bbcardmore.com/service-times/"><font color="#191e26"> Sunday Morning Service~ 11:00 AM</font></a><br /></p>
<p class="paragraph_style_1"><a title="Service Times" href="http://www.bbcardmore.com/service-times/"><font color="#191e26"> Sunday Evening Service~ 7:00 PM</font></a><br /></p>
<p class="paragraph_style_1"><a title="Service Times" href="http://www.bbcardmore.com/service-times/"><font color="#191e26"> Wednesday Evening Bible Study~ 7:00 PM</font></a><br /></p>
<p class="paragraph_style_1"><a title="Service Times" href="http://www.bbcardmore.com/service-times/"><font color="#191e26"> Transportation and child-care available for all services.</font></a><br /></p>
</div>
<div class="right">
<h3><p style="padding-top: 10pt; " class="paragraph_style"><a title="Contact Us" href="http://www.bbcardmore.com/contact-us/"><font size="5" color="#b42a1e">Contact Us:</font><br /></p></h3>
<p class="paragraph_style_2"><a title="Map" href="http://www.bbcardmore.com/map/"><font size="3" color="#b42a1e">Physical Address:</font><br /></p>
<p class="paragraph_style_1"><a title="Map" href="http://www.bbcardmore.com/map/"><font color="#191e26">1515 Easley Drive</font><br /></p>
<p class="paragraph_style_1"><a title="Map" href="http://www.bbcardmore.com/map/"><font color="#191e26">Ardmore, OK 73401</font><br /></p>
<p class="paragraph_style_3"><span class="style"><a title="" href="mailto:bbcardmore#aol.com"><font size="3" color="#b42a1e">Email:</font></span><font color="#191e26"> bbcardmore#aol.com</font><br /></p>
<p class="paragraph_style_3"><span class="style"><a title="Contact Us" href="http://www.bbcardmore.com/contact-us/"><font size="3" color="#b42a1e">Phone:</font></span><font color="#191e26"> (580) 223-6629</font><br /></p>
</div>
<div>
</body>
</html>
​

Do you want change the red color ?
<font size="5" color="red">About Us</font>
Delete color="red"

Related

Xpages Partial refresh with HTML ID

I have an InputText which has a function onChange. This function triggers an HTML component with partial refresh. EveryClass in this DIV works great.
but If refreshID is a XPages Design Element Partial Refresh works fine but CSS class does not. For example. In this examle the div which has class named "card", when i click on it It collapse and expand. When The page loaded first It works great but after partial refresh Collapsing and expanding does not work. I do not want to use full refresh because I have added Loading indicator which works with partial refresh and does not work with full refresh. Is there any way to solve this problem. If anyone has a clue I can share full codes..
Thank You
<xp:div id="Results" styleClass="card">
<div class="card-header bg-transparent header-elements-inline">
<span class="card-title font-weight-semibold">
Find What you are looking for...
</span>
<div class="header-elements">
<div class="list-icons">
<i class="icon-help"></i>
<a class="list-icons-item" data-action="collapse"> </a>
<a class="list-icons-item" data-action="remove"> </a>
</div>
</div>
</div>
<div class="card-body">
<div class="form-group form-group-feedback form-group-feedback-left">
<xp:inputText style="width:100%;" id="CompanyName" value="#{viewScope.CompanyName}" styleClass="form-control border-success-300 border-1"> <xp:this.attrs>
<xp:attr name="placeholder" value="What is it You looking for?">
</xp:attr>
</xp:this.attrs>
<xp:typeAhead mode="full" minChars="2" ignoreCase="true" valueList="#{javascript:getCustomersList();}"> </xp:typeAhead>
<xp:eventHandler event="onchange" submit="true" refreshMode="partial"
refreshId="Results"> <xp:this.action><![CDATA[#{javascript:getSearchResults(viewScope.CompanyName)}]]></xp:this.action>
</xp:eventHandler></xp:inputText>
<div class="form-control-feedback"> <i class="mt-2 icon-reading text-muted"> </i> </div> </div>
<div class="">
<xp:comboBox id="Staff" value="#{viewScope.Staff}" styleClass="form-control"> <xp:this.disabled><![CDATA[#{javascript:viewScope.CompanyName=="" || viewScope.CompanyName==null; }]]></xp:this.disabled>
<xp:selectItems> <xp:this.value><![CDATA[#{javascript:viewScope.Staff}]]></xp:this.value> </xp:selectItems>
<xp:eventHandler event="onchange" submit="true" refreshMode="partial" refreshId="Results"> <xp:this.action><![CDATA[#{javascript:var fName = viewScope.CompanyName;var uName = viewScope.Staff;
getUrunDetails(fName, uName)}]]></xp:this.action> </xp:eventHandler></xp:comboBox></div><div class="">
<xp:label value="Lastest Order Date:" id="label3" styleClass="col-form-label"></xp:label></div> <div class=""><xp:inputText id="LatestOrderDate" value="#{viewScope.LatestOrderDate}" styleClass="text-right form-control border-success-300 border-1" disabled="true">
</xp:inputText> </div> </div>
</xp:div>
UPDATE-2
<div id="view:_id1:_id1766:Results" class="card">
<div class="card-header bg-transparent header-elements-inline"><span class="card-title font-weight-semibold">Ara...</span>
<div class="header-elements"><div class="list-icons"><a class="list-icons-item" href="#"><i class="icon-help"></i></a>
<a class="list-icons-item" data-action="collapse"></a><a class="list-icons-item" data-action="remove"></a></div></div></div>
<div class="card-body"><div class="form-group form-group-feedback form-group-feedback-left">
<span id="view:_id1:_id1766:_id2717" dojotype="ibm.xsp.widget.layout.data.TypeAheadReadStore" jsid="view__id1__id1766__id2717" minchars="2" mode="full"></span>
<div class="dijit dijitReset dijitInline dijitLeft dijitTextBox dijitComboBox dijitValidationTextBox form-control border-success-300 border-1" id="widget_view:_id1:_id1766:FirmaAdi" role="combobox" aria-haspopup="true" data-dojo-attach-point="_popupStateNode" lang="en" widgetid="view:_id1:_id1766:FirmaAdi" style="width: 100%;"><div class="dijitReset dijitRight dijitButtonNode dijitArrowButton dijitDownArrowButton dijitArrowButtonContainer" data-dojo-attach-point="_buttonNode" role="presentation" style="display: none;"><input class="dijitReset dijitInputField dijitArrowButtonInner" value="▼ " type="text" tabindex="-1" readonly="readonly" role="button presentation" aria-hidden="true"></div><div class="dijitReset dijitValidationContainer"><input class="dijitReset dijitInputField dijitValidationIcon dijitValidationInner" value="Χ " type="text" tabindex="-1" readonly="readonly" role="presentation"></div><div class="dijitReset dijitInputField dijitInputContainer"><input class="dijitReset dijitInputInner" name="view:_id1:_id1766:FirmaAdi" type="text" autocomplete="off" data-dojo-attach-point="textbox,focusNode" role="textbox" tabindex="0" id="view:_id1:_id1766:FirmaAdi" value="DÖKTAŞ DÖKÜMCÜLÜK TİC VE SAN. A.Ş." aria-invalid="false"><span class="dijitPlaceHolder dijitInputField" style="display: none;">Ne Aramıştınız?</span></div></div><div class="form-control-feedback"><i class="mt-2 icon-reading text-muted"></i></div></div><div><select id="view:_id1:_id1766:Urun" name="view:_id1:_id1766:Urun" class="form-control" size="1"> <option value="Staff 0</option>
<option value="Staff 1</option>
<option value="Staff 2</option>
<option value="Staff 3</option>
</select></div><div>
<label id="view:_id1:_id1766:label3" class="col-form-label">Son Sipariş:<a id="view:_id1:_id1766:link14" href="http://portal/xspFrmProposal.xsp?action=editDocument&documentId=FD0F115C68C2BD52432586950040A419" class="text-right mr-2 ml-2 r text-primary list-icons-item" target="_blank" data-popup="popover" data-trigger="hover" data-content="DÖKTAŞ DÖKÜMCÜLÜK TİC VE SAN. A.Ş. ye ait Sözleşme Formuna git..." data-original-title="Müşteri Bilgilerine Git" data-placement="bottom"><i class="icon-link2"></i></a></label></div><div><input type="text" value="11.03.2021 15:26:49" id="view:_id1:_id1766:SiparisTarihi" name="view:_id1:_id1766:SiparisTarihi" disabled="disabled" class="text-right form-control border-success-300 border-1"></div><div><label class="col-form-label">Son Teklif:<a id="view:_id1:_id1766:link12" href="http://portal.acarermetal.com.tr/ays/crm.nsf/xspFrmTeklif.xsp?action=editDocument&documentId=38ED7907DE9CFAD943258693003E7D3F" class="text-right mr-2 ml-2 r text-primary list-icons-item" target="_blank" data-popup="popover" data-trigger="hover" data-content="DÖKTAŞ DÖKÜMCÜLÜK TİC VE SAN. A.Ş. ye ait son teklif formuna git..." data-original-title="Müşteri Bilgilerine Git" data-placement="bottom"><i class="icon-link2"></i></a></label></div><div><input type="text" value="09.03.2021" id="view:_id1:_id1766:TeklifTarihi" name="view:_id1:_id1766:TeklifTarihi" disabled="disabled" class="text-right form-control border-success-300 border-1"></div><div><label class="col-form-label">Son Teklif Verilen Malzemeler:</label><textarea name="view:_id1:_id1766:Urunt" data-dojo-attach-point="focusNode,containerNode,textbox" autocomplete="off" class="dijitTextBox dijitTextArea dijitExpandingTextArea form-control elastic elastic-destroy dijitTextBoxDisabled dijitTextAreaDisabled dijitExpandingTextAreaDisabled dijitDisabled" tabindex="-1" lang="en" disabled="" aria-disabled="true" id="view:_id1:_id1766:Urunt" rows="1" widgetid="view:_id1:_id1766:Urunt" value="2 Ton FEMO 16995usd
" style="overflow: auto hidden; box-sizing: border-box; min-height: 72px; height: 68px;"></textarea></div></div></div>

How can I extract the text from a div tag with style attribute set as "display: none;" through selenium

My html looks like this:
<div class="row">
<div class="col-md-7">
<ul class="breadcrumb">
<li id="get_data">Get data</li>
<li id="sampling_task">Sampling</li>
<li id="confirm_task">Confirmation</li>
</ul>
<div class="container-fluid">
<form action="#" method="post" enctype="multipart/form-data" role="form" class="form-horizontal">
{% csrf_token %}
<div class="form-group">
<label for="id_fileA" class="col-sm-3 control-label" style="text-align: left">
Select dataset A<span class='required_label'>*</span>
</label>
<div class="col-sm-9">
{{ form.fileA|attr:"class:form-control" }}
</div>
</div>
<div class="form-group"></div>
<div class="form-group">
<label for="id_fileB" class="col-sm-3 control-label" style="text-align: left">
Select dataset B<span class='required_label'>*</span>
</label>
<div class="col-sm-9">
{{ form.fileB|attr:"class:form-control" }}
</div>
</div>
<div class="form-group"></div>
<div class="form-group" id="sample_btn" style="display: none">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-9">
<input type="button" name="theButton" id="sample-step" value="Start Sampling" class="btn btn-success btn-large disabled" style="border-radius: 5px;">
</div>
</div>
<div class="form-group">
<div class="col-sm-9 col-sm-offset-3" id="sample_msg" style="display: none;">
<p id="sample_text" style="font-size: medium">
Some ABCD message
</p>
</div>
</div>
<div class="form-group">
<div class="col-sm-9 col-sm-offset-3" id="get_sample_confirm_msg" style="display: none;">
<p>
<input type="button" style="height: 40px; width: 140px; border-radius: 5px" name="YesButton" id="accept-step" value="Accept & Continue" class="btn btn-success disabled">
<input type="button" style="height: 40px; width: 140px; border-radius: 5px" name="NoButton" id="cancel-step" value="Cancel Sampling" class="btn btn-danger disabled">
</p>
</div>
</div>
</form>
</div>
</div>
<div class="col-md-5">
</div>
</div>
The backend is a javascript and on button click, it do processing and if something fails the javascript code update the message.
var error = "<div class='alert alert-danger'><p>We encountered an error while sampling: <br /><strong>Sampling failed!!</strong></p>"; error += "<p>Please <a href='mailto:abcd#gmail.com'>contact us</a> if this error persists.</p>";
error += "</div>";
$('#sample_msg').html(error);
Now, in my selenium code if I do this:
sample_msg = self.driver.find_element_by_id('sample_msg')
I get an empty list result. What I want is to do is read the error in the "sample_msg" class if any and I have tried few things but its not working out. Help is appreciated. Thanks.
If you want to get access to hidden text you might need to use below code:
sample_msg = self.driver.find_element_by_id('sample_msg').get_attribute('textContent').strip()
Note that text property allows to get text from visible elements only
As you are trying to extract the error message Some ABCD message it is contained within a <p> tag which have parent <div> tag with style attribute set as display: none;. So to extract the text you can use the following code block :
element = driver.find_element_by_xpath("//div[#class='form-group']/div[#id='sample_msg']")
driver.execute_script("arguments[0].removeAttribute('style')", element)
print(driver.find_element_by_xpath("//div[#class='form-group']/div[#id='sample_msg']/p").get_attribute("innerHTML"))
So, you have to wait for sometime after clicking the button and once some message appears then you need to extract that message.
Try below:-
WebDriverWait wait = new WebDriverWait(webDriver, timeoutInSeconds);
wait.until(ExpectedConditions.visibilityOfElementLocated(By.id));
or
wait.until(ExpectedConditions.elementToBeClickable(By.id));
to be precise.
See also:
org.openqa.selenium.support.ui.ExpectedConditions for similar shortcuts for various wait scenarios.
org.openqa.selenium.support.ui.WebDriverWait for its various constructors.
You can check the python syntax also on the above links.

Not able to automate entering login credentials in Username and Password input fields

I am writing scripts for automating login action with credentials . I followed the standard process of finding the element through name , class , xpath . The input fields are not taking the credentials . I tried giving time interval of 10 seconds in between each process , still the issue continues.
Below I have attested the code .
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.support.select import Select
from selenium.webdriver.common.keys import Keys
import time
driver = webdriver.Firefox()
driver.get() #WEBSITE HERE
time.sleep(10)
elem = driver.find_element_by_xpath('//*[#id="ssousernameUI"]')
elem.clear()
elem.send_keys() # USERNAME HERE
elem.send_keys(Keys.RETURN)
time.sleep(10)
passwd = driver.find_element_by_xpath('//*[#id="password"]')
passwd.clear()
passwd.send_keys() #PASSWORD HERE
passwd.send_keys(Keys.RETURN)
time.sleep(10)
login = driver.find_element_by_link_text("Login")
login.click()
ERROR MESSAGE :
Traceback (most recent call last):
File "/home/think201/PycharmProjects/pat/pat-cbt/login.py", line 13,
in <module>
elem = driver.find_element_by_xpath('//*[#id="ssousernameUI"]')
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webdriver.py", line 368, in find_element_by_xpath
return self.find_element(by=By.XPATH, value=xpath)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webdriver.py", line 858, in find_element
'value': value})['value']
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/webdriver.py", line 311, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/remote/errorhandler.py", line 237, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: Unable to
locate element: //*[#id="ssousernameUI"]
HTML code
<form name="loginForm" action="https://login.asdfghjk.in/oam/server/auth_cred_submit" target="_top" id="loginForm" method="POST">
<!-- Taksh End -->
<input name="ipRandomValue" value="709381701517861" id="ipRandomValue" type="hidden"><input name="deviceTypeHidden" value="Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0" id="deviceTypeHidden" type="hidden">
<input name="ssousername" value="" id="ssousername" type="hidden">
<input name="hashnumber" value="" id="hashnumber" type="hidden">
<!-- Start mainWrapper -->
<div class="overlay"></div>
<div style="top: 20%;left: 50%;position: fixed;z-index: 5;color: white;display:none;" class="wait">
<h1>Please wait...</h1>
</div>
<div class="overlay1"></div>
<div class="mainWrapper">
<!-- Start Header -->
<!-- End Header -->
<!-- Start Middle Container -->
<article class="midContainer">
<div class="container">
<div class="breadcrums">
<p>You are here:</p>
<ul>
<li>Home</li>
<li class="last"> Login</li>
</ul>
</div>
<h1> Login</h1>
<section class="RHSsection standardWide">
<div class="pageWrap">
<div class="loginWrp">
<div class="box vfAcc">
<!-- displaying error message -->
<div class="cl c414042 bold fnt16"><p style="color:red;margin-left:10px;"><br><strong class="errMsgClass"></strong></p></div>
<div class="cl c414042 bold fnt16" id="SrvError"></div>
<div style="display:none;" class="cl c414042 bold fnt16 lockClass"><p style="color:red;margin-left:10px;"><br><strong>Your account is locked since it is
not used for a long time. Please click here to activate it</strong></p></div>
<!-- displaying error message end -->
<h3 class="accor">Login to manage your Account <span class="drop"></span></h3>
<div class="setWrp">
<div class="row">
<label>Enter your username or mobile number</label>
<div class="inputArea">
<div class="inputFieldBox">
<input name="ssousernameUI" autocomplete="off" class="login_input width255" value="" onfocus="if
(this.value==this.defaultValue)this.value='';" id="ssousernameUI" onblur="if(this.value=='')this.value=this.defaultValue;" type="text">
<div class="error_msg"></div>
</div>
</div>
</div>
<div class="row">
<label>Enter your password</label>
<div class="inputArea">
<div class="inputFieldBox">
<input name="password" autocomplete="off" id="password" class="login_input width255" onkeydown="if ((event.keyCode ==
13) && (document.getElementById('ssousernameUI').value!='') && (document.getElementById('passwordsrv').value!='')){LoginValidation();}" onblur="if(this.value=='')this.value=this.defaultValue;" value="" onfocus="if
(this.value==this.defaultValue)this.value='';" type="password">
<div class="error_msg"></div>
</div>
</div>
</div>
<div class="row">
<div class="checkboxBtn"> <span class="uncheked"></span>
<input name="checkbox" id="RememberMe" type="checkbox">
<label for="RememberMe"> Remember Me </label>
</div>
<div class="forgot"> Forgot your password?</div>
</div>
Login<!-- Add Here : Taksh -->
<!-- <div class="col orline"><span class="or">Or</span></div>
<ul class="smoShare">
<li class="facebook">Facebook</li>
<li class="gplus">Google Plus</li>
</ul> -->
</div>
</div>
<div class="box myvf">
<h3 class="accor">Why should I register ? <span class="drop"></span></h3>
<div class="setWrp">
<p>Here are 5 great reasons! </p>
<ul class="redbult">
<li>Simplified, dashboard view of voice & Internet usage</li>
<li> Easy update of profile & contact info</li>
<li> Quick change of voice & plans</li>
<li> Hassle-free access to old bills & statements of accounts</li>
<li> Instant activation/deactivation of services</li>
</ul>
<p>It takes just a few moments!</p>
Register Now
</div>
</div>
<div class="box vfApp">
<h3 class=""> App</h3>
<div class="">
<div class="vfappSlide">
<div class="owl-vfapp owl-carousel owl-theme owl-loaded">
<!-- <div class="apps"> <img src="/images/appimages/windows_logo.jpg" alt="" />
<p>Manage your account on the go !</p>
<div class="getNow"><a onclick="ga('send', 'event', 'My Account', 'Click', 'Windows - Get Now'); utag.link({ Custom_Links : 'MyAccount: Login: windows App - Get Now' });" href="http://qwertyu" class="purpleBtn">Get Now</a> </div>
</div>
<div class="apps"> <img src="/images/appimages/blackberry_logo.png" alt="" />
<p>Manage your Vodafone account on the go !</p>
<div class="getNow"><a onclick="ga('send', 'event', 'My Account', 'Click', 'Blackberry - Get Now'); utag.link({ Custom_Links : 'MyAccount: Login: Blackberry App - Get Now' });" href="http://qwerty" class="purpleBtn">Get Now</a> </div>
</div>
<div class="apps"> <img src="/images/appimages/nokia_ovi_logo.jpg" alt="" />
<p>Manage your account on the go !</p>
<div class="getNow"><a onclick="ga('send', 'event', 'My Account', 'Click', 'OVI - Get Now'); utag.link({ Custom_Links : 'MyAccount: Login: Ovi App - Get Now' });" href="http://qwertyu" class="purpleBtn">Get Now</a> </div>
</div>
<div class="apps"> <img src="/images/appimages/java_logo.jpg" alt="" />
<p>Manage your account on the go !</p>
<div class="getNow"><a onclick="ga('send', 'event', 'My Account', 'Click', 'Java - Get Now');utag.link({ Custom_Links : 'MyAccount: Login: Java App - Get Now' });" href="http://qwertyui" class="purpleBtn">Get Now</a> </div>
</div> -->
<div class="owl-stage-outer"><div class="owl-stage" style="transform: translate3d(-837px, 0px, 0px); transition: all 0.25s ease 0s; width: 1674px;"><div class="owl-item cloned" style="width: 279px; margin-right: 0px;"><div class="apps"> <img alt="" src="/images/appimages/android_logo1.jpg">
<p>Manage your Vodafone account on the go !</p>
<div class="getNow">Get Now </div>
</div></div><div class="owl-item cloned" style="width: 279px; margin-right: 0px;"><div class="apps"> <img alt="" src="/images/appimages/apple_logo1.jpg">
<p>Manage your Vodafone account on the go !</p>
<div class="getNow">Get Now </div>
</div></div><div class="owl-item" style="width: 279px; margin-right: 0px;"><div class="apps"> <img alt="" src="/images/appimages/android_logo1.jpg">
<p>Manage your Vodafone account on the go !</p>
<div class="getNow">Get Now </div>
</div></div><div class="owl-item active" style="width: 279px; margin-right: 0px;"><div class="apps"> <img alt="" src="/images/appimages/apple_logo1.jpg">
<p>Manage your account on the go !</p>
<div class="getNow">Get Now </div>
</div></div><div class="owl-item cloned" style="width: 279px; margin-right: 0px;"><div class="apps"> <img alt="" src="/images/appimages/android_logo1.jpg">
<p>Manage your account on the go !</p>
<div class="getNow">Get Now </div>
</div></div><div class="owl-item cloned" style="width: 279px; margin-right: 0px;"><div class="apps"> <img alt="" src="/images/appimages/apple_logo1.jpg">
<p>Manage your account on the go !</p>
<div class="getNow">Get Now </div>
</div></div></div></div><div class="owl-controls"><div class="owl-nav"><div class="owl-prev" style="display: none;">prev</div><div class="owl-next" style="display: none;">next</div></div><div style="" class="owl-dots"><div class="owl-dot"><span></span></div><div class="owl-dot active"><span></span></div></div></div></div>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
</article>
<!-- End Middle Container -->
</div>
<!-- End mainWrapper -->
</form>
NoSuchElementException is because webdriver is not able to find the element in the webpage. Check if there are any frames in the webpage. Switch to it, if any.
You will need to click the element to get that element to focus and then enter username/password details.
If that also does not work try wrapping your find element statement with explicit wait.
Let me know if that helps.
EDIT1:
elem.click();
elem.send_keys();
time.sleep(50);
EDIT2:
Instead of:
elem = driver.find_element_by_xpath('//*[#id="ssousernameUI"]')
you can try:
driver.find_element_by_xpath('//*[#id="ssousernameUI"]').click()
For the first look, it seems that you xpath is not a correct one.
Instead of using:
elem = driver.find_element_by_xpath('//*[#id="ssousernameUI"]')
Try this:
elem = driver.find_element_by_xpath("//*[#id='ssousernameUI']")
As per the HTML you have shared to fill up the credentials you can use the following code block :
from selenium import webdriver
driver = webdriver.Firefox()
driver.get("your_website") #WEBSITE HERE
username = driver.find_element_by_xpath("//input[#id='ssousernameUI']").click()
username.clear()
username.send_keys("user_name") # USERNAME HERE
password = driver.find_element_by_xpath("//input[#id='password']").click()
password.clear()
password.send_keys("Pa$$w0rd") #PASSWORD HERE
driver.find_element_by_xpath("//a[#class='purpleBtn' and contains(.,'Login')]").click()
Thank You . I resolved it .
The website had multiple login pages , hence they have used iframe to suffice the Login access in multiple pages.
The issue was , the login was inside a iframe . I referred to the documentation for switching through frame.
I used
driver.switch_to_frame("frameName")
Thank you #Arun Prakash and everyone.

Get active value from a carousel to an URL

I am working with ASP.net MVC 5, I have created a bootstrap carousel/slideshow with 4 images, I want to get the id of the active slide on this carousel. Then, when an user is clicking on an submit button, I can redirect him to another page recording the active slide id in the URL.
<form method="post">
<div id="mycarousel" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#mycarousel" data-slide-to="0" class=""></li>
<li data-target="#mycarousel" data-slide-to="1"></li>
<li data-target="#mycarousel" data-slide-to="2"></li>
<li data-target="#mycarousel" data-slide-to="3"></li>
</ol>
<a class="carousel-buttonleft" href="#mycarousel" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-buttonright" href="#mycarousel" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
<div class="carousel-inner" role="listbox" style="height:300px">
<div class="item active" align="center">
<div align="center" class="carousel-image"><img src="../images/saumon.png" alt="saumon1" /></div>
<div class="carousel-caption">
<p>NORMAL SKIN</p>
</div>
</a>
</div>
<div class="item ">
<div align="center" class="carousel-image">
<img src="../images/saumon.png" alt="saumon1" />
</div>
<div class="carousel-caption">
<p>SILVER SKIN</p>
</div>
</div>
<div class="item " align="center">
<div align="center" class="carousel-image"><img src="../images/saumon.png" alt="saumon1" /></div>
<div class="carousel-caption">
<p>DEEP SKIN</p>
</div>
</div>
<div class="item " align="center">
<div align="center" class="carousel-image"><img src="../images/saumon.png" alt="saumon1" /></div>
<div class="carousel-caption">
<p>WITH SKIN</p>
</div>
</div>
</div>
</div>
Thanks.
sorry i'm currently using my phone. You must select by className.
In css :
.carousel-inner .item .active
In jQuery :
$('.carousel-inner .item .active')
then... .attr('id') and for the value .val() or .text()
In C#, I found this topic to show you how to iterate inside your page controls depending a specific className target :
StackOverflow

mdl-switch not working inside mdl-grid & mdl-card

I am trying to put an mdl-switch inside an mdl-card which sits inside an mdl-grid.
the mdl-switch works fine if placed outside the card but just appears as a checkbox inside the card.
<script type="text/ng-template" id="nodes.html">
<h4 class="mdl-typography--display-1 pageTitle">asdf</h4>
<div class="mdl-grid">
<div ng-repeat="a in b" class="mdl-cell mdl-cell--4-col">
<div class="status-card mdl-card mdl-shadow--2dp status-green">
<div class="mdl-card__title mdl-card--expand">
<h4 style="width: 100%">
<label class="mdl-switch mdl-js-switch mdl-js-ripple-effect" for="BSL">
<input type="checkbox" id="BSL" class="mdl-switch__input" ng-model="a.asdfChk" />
<span class="mdl-switch__label">
<small>ASDF</small>
</span>
</label>
</h4>
</div>
<div class="mdl-card__actions mdl-card--border">
<div class="mdl-layout-spacer"></div>
</div>
</div>
</div>
</div>

Resources