Google Ventures Side Nav - server-side

I have been trying to figure out how the Google Venture Side-Nav works. I was able to get it to work on my computer locally, but it does not work once loaded onto Dreamhost's server at http://bikingagainstcancer.com/.
I wondered if anyone had any suggestions for how to get the nav bar to collapse? Any help would be appreciated! I am very new to coding, so please let me know what other information would be helpful and thanks in advance.

The problem is the check you have in scripts.js:129
if (isHome() || !collapsableNav) { return; }
isHome() returns true on the frontpage, so the test passes, and the function returns.

Related

AWS Amplify federated google login work properly on browser but dont work on Android

The issues are when I am trying to run federated authentication with the help of amplify auth method on the browser it works fine, but when I try to run it on my mobile.
It throws error No user found when I try to use Auth.currentSession() but the same work on the browser.
tried to search about this type of issue but I found related to ionic-cordova-google-plugin not related to AWS Amplify Federated Login Issue.
Updating the question after closing the question with less debugging information without asking for any information.
This is issues raised in git hub with respect to my problem.
Issue No. 5351 amplify js it's still in open state.
https://github.com/aws-amplify/amplify-js/issues/5351
Another issue 3537 which is still in Open
These two issues has the same scenario like me, I hope its enough debugging information, if more required mention comment instead of closing without notification, it's bullying for a beginner not helping
I fixed the above problem by referring a comment or wrapped around fix.
Link that will take to that comment directly link to comment.
First read the above comment as it will give you overall idea of what exactly the issue is instead of directly jumping to the solution.
Once you read the comment you will be little unclear with respect to implementation as he has use capacitor and not every one are using capacitor.
In my implementation I ignore this part as I am not using capacitor.
App.addListener('appUrlOpen')
Now lets go to main step where we are fixing this issue, I am using deep links to redirect to my application
this.platform.ready().then(() => {
this.deeplinks
.route({
"/success.html": "success",
"/logout.html": "logout",
})
.subscribe(
(match: any) => {
const fragment = JSON.stringify(match).split('"fragment":"')[1];
// this link can be your any link based on your requirement,
// what I am doing it I am passing all the data which I get in my fragments.
// fragments consists of id_token, stage, code,response type.
// These need to be passed to Ionic in order for Amplify to run its magic.
document.location.href = `http://192.168.1.162:8100/#${fragment}`;
},
(nomatch) => {
console.log("Got a deeplink that didn't match", nomatch);
}
);
});
I got this idea by referring the issue in which the developer mentioned of sending code and state along with application deep linking URL.

Selenium webdriver - Python won't click a button on a website

This is my first question on Stack Overflow. I am not much of a programmer, I just learnt about Selenium and went as far as I could but there is this mistake I can't fix alone so I am asking for help. I am using Python 2.7 in PyCharm.
As of now, I have been using anything.send_keys(Keys.ENTER) to click some buttons in my code as the .click() function always returned me a ElementNotInteractableException error in Chrome for this website. The goal here is simply to clear a text area, insert the list of genes down there and click on this "submit" button. This is supposed to show me an updated table that I want to download.
For this one troublesome button though, nothing works. The thing is, it doesn't even return an error, the code keeps going on as if it indeed had clicked, and it eventually downloads the non-updated table. I tried switching to Firefox, where neither .click() nor .send_keys(Keys.ENTER) worked (I never get an error as well, it just downloads the wrong table). Clicking myself does work and produces the updated table.
Based on other questions I saw here, I tried using ActionChains or scroll_into_view but still, nothing happens. Here is the code :
baseline_url = "http://mtsspdb.noble.org/atlas-internal/3880/transcript/profile/5?charttype=barchart&sessionid=1553076490500118&feature_accs=%20Medtr1g079760.1"
driver = webdriver.Chrome("C:\Webdrivers\chromedriver.exe")
driver.set_page_load_timeout(30)
driver.get(baseline_url)
driver.maximize_window()
peptides_list = """Medtr4g068220.1
Medtr1g107390.1
Medtr1g018740.1
Medtr5g016470.1
Medtr4g095002.1
Medtr5g004930.1
MT4Noble_020581.1
Medtr1g107395.1
Medtr1g107400.1
Medtr1g107405.1
Medtr1g107410.1
Medtr4g095010.1
MT4Noble_057127.1
"""
WebDriverWait(driver, 5).until(EC.presence_of_element_located((By.XPATH, "//*[#id='feature_accs']")))
text_area = driver.find_element_by_xpath("//*[#id='feature_accs']")
text_area.clear()
text_area.send_keys(peptides_list)
time.sleep(1)
troublesome = driver.find_element_by_xpath("//*[#id='form1']/div[8]/div/input")
print troublesome
#scroll_into_view = troublesome.location_once_scrolled_into_view
ActionChains(driver).move_to_element(troublesome).send_keys(Keys.ENTER)
time.sleep(3)
print "Sucess for x"
The html location of this button is
<input class="btn btn-primary" type="submit" name="submit" value="Submit">
Do you have any idea on how to click it, and most of all on why it doesn't work ?
Many thanks
PS: As I said previously, it is my first question. Please tell me if I need to update/change something.
This will definitely work, as I just tried it given your information
driver.execute_script("$('#form1').find('.btn-primary').click()")
Now, there must be something strange about it finding the element, as Selenium would error if it could not click. So the element we are clicking with the code must not have the events we expect it to have. I am investigating more and will update this with specifics.
Edit:
Interesting. The submit button does not seem to have normal event listeners.
getEventListeners($(".btn-primary")[0]);
$._data($(".btn-primary")[0], "events");
Both of these return nothing. This would seem to be the cause of the Selenium issue. It isn't triggering the actual submission with its click. Selenium does not use Javascript, and also does not use a real user32.dll (Windows ex) click, so it does not always behave identically to a real click or a javascript click.
Welcome to SO. Here is the option to click on the button.
Option 1: click using javascript
driver.exeucte_script("arguments[0].click();",troublesome)
Option 2: Scrolling to element
troublesome.location_once_scrolled_into_view
troublesome.click()
This works well for me:
for i in range(1, 10):
try:
driver.find_element_by_xpath(
f'/html/body/div[{i}]/div/div[2]/span[1]/span/span/input').click()
except:
pass

TouchID and RevealViewController

I am using the SWRevealViewController and everything was working perfectly, I added LocalAuthentication so a user could validate their login with Touch ID.
Now the RevealViewController doesnt not do anything when you use Touch ID, if I cancel the Touch ID everything works perfectly..
I havnt posted any code and was just wondering if anyone have experienced anything similar and knew the solution..
Thanks a lot!
fixed this by adding
DispatchQueue.main.async(execute: {() -> Void in
after looking for evaluatePolicy success

Trouble with Autobench and setting httperf_add-header

I want to load test my application and need a Cookie for it.
I've looked all of the other questions and have tried this:
In autobench.conf
httperf_add-header = "Cookie: cookie_name=cookie_string\n"
Still not working. I believed is ignored.
But, when I run httperf like:
httperf --add-header="Cookie: cookie_name=cookie_string\n" --server=server --port=port--uri=/uri
It works perfect.
So, how do i make it work for Autobench?
Thanks in advance.

c# app connectivity issue

I am new to C# and would be really grateful if someone could provide some insight on the following problem: I have written a c# app that gets the html content of a website, quite simply using a webclient. The problem is that if I run it for multiple websites I see that sometimes I get no results for some of them, like it was never connected to that website at that instance. I initially thought it was my internet connection but the same happened when I tried on a different wifi. It is worth mentioning that I have the same prob on another of my appcs when trying to connect to a webservice. My question is: does anybody know how can this be fixed? Does it have to do with the timeout time of something like that?
Thank you very much in advance
This is the code but it's not really an issue of coding:
var client = new WebClient();
try
{
var htmlcode = client.DownloadString(site);
int NumberOfTrues = Regex.Matches(htmlcode.ToLower(), key).Count;
}
catch (Exception)
{
messagebox.show("could not be loaded");
}
This was solved by defining the default proxy server in app config.